diff --git a/.fern/replay.lock b/.fern/replay.lock index c3d67fb7..6b7406bd 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6,5 +6,77 @@ generations: timestamp: 2026-05-12T04:52:50.433Z cli_version: unknown generator_versions: {} -current_generation: 2b1bf29d9d52526f3bf1c900c8d13afd4aa2b0cf + - commit_sha: ae4f5b4b9ca18d966278c4113e89b85e607973cc + tree_hash: 334f54e3127b6fd33e59e6e6b7a41d87f4e12661 + timestamp: 2026-07-09T05:44:02.868Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.6.3 + - commit_sha: 653c66ddba4f88ad24d1bab64c0d820b57ec9c0d + tree_hash: b714995659cff9c91bdf1eaa8990f7dadbdbe52d + timestamp: 2026-07-14T16:05:49.064Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: 6123049f4ae684b09b5bfb8da5ed607adc6f871d + tree_hash: 4d63c7b38b38d404803cfd5d9859d9711e9c03fa + timestamp: 2026-07-21T07:15:47.465Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: 97f94ce5dd517846f1fd30ae84791654a7da96bd + tree_hash: 85ae2235f756976f1a0eee80d27fcf579579bdfc + timestamp: 2026-08-04T06:33:07.487Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - 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 + - commit_sha: 6981a2ead10a6b0f4d15c2b21942acdb6de4a930 + tree_hash: 9051bc49b73ae30d9d0d3bcd3655848a16e60442 + timestamp: 2026-09-02T09:23:31.722Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: b97372b9f40b0341aa2ac580fa64488e2ad2aff2 + tree_hash: 9904aaf894abb20b613cbd03d6e2fea95e28de1f + timestamp: 2026-09-11T02:55:27.155Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: 52b481b4c8ac54e43f7ad6639899321570ea73b3 + tree_hash: abd8d0c430153dc3513b9c5fcb33ff1af8b5c573 + timestamp: 2026-09-15T11:43:42.039Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: 72c6c335cb93c52314a459f895a03fa2a0730e87 + tree_hash: e485efdbc833d45f6f6c69c79cbff62e8a99bfa4 + timestamp: 2026-09-29T05:57:51.188Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: aea2edeb38693d237fd526174237509079d38899 + tree_hash: 6f9dcd3a746086fe8195691a55f3e6a9bc3a8fd8 + timestamp: 2026-10-27T05:56:52.912Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: eb0e87eec2d01cbd9dba8048da5a2d95d09c5806 + tree_hash: 87289d68b4802c8950169e6defe403f52779352c + timestamp: 2026-11-04T04:00:02.404Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 + - commit_sha: c771d9f172f57e90591b182dd2c6153912570c46 + tree_hash: b10804652a1ba45705da95fe802972b8186c967f + timestamp: 2026-11-20T04:41:07.109Z + cli_version: unknown + generator_versions: + fernapi/fern-java-sdk: 4.11.1 +current_generation: c771d9f172f57e90591b182dd2c6153912570c46 patches: [] diff --git a/.fernignore b/.fernignore index 819c62a7..7dd5e97c 100644 --- a/.fernignore +++ b/.fernignore @@ -3,10 +3,15 @@ # README should not be overwritten as it combines both SDKs README.md +# AI agent guidelines (hand-maintained) +CLAUDE.md +AGENTS.md +references/ + # Examples and Migration Guide from auth0-real EXAMPLES.md -v3_MIGRATION_GUIDE.md -MIGRATION_GUIDE.md +v4_MIGRATION_GUIDE.md +v5_MIGRATION_GUIDE.md LICENSE CHANGELOG.md @@ -65,6 +70,7 @@ src/test/java/com/auth0/client/mgmt/OAuthTokenSupplierTest.java src/test/java/com/auth0/client/mgmt/ManagementApiBuilderTest.java src/test/java/com/auth0/client/mgmt/CustomDomainInterceptorTest.java src/test/java/com/auth0/client/mgmt/CustomDomainHeaderIntegrationTest.java +src/test/java/com/auth0/net/client/DefaultHttpClientTest.java # Configuration files from auth0-real .codecov.yml diff --git a/.github/actions/maven-publish/action.yml b/.github/actions/maven-publish/action.yml index 70a3aec3..5e519b4d 100644 --- a/.github/actions/maven-publish/action.yml +++ b/.github/actions/maven-publish/action.yml @@ -22,11 +22,13 @@ runs: - name: Setup Java shell: bash + env: + JAVA_VERSION: ${{ inputs.java-version }} run: | curl -s "https://get.sdkman.io" | bash source "/home/runner/.sdkman/bin/sdkman-init.sh" sdk list java - sdk install java ${{ inputs.java-version }} && sdk default java ${{ inputs.java-version }} + sdk install java "$JAVA_VERSION" && sdk default java "$JAVA_VERSION" export JAVA_HOME=${SDKMAN_DIR}/candidates/java/current echo "JAVA_HOME is set to $JAVA_HOME" diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index eed92317..22dce437 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -10,22 +10,22 @@ jobs: gradle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0 with: distribution: temurin java-version: 8 - name: Set up Gradle - uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 + uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1 - name: Test and Assemble with Gradle run: ./gradlew assemble check --continue --console=plain - - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: flags: unittests - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: Reports path: build/reports diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index d8b42149..aaca789d 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -6,5 +6,5 @@ jobs: name: "validation/gradlew" runs-on: ubuntu-latest steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: gradle/actions/wrapper-validation@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1 diff --git a/.github/workflows/java-release.yml b/.github/workflows/java-release.yml index 075c3886..befe3920 100644 --- a/.github/workflows/java-release.yml +++ b/.github/workflows/java-release.yml @@ -30,7 +30,7 @@ jobs: steps: # Checkout the code - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 diff --git a/.github/workflows/rl-scanner.yml b/.github/workflows/rl-scanner.yml index 2abc5e83..b8b004f4 100644 --- a/.github/workflows/rl-scanner.yml +++ b/.github/workflows/rl-scanner.yml @@ -35,16 +35,16 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Java - uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 + uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0 with: distribution: temurin java-version: ${{ inputs.java-version }} - name: Set up Gradle - uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 + uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1 - name: Test and Assemble with Gradle run: ./gradlew assemble check --continue --console=plain @@ -53,8 +53,10 @@ jobs: uses: ./.github/actions/get-version - name: Create tgz build artifact + env: + ARTIFACT_NAME: ${{ inputs.artifact-name }} run: | - tar -czvf ${{ inputs.artifact-name }} * + tar -czvf "$ARTIFACT_NAME" * - name: Run RL Scanner id: rl-scan-conclusion diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 12c0e29b..3da31d1a 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -30,7 +30,7 @@ jobs: - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group' run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection. - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event.pull_request.head.sha || github.ref }} diff --git a/.version b/.version index 30291cba..1bc788d3 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -3.10.0 +5.6.0 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..47eae03e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,3 @@ +# AI Agent Guidelines for auth0-java + +@./CLAUDE.md for all coding guidelines, commands, project structure, code style, testing conventions, and boundaries. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c058de9..fc92e355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,143 @@ # Change Log +## [5.6.0](https://github.com/auth0/auth0-java/tree/5.6.0) (2026-11-23) +[Full Changelog](https://github.com/auth0/auth0-java/compare/5.5.0...5.6.0) + +**Added** +- feat: add Google account linking on clients, and Universal Logout config for SSO tickets [\#950](https://github.com/auth0/auth0-java/pull/950) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Clients:** adds `google_account_linking` (Google Streamlined Linking) to client create, update, list and response types, and `okta_oin_listing_url` to `express_configuration`. + - **Self-Service Profiles & Connections:** adds `universal_logout_config` to SSO ticket creation, and `key_use` to connection key create and rotate so encryption keys can be managed. + +**Breaking changes** +- feat: add Google account linking on clients, and Universal Logout config for SSO tickets [\#950](https://github.com/auth0/auth0-java/pull/950) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Removed `genai_trial` from `TenantSettingsFlags`.** `getGenaiTrial()` and the builder's `genaiTrial(...)` no longer exist; remove these calls. + - **`CreateEmailProviderRequestContent.credentials` is now optional.** `getCredentials()` returns `Optional` instead of `EmailProviderCredentialsSchema`, so callers must unwrap the `Optional`. Existing `.name(...).credentials(...)` builder chains still compile. + +## [5.5.0](https://github.com/auth0/auth0-java/tree/5.5.0) (2026-11-04) +[Full Changelog](https://github.com/auth0/auth0-java/compare/5.4.0...5.5.0) + +**Added** +- feat: add Portals API, agent_id on clients support [\#948](https://github.com/auth0/auth0-java/pull/948) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Portals:** adds the `portals()` client (list, create, get, update, delete) with discriminated `PageComponent` and `SidebarComponent` types for Universal Portals. + - **Agents:** adds `agent_id` to client create, update, list and response types, and `agent_subject_claims` to resource servers. +- feat!: Adds Client Profiles, client/grant search, consent signing keys, resource server type, client OIDC support [\#947](https://github.com/auth0/auth0-java/pull/947) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **New endpoints:** adds the `clientProfiles()` client, `clients().search` and `clientGrants().search`, and the user consent signing key endpoints. Resource servers gain `type`, and clients gain `oidc_support`. + - **Breaking:** connection responses now require `display_name`, `SearchOrganization.metadata` is removed, and the Experiment Center `updateStatus` methods are replaced by `status` on `update`. + +## [5.4.0](https://github.com/auth0/auth0-java/tree/5.4.0) (2026-09-30) +[Full Changelog](https://github.com/auth0/auth0-java/compare/5.3.0...5.4.0) + +**Added** +- feat: allow reusing an existing OkHttpClient via DefaultHttpClient.Bu… [\#936](https://github.com/auth0/auth0-java/pull/936) ([tanya732](https://github.com/tanya732)) +- feat: add Experiment Center, consent non-repudiation & client OIDC support [\#937](https://github.com/auth0/auth0-java/pull/937) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Experiment Center - A/B Testing (Early Access):** builds the `experimentation()` client out into a full A/B-testing surface. + - **Resource Servers - consent non-repudiation:** adds a `requireConsentNonRepudiation` flag to the resource server create, update, get, and search payloads. + - **Connections:** surfaces new provider option fields on the SAML, AD, ADFS, Azure AD, and PingFederate connection option types. + +**Breaking changes** +- feat: add Experiment Center, consent non-repudiation & client OIDC support [\#937](https://github.com/auth0/auth0-java/pull/937) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Removed the per-organization Organization Template client.** + + +## [5.3.0](https://github.com/auth0/auth0-java/tree/5.3.0) (2026-09-15) +[Full Changelog](https://github.com/auth0/auth0-java/compare/5.2.0...5.3.0) + +**Added** +- feat: add Resource Server access token config, Organization connection member access levels & Client org permission controls [\#930](https://github.com/auth0/auth0-java/pull/930) ([fern-api[bot]](https://github.com/apps/fern-api)) + +## [5.2.0](https://github.com/auth0/auth0-java/tree/5.2.0) (2026-09-11) +[Full Changelog](https://github.com/auth0/auth0-java/compare/5.1.0...5.2.0) + +**Added** +- feat: add Guardian settings, Organization search, Resource Server search & anonymous sessions [#927](https://github.com/auth0/auth0-java/pull/927) ([fern-api[bot]](https://github.com/apps/fern-api)) + - Guardian: `guardian().get()` / `guardian().set()`, plus email and phone factor settings sub-clients + - Organizations: enhanced `list()` with offset + checkpoint pagination, new `search()` (SCIM/Lucene), `getByName()` + - Resource Servers: new `search()` operation + - Clients: `anonymousSessions` on create, update, get, and rotate-secret payloads + +**Breaking changes** +- feat: add Guardian settings, Organization search, Resource Server search & anonymous sessions [#927](https://github.com/auth0/auth0-java/pull/927) ([fern-api[bot]](https://github.com/apps/fern-api)) + - Removed `organizationTemplates()` client (Limited EA feature withdrawn until GA; `create:organization_templates` / `update:organization_templates` scopes also removed) + - `ConnectionIdentityProviderEnum` cleaned up: `-mcp` suffix dropped for `asana`, `atlassian`, `gitlab`, `slack`; `docusign`, `figma`, `gusto`, `heroku`, `intercom`, `pagerduty`, `supabase`, + `vercel`, `xero` removed entirely + - `GuardianClient` / `AsyncGuardianClient` moved from `com.auth0.client.mgmt.guardian` to `com.auth0.client.mgmt`; `SetGuardianSettingsRequestContent` moved to `com.auth0.client.mgmt.types` + + +## [5.1.0](https://github.com/auth0/auth0-java/tree/5.1.0) (2026-09-03) +[Full Changelog](https://github.com/auth0/auth0-java/compare/5.0.0...5.1.0) + +**Added** +- feat: add Organization Templates, B2B integration config, network ACL signatures & key deletion [\#922](https://github.com/auth0/auth0-java/pull/922) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Organization Templates** - new `OrganizationTemplatesClient` (and its async/raw variants) plus a per-organization `OrganizationTemplateClient`, letting you create and manage reusable organization + configuration templates. + - **B2B integration configuration** - new `B2BIntegrationConfiguration` type and integration-type enum, exposed on connection profiles for configuring partner/B2B integrations, including SCIM + provisioning (`ConnectionProfileProvisioningScim`, token scopes and tokens). + - **Network ACL signatures & key deletion** - additions to the Keys `NetworkAclsClient` (and async/raw variants) for network ACL signature operations and key deletion. + + +## [5.0.0](https://github.com/auth0/auth0-java/tree/5.0.0) (2026-08-19) +[Full Changelog](https://github.com/auth0/auth0-java/compare/4.2.0...5.0.0) + +A complete migration guide is available at [v5_MIGRATION_GUIDE](v5_MIGRATION_GUIDE.md). + +**Breaking** +- feat: add support for Keys Network ACLs, 3P client access, XAA connection profiles and nullable response fields + [\#918](https://github.com/auth0/auth0-java/pull/918) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Nullable response fields** — 32 getters across 8 response types change from `Optional` to `OptionalNullable`, so the SDK preserves the nullability declared in the API definition. +**Added** +- feat: add support for Keys Network ACLs, 3P client access, XAA connection profiles and nullable response fields + [\#918](https://github.com/auth0/auth0-java/pull/918) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Keys Network ACLs** — new `keys().networkAcls()` sub-client with `list`, `create`, and `get` against `/api/v2/keys/network-acls`, plus the `read:network_acl_keys` and `create:network_acl_keys` scopes. + - **Third-party (3P) client access** — `third_party_client_access` on the client `my_organization_configuration` object across `POST`/`GET`/`GET {id}`/`PATCH {id}` on `/clients` + - **Cross-App Access (XAA)** — `cross_app_access_resource_app` on the connection-profile request/response types and `ConnectionProfile` + - Misc: `useOauthSpecScope` on the OIDC/Okta connection options types; `matchAll` on `NetworkAclRule`. + - New typed error branches: `409 Conflict` and `400 Bad Request` on Flows; `400 Bad Request` and `404 Not Found` on Forms. +- feat: allow custom telemetry for SDKs built on auth0-java [\#916](https://github.com/auth0/auth0-java/pull/916) ([tanya732](https://github.com/tanya732)) + +**Changed** +- feat: add Migration Guide V5 [\#919](https://github.com/auth0/auth0-java/pull/919) ([tanya732](https://github.com/tanya732)) + - Adds `v5_MIGRATION_GUIDE.md` and removes `v3_MIGRATION_GUIDE.md`, now that v2 is well past end of support. Migration guides are retained for the two most recent majors. + +## [4.2.0](https://github.com/auth0/auth0-java/tree/4.2.0) (2026-08-05) +[Full Changelog](https://github.com/auth0/auth0-java/compare/4.1.0...4.2.0) + +**Added** +- feat: Agents client, Organization Clients & Role Groups, Directory Provisioning sync groups, Guardian factor settings & paginated Event Stream Deliveries + [\#909](https://github.com/auth0/auth0-java/pull/909) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Agents** — new top-level `agents()` client with full CRUD (`list`, `create`, `read`, `update`, `delete`) and `create:agents` / `read:agents` / `update:agents` / `delete:agents` scopes. + - **Organization Clients** — new `organizations().clients()` sub-client to associate, list, get, update, and remove org-to-client associations (checkpoint pagination); adds + `is_app_entitlement_active` on organizations and an `include_client_association_for` list filter. + - **Organization Role Groups** — new `organizations().roles().groups()` sub-client to list groups assigned to a role within an organization. + - **Organization-Level Roles** — `Role` and role list/filter now support `type` (`tenant` / `organization`) and `owner_id`. + - **Directory Provisioning sync groups** — `connections().directoryProvisioning()` gains `addSynchronizedGroupSelections` / `deleteSynchronizedGroupSelections`; Self-Service SSO tickets add + `sync_groups` on the Google Workspace config. + - **Guardian factor settings** — `GuardianFactor` now exposes an optional `settings` object (`otp_length`, `otp_expiration_time`). + - Misc: `country_codes` added to `AculContextEnum`; new shared `NotFound` / `Conflict` error schemas. + +**Fixes** +- feat: Agents client, Organization Clients & Role Groups, Directory Provisioning sync groups, Guardian factor settings & paginated Event Stream Deliveries + [\#909](https://github.com/auth0/auth0-java/pull/909) ([fern-api[bot]](https://github.com/apps/fern-api)) + - **Event Stream Deliveries pagination** — `deliveries().list(...)` now returns a `SyncPagingIterable` with checkpoint pagination (**breaking**: previously + `List`). + + +## [4.1.0](https://github.com/auth0/auth0-java/tree/4.1.0) (2026-07-22) +[Full Changelog](https://github.com/auth0/auth0-java/compare/4.0.0...4.1.0) + +**Added** +- feat: Branding Theme Identifiers, Self-Service Third-Party Client Access, Cross-App Access & Session Actor support [\#906](https://github.com/auth0/auth0-java/pull/906) ([fern-api[bot]](https://github.com/apps/fern-api)) +- feat: add access token exchange and generic subject token type to Tok… [\#904](https://github.com/auth0/auth0-java/pull/904) ([kailash-b](https://github.com/kailash-b)) + +## [4.0.0](https://github.com/auth0/auth0-java/tree/4.0.0) (2026-07-15) +[Full Changelog](https://github.com/auth0/auth0-java/compare/3.10.0...4.0.0) + +**Added** +- feat: add MIGRATION_GUIDE [\#900](https://github.com/auth0/auth0-java/pull/900) ([tanya732](https://github.com/tanya732)) +- feat: remove Federated Connections Tokensets, add per-request retries [\#899](https://github.com/auth0/auth0-java/pull/899) ([fern-api[bot]](https://github.com/apps/fern-api)) +- feat: add Organization Role Members, thirdPartyClientAccess, optional fields and contains breaking changes [\#893](https://github.com/auth0/auth0-java/pull/893) ([fern-api[bot]](https://github.com/apps/fern-api)) +- chore: update jackson version [\#898](https://github.com/auth0/auth0-java/pull/898) ([tanya732](https://github.com/tanya732)) +- feat: Add Token Vault support to the Authentication API [\#894](https://github.com/auth0/auth0-java/pull/894) ([kailash-b](https://github.com/kailash-b)) + ## [3.10.0](https://github.com/auth0/auth0-java/tree/3.10.0) (2026-07-03) [Full Changelog](https://github.com/auth0/auth0-java/compare/3.9.0...3.10.0) @@ -143,7 +281,7 @@ ManagementApi client = ManagementApi ``` **Note**: The Authentication API remains supported, with deprecated APIs removed. -A complete migration guide is available at [MIGRATION_GUIDE](MIGRATION_GUIDE.md). +A complete migration guide is available at [MIGRATION_GUIDE](v3_MIGRATION_GUIDE). ## [3.0.0-beta.0](https://github.com/auth0/auth0-java/tree/3.0.0-beta.0) (2025-12-18) [Full Changelog](https://github.com/auth0/auth0-java/compare/2.27.0...3.0.0-beta.0) @@ -157,7 +295,7 @@ A complete migration guide is available at [MIGRATION_GUIDE](MIGRATION_GUIDE.md) - Nullability annotations to POJO classes - Fully compatible **Authentication API client** — no breaking changes -- [Migration guide](MIGRATION_GUIDE) available for upgrading from v2.x +- [Migration guide](v3_MIGRATION_GUIDE) available for upgrading from v2.x ## [2.27.0](https://github.com/auth0/auth0-java/tree/2.27.0) (2025-12-18) diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..2d717515 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,188 @@ +# AI Agent Guidelines for auth0-java + +This document provides context and guidelines for AI coding assistants working with the auth0-java codebase. + +## Your Role + +You are a Java SDK engineer working on auth0-java, the server-side JVM client library for the Auth0 Authentication and Management APIs. The Management API surface is **generated by [Fern](https://buildwithfern.com) from an API definition**; the Authentication API and supporting infrastructure are **hand-maintained**. You write small, well-tested, backward-compatible code and — critically — you know the difference between generated and hand-written files before you edit anything. + +--- + +## Working Principles + +Apply these on every task in this repo — they keep changes correct, small, and reviewable. + +- **Think before coding.** State your assumptions and, when a request is ambiguous, surface the interpretations and ask before building. Recommend a simpler approach when you see one. A clarifying question up front beats a wrong implementation. +- **Generated vs. hand-written first.** Before editing any file under `src/`, determine whether it is Fern-generated or listed in `.fernignore`. Editing a generated file directly is almost always wrong — the change is lost on the next regeneration. See [Boundaries](#boundaries). +- **Simplicity first.** Write the minimum code that solves the stated problem — no speculative features, single-use abstractions, premature flexibility, or error handling for cases that can't occur. +- **Surgical changes.** Touch only what the request requires. Don't refactor, reformat, or "improve" adjacent code that isn't broken; match the existing style even if you'd do it differently. Every changed line should trace directly to the request. +- **Goal-driven execution.** Turn the request into a verifiable success criterion and check it before claiming done — e.g. "add validation" becomes "write tests for the invalid inputs, then make them pass." Don't report success you haven't verified. + +--- + +## Project Overview + +**auth0-java** is a Java client library for the Auth0 Authentication and Management APIs, intended for server-side JVM applications (Android apps should use [Auth0.Android](https://github.com/auth0/auth0.android)). + +- **Language:** Java (source/target compatibility **Java 8**; build toolchain pins `JavaLanguageVersion.of(8)`). Contributing prerequisite is JDK 11+ to run Gradle. +- **Build tool:** Gradle (wrapper committed — always use `./gradlew`) +- **Published artifact:** `com.auth0:auth0` on Maven Central (`group=com.auth0`, `POM_ARTIFACT_ID=auth0`) +- **Code generation:** Management API client + JSON types are generated by Fern; see the [About Generated Code](CONTRIBUTING.md#about-generated-code) section +- **Key dependencies** (`build.gradle`): OkHttp 5.2.1 (`api`), Jackson 2.21.5 (`api`, incl. `jdk8`/`jsr310` modules), `com.auth0:java-jwt`, `com.auth0:jwks-rsa`, `net.jodah:failsafe` +- **Test stack:** JUnit Jupiter 5, Mockito 4, OkHttp MockWebServer, Hamcrest + +--- + +## Project Structure + +``` +auth0-java/ +├── src/main/java/com/auth0/ +│ ├── client/ +│ │ ├── auth/ # Authentication API (HAND-MAINTAINED) — AuthAPI entry point +│ │ ├── mgmt/ # Management API (FERN-GENERATED) — ManagementApi / AsyncManagementApi +│ │ │ ├── / # per-resource clients (users, roles, organizations, ...) +│ │ │ ├── /types/ # generated request/response types +│ │ │ ├── core/ # ClientOptions, RequestOptions, OAuthTokenSupplier, interceptors (some HAND-MAINTAINED via .fernignore) +│ │ │ └── ManagementApiBuilder.java, TokenProvider.java, CustomDomainHeader.java # HAND-MAINTAINED +│ │ ├── ProxyOptions.java, LoggingOptions.java # HAND-MAINTAINED +│ ├── net/ # HTTP client abstraction over OkHttp + interceptors (HAND-MAINTAINED) +│ ├── json/auth/ # Auth API JSON models (HAND-MAINTAINED, in .fernignore) +│ ├── exception/, utils/ # HAND-MAINTAINED supporting packages +│ └── ... +├── src/test/java/com/auth0/ # JUnit 5 tests (mirrors main package layout) +│ └── src/test/resources/wire-tests, auth/ # fixtures +├── sample-app/ # standalone Gradle module for issue repros / manual verification +├── .fernignore # SOURCE OF TRUTH for which files Fern must NOT overwrite +├── reference.md # generated Management API code samples (large; do not hand-edit) +├── EXAMPLES.md # hand-maintained scenario samples +├── build.gradle, settings.gradle, gradle/ # build config +└── .github/workflows/ # CI: build-and-test, release, security scans +``` + +### Key Files + +| File | Purpose | +|------|---------| +| `src/main/java/com/auth0/client/auth/AuthAPI.java` | Authentication API entry point (hand-maintained) | +| `src/main/java/com/auth0/client/mgmt/ManagementApi.java` | Management API entry point (Fern-generated) | +| `src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java` | Async Management API entry point (Fern-generated) | +| `src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java` | Custom domain-based builder (hand-maintained, `.fernignore`) | +| `src/main/java/com/auth0/client/mgmt/TokenProvider.java` | Token provider shared between generated mgmt + hand-written auth (hand-maintained) | +| `.fernignore` | Lists every file/dir Fern preserves across regeneration — check before editing `src/` | +| `.version` | Single source of the published version (read by `gradle/versioning.gradle`) | + +> A generated file starts with the header comment `/** This file was auto-generated by Fern from our API Definition. */`. If you see it and the path is **not** in `.fernignore`, do not hand-edit it. + +--- + +## Boundaries + +### ✅ Always Do + +- Run `./gradlew test` before committing, and `./gradlew spotlessApply` to format (palantir-java-format). +- Before editing anything under `src/`, check `.fernignore`. Files/dirs listed there are hand-maintained and safe to edit; everything else under the generated Management API tree is regenerated by Fern. +- Add JUnit 5 tests for new hand-maintained functionality (see [references/testing.md](references/testing.md)). +- Update `README.md` and `EXAMPLES.md` in the same PR when changing a hand-maintained public API or usage pattern (see [references/docs-update.md](references/docs-update.md)). Both are in `.fernignore`, so your edits persist. +- Keep changes backward compatible — this is a widely-consumed published library on Java 8. + +### ⚠️ Ask First + +- **Any breaking change — always ask first.** Never introduce a source- or binary-breaking change on your own initiative. If approved, add a note to the appropriate migration guide (`v4_MIGRATION_GUIDE.md` for the current major) matching its structure. +- **Changing generated Management API behavior.** A durable fix to generated code needs a change to the **Fern API spec or the `generators/java-v2` generator**, not a local edit — see [About Generated Code](CONTRIBUTING.md#about-generated-code). Flag this rather than patching a generated file (which `.fernignore` does not protect). +- Adding or upgrading dependencies in `build.gradle`. +- Changing `.github/workflows/`, `.github/actions/`, release/versioning config, or `gradle/` files. +- Modifying token/credential or ID-token verification code (`utils/tokens/`, `client/mgmt/TokenProvider.java`, `client/mgmt/core/OAuthTokenSupplier.java`). + +### 🚫 Never Do + +- Hand-edit Fern-generated files (those with the auto-generated header comment and **not** in `.fernignore`) — changes are silently overwritten on the next SDK regeneration. +- Commit secrets, API keys, tokens, or a real Auth0 tenant domain/client secret. +- Remove or skip failing tests without fixing the underlying cause. +- Modify build output (`build/`, `.gradle/`) or the generated `reference.md` by hand. +- Break backward compatibility without approval (see Ask First). + +--- + +## Security Considerations + +- **Token management:** Management API tokens are supplied statically or via client-credentials through `client/mgmt/TokenProvider.java` and `client/mgmt/core/OAuthTokenSupplier.java`. Never log tokens or client secrets; never hardcode a tenant secret in code, tests, or the sample app. +- **ID token verification:** ID-token signature/claims verification lives in `com/auth0/utils/tokens/` (RS256 via JWKS, HS256 via shared secret). Do not weaken verification or add a bypass path. +- **Client assertions:** `client/auth/RSAClientAssertionSigner.java` and `ClientAssertionSigner.java` implement private-key-JWT client auth — treat as security-sensitive. +- **Secrets in CI:** signing keys and OSSR credentials are injected as GitHub Actions secrets in the release workflows, never committed. +- Never commit secrets, API keys, or tokens. + +--- + +> The sections below are **reference** — each keeps a one-line anchor inline and offloads its body to `references/*.md` behind a linked pointer. + +## Commands + +The core loop is `./gradlew build` / `test` / `spotlessApply`. See [references/commands.md](references/commands.md) for the full reference (assemble+check, single-test filtering, sample-app run, coverage). + +```bash +# Build everything (compile + test + assemble) +./gradlew build + +# Run the test suite +./gradlew test + +# Apply code formatting (palantir-java-format via Spotless) +./gradlew spotlessApply + +# What CI runs (build-and-test.yml) +./gradlew assemble check --continue --console=plain +``` + +--- + +## Testing + +- **Framework:** JUnit Jupiter 5 + Mockito 4; HTTP interactions use OkHttp `MockWebServer`; assertions use Hamcrest. +- **Location:** `src/test/java/com/auth0/` mirrors the main package layout; fixtures under `src/test/resources/` (`wire-tests`, `auth`). +- **Coverage:** uploaded to Codecov under the `unittests` flag (`.codecov.yml`). + +Hand-maintained test infrastructure (`MockServer`, `RecordedRequestMatcher`, `UrlMatcher`, `AssertsUtil`) is listed in `.fernignore` and shared by the Authentication API tests. See [references/testing.md](references/testing.md) for conventions and how generated vs. hand-written tests are organized. + +--- + +## Code Style + +Formatting is enforced by **Spotless with palantir-java-format** (`./gradlew spotlessApply`); `check` fails on violations. Indentation and encoding come from `.editorconfig` (4-space Java, LF, UTF-8, final newline). + +See [references/code-style.md](references/code-style.md) for the builder/entry-point patterns and generated-vs-hand-written conventions. + +--- + +## Git Workflow + +- **Commit messages:** Conventional Commits (`feat:`, `fix:`, `chore:`, `ci:`, `docs:`), matching recent `git log`. Release commits are titled `Release X.Y.Z`. +- **Releases** are cut from `release/*` branches; the version comes from `.version`. +- **PR body:** follow `.github/pull_request_template.md` (Changes / References / Testing / Checklist). + +See [references/git-workflow.md](references/git-workflow.md) for detail. + +--- + +## Common Pitfalls + +See [references/pitfalls.md](references/pitfalls.md) for the full list. Highlights: +- Editing a Fern-generated file (auto-generated header, not in `.fernignore`) — the change vanishes on regeneration; fix the spec/generator instead. +- Assuming `.fernignore` protects the whole Management API tree — it protects only the **explicitly listed** files/dirs. +- Targeting a newer Java API — the library must compile and run on **Java 8**. + +--- + +## Docs Update Rules + +> Treat documentation as a first-class deliverable. A PR that changes a hand-maintained public API or usage pattern is **not complete** until the relevant docs are updated in the same PR. + +| File | Covers | In `.fernignore`? | +|------|--------|-------------------| +| `README.md` | Overview, install, getting started (Auth + Management) | yes (hand-maintained) | +| `EXAMPLES.md` | Scenario code samples | yes (hand-maintained) | +| `reference.md` | Management API code samples | no — **generated**, do not hand-edit | +| `v5_MIGRATION_GUIDE.md` / `v4_MIGRATION_GUIDE.md` | Major-version migration | yes (hand-maintained) | +| `CHANGELOG.md` | Release history | yes — release-flow artifact, not edited per-PR | + +See [references/docs-update.md](references/docs-update.md) for the full code-to-docs mapping. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..24cf9fa0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,114 @@ +# Contributing + +Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project. + +## Getting Started + +### Prerequisites + +- Java 11+ +- Gradle + +### Installation + +Install the project dependencies: + +```bash +./gradlew build +``` + +### Building + +Build the project: + +```bash +./gradlew build +``` + +### Testing + +Run the test suite: + +```bash +./gradlew test +``` + +### Formatting + +Check and fix code style: + +```bash +./gradlew spotlessApply +``` + +## About Generated Code + +**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated. + +### Generated Files + +The following directories contain generated code: +- `src/` - API client classes and types +- Most Java files in the project + +### How to Customize + +If you need to customize the SDK, you have two options: + +#### Option 1: Use `.fernignore` + +For custom code that should persist across SDK regenerations: + +1. Create a `.fernignore` file in the project root +2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax) +3. Add your custom code to those files + +Files listed in `.fernignore` will not be overwritten when the SDK is regenerated. + +For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code). + +#### Option 2: Contribute to the Generator + +If you want to change how code is generated for all users of this SDK: + +1. The Java SDK generator lives in the [Fern repository](https://github.com/fern-api/fern) +2. Generator code is located at `generators/java-v2/` +3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md) +4. Submit a pull request with your changes to the generator + +This approach is best for: +- Bug fixes in generated code +- New features that would benefit all users +- Improvements to code generation patterns + +## Making Changes + +### Workflow + +1. Create a new branch for your changes +2. Make your modifications +3. Run tests to ensure nothing breaks: `./gradlew test` +4. Run formatting: `./gradlew spotlessApply` +5. Build the project: `./gradlew build` +6. Commit your changes with a clear commit message +7. Push your branch and create a pull request + +### Commit Messages + +Write clear, descriptive commit messages that explain what changed and why. + +### Code Style + +This project uses automated code formatting. Run `./gradlew spotlessApply` before committing to ensure your code meets the project's style guidelines. + +## Questions or Issues? + +If you have questions or run into issues: + +1. Check the [Fern documentation](https://buildwithfern.com) +2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues) +3. Open a new issue if your question hasn't been addressed + +## License + +By contributing to this project, you agree that your contributions will be licensed under the same license as the project. diff --git a/EXAMPLES.md b/EXAMPLES.md index 67608c55..c6ae33b6 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -5,6 +5,7 @@ - [Management API usage](#management-api-usage) - [Verifying an ID token](#verifying-an-id-token) - [Organizations](#organizations) +- [Token Vault](#token-vault) - [Logging](#logging) - [Asynchronous operations](#asynchronous-operations) @@ -64,6 +65,35 @@ If the `DefaultHttpClient` does not support your required networking client conf your own client by implementing the `Auth0HttpClient` interface and providing it to the API client. This is an advanced use case and should be used only when necessary. +If you already have a configured `OkHttpClient` (for example, one shared across your application with a custom connection +pool, dispatcher, timeouts, or interceptors), you can reuse it as the base for the `DefaultHttpClient` via `withClient`: + +```java +OkHttpClient okHttpClient = new OkHttpClient.Builder() + // your shared transport configuration, e.g. timeouts, dispatcher, or a custom interceptor + .build(); + +Auth0HttpClient httpClient = DefaultHttpClient.newBuilder() + .withClient(okHttpClient) + .build(); + +AuthAPI auth = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}") + .withHttpClient(httpClient) + .build(); +``` + +When you supply a client this way, **you own its transport configuration**: timeouts, dispatcher, connection pool, cache, +proxy, and any interceptors on it are used as-is. The corresponding `DefaultHttpClient.Builder` transport settings +(`withReadTimeout`, `withConnectTimeout`, `withMaxRequests`, `withMaxRequestsPerHost`, `withProxy`) are ignored in this +case, so your client is never silently overridden — configure those on your own `OkHttpClient` instead. + +The SDK's own behavior is always layered on top and cannot be bypassed: the Auth0 telemetry, rate-limit handling, and +logging interceptors are added to your client. These remain configurable via `withTelemetry`, `telemetryEnabled`, +`withMaxRetries`, and `withLogging`. + +> If you do not supply a client, nothing changes: the `DefaultHttpClient.Builder` builds and fully configures the +> transport as before. + ### Management API The Management API client uses `ManagementApi` as the main entry point. @@ -325,6 +355,57 @@ String url = auth.authorizeUrl("https://me.auth0.com/callback") .build(); ``` +## Token Vault + +[Token Vault](https://auth0.com/docs/secure/tokens/token-vault) lets you exchange an Auth0 token for a federated identity provider's access token, so your application can call the provider's APIs on the user's behalf. The connection must have Token Vault enabled, and because this exchange requires a private client, the `AuthAPI` instance must be configured with a client secret or client assertion. + +### Exchange a refresh token + +Use `getTokenForConnectionWithRefreshToken()` to exchange an Auth0 refresh token for the federated provider's access token: + +```java +AuthAPI auth = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}").build(); +TokenHolder result = auth.getTokenForConnectionWithRefreshToken("google-oauth2", "{REFRESH_TOKEN}", null) + .execute() + .getBody(); +String federatedAccessToken = result.getAccessToken(); +``` + +### Exchange an access token + +Use `getTokenForConnectionWithAccessToken()` to exchange an Auth0 access token instead: + +```java +TokenHolder result = auth.getTokenForConnectionWithAccessToken("google-oauth2", "{ACCESS_TOKEN}", null) + .execute() + .getBody(); +String federatedAccessToken = result.getAccessToken(); +``` + +### Specifying a login hint + +When a user has multiple accounts on the same connection, pass their ID within the identity provider as the `loginHint` (the final argument). Pass `null` to omit it: + +```java +TokenHolder result = auth.getTokenForConnectionWithRefreshToken("google-oauth2", "{REFRESH_TOKEN}", "{GOOGLE_USER_ID}") + .execute() + .getBody(); +``` + +### Exchanging other token types + +For full control over the subject token type, use the generic `getTokenForConnection()` and supply the `subject_token_type` URN yourself: + +```java +TokenHolder result = auth.getTokenForConnection( + "google-oauth2", + "{SUBJECT_TOKEN}", + "urn:ietf:params:oauth:token-type:refresh_token", + "{GOOGLE_USER_ID}") + .execute() + .getBody(); +``` + ## Logging The SDK is silent by default. You can enable logging to see HTTP requests and responses, which is useful for debugging. diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md deleted file mode 100644 index 9d98602c..00000000 --- a/MIGRATION_GUIDE.md +++ /dev/null @@ -1,369 +0,0 @@ -# V3 Migration Guide - -A guide to migrating the Auth0 Java SDK from `v2` to `v3`. - -- [Overall changes](#overall-changes) - - [Java versions](#java-versions) - - [Authentication API](#authentication-api) - - [Management API](#management-api) -- [Specific changes to the Management API](#specific-changes-to-the-management-api) - - [Client initialization](#client-initialization) - - [Sub-client organization](#sub-client-organization) - - [Request and response patterns](#request-and-response-patterns) - - [Pagination](#pagination) - - [Exception handling](#exception-handling) - - [Accessing raw HTTP responses](#accessing-raw-http-responses) - - [Request-level configuration](#request-level-configuration) - - [Type changes](#type-changes) - -## Overall changes - -### Java versions - -Both v2 and v3 require Java 8 or above. - -### Authentication API - -This major version change does not affect the Authentication API. The `AuthAPI` class has been ported directly from v2 to v3. Any code written for the Authentication API in the v2 version should work in the v3 version. - -```java -// Works in both v2 and v3 -AuthAPI auth = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}").build(); -``` - -### Management API - -V3 introduces significant improvements to the Management API SDK by migrating to [Fern](https://github.com/fern-api/fern) as the code generation tool. This provides: - -- Better resource grouping with sub-client organization -- Type-safe request and response objects using builder patterns -- Automatic pagination with `SyncPagingIterable` -- Simplified access to HTTP response metadata via `withRawResponse()` -- Consistent method naming (`list`, `create`, `get`, `update`, `delete`) - -## Specific changes to the Management API - -### Client initialization - -The Management API client initialization has changed from `ManagementAPI` to `ManagementApi`, and uses a different builder pattern. - -**v2:** -```java -import com.auth0.client.mgmt.ManagementAPI; - -// Using domain and token -ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_API_TOKEN}").build(); - -// Using TokenProvider -TokenProvider tokenProvider = SimpleTokenProvider.create("{YOUR_API_TOKEN}"); -ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", tokenProvider).build(); -``` - -**v3:** -1st Approach : Standard Token-Based -```java -import com.auth0.client.mgmt.ManagementApi; - -ManagementApi client = ManagementApi - .builder() - .url("https://{YOUR_DOMAIN}/api/v2") - .token("{YOUR_API_TOKEN}") - .build(); -``` - -or - -2nd Approach : OAuth client credentials flow - -```java -OAuthTokenSupplier tokenSupplier = new OAuthTokenSupplier( -"{CLIENT_ID}", -"{CLIENT_SECRET}", -"https://{YOUR_DOMAIN}", -"{YOUR_AUDIENCE}" -); - -ClientOptions clientOptions = ClientOptions.builder() -.environment(Environment.custom("https://{YOUR_AUDIENCE}")) -.addHeader("Authorization", () -> "Bearer " + tokenSupplier.get()) -.build(); - -ManagementApi client = new ManagementApi(clientOptions); - -``` - -#### Builder options comparison - -| Option | v2 | v3 | -|--------|----|----| -| Domain/URL | `newBuilder(domain, token)` | `.url("https://domain/api/v2")` | -| Token | Constructor parameter | `.token(token)` | -| Timeout | Via `HttpOptions` | `.timeout(seconds)` | -| Max retries | Via `HttpOptions` | `.maxRetries(count)` | -| Custom HTTP client | `.withHttpClient(Auth0HttpClient)` | `.httpClient(OkHttpClient)` | -| Custom headers | Not directly supported | `.addHeader(name, value)` | - -### Sub-client organization - -V3 introduces a hierarchical sub-client structure. Operations on related resources are now accessed through nested clients instead of methods on a flat entity class. - -**v2:** -```java -// All user operations on UsersEntity -Request userRequest = mgmt.users().get("user_id", new UserFilter()); -Request> permissionsRequest = mgmt.users().getPermissions("user_id", new PermissionsFilter()); -Request> rolesRequest = mgmt.users().getRoles("user_id", new RolesFilter()); -Request logsRequest = mgmt.users().getLogEvents("user_id", new LogEventFilter()); -``` - -**v3:** -```java -// Operations organized into sub-clients -GetUserResponseContent user = client.users().get("user_id"); -SyncPagingIterable permissions = client.users().permissions().list("user_id"); -SyncPagingIterable roles = client.users().roles().list("user_id"); -SyncPagingIterable logs = client.users().logs().list("user_id"); -``` - -#### Common sub-client mappings - -| v2 Method | v3 Sub-client | -|-----------|---------------| -| `mgmt.users().getPermissions()` | `client.users().permissions().list()` | -| `mgmt.users().getRoles()` | `client.users().roles().list()` | -| `mgmt.users().getLogEvents()` | `client.users().logs().list()` | -| `mgmt.users().getOrganizations()` | `client.users().organizations().list()` | -| `mgmt.users().link()` | `client.users().identities().link()` | -| `mgmt.users().unlink()` | `client.users().identities().delete()` | -| `mgmt.users().deleteMultifactorProvider()` | `client.users().multifactor().deleteProvider()` | -| `mgmt.organizations().getMembers()` | `client.organizations().members().list()` | -| `mgmt.organizations().getInvitations()` | `client.organizations().invitations().list()` | -| `mgmt.organizations().getEnabledConnections()` | `client.organizations().enabledConnections().list()` | -| `mgmt.actions().getVersions()` | `client.actions().versions().list()` | -| `mgmt.actions().getTriggerBindings()` | `client.actions().triggers().bindings().list()` | -| `mgmt.guardian().getFactors()` | `client.guardian().factors().list()` | -| `mgmt.branding().getUniversalLoginTemplate()` | `client.branding().templates().getUniversalLogin()` | -| `mgmt.connections().getScimConfiguration()` | `client.connections().scimConfiguration().get()` | - -### Request and response patterns - -V3 uses type-safe request content objects with builders instead of domain objects or filter parameters. - -**v2:** -```java -import com.auth0.json.mgmt.users.User; -import com.auth0.net.Request; - -// Creating a user -User user = new User("Username-Password-Authentication"); -user.setEmail("test@example.com"); -user.setPassword("password123".toCharArray()); - -Request request = mgmt.users().create(user); -User createdUser = request.execute().getBody(); -``` - -**v3:** -```java -import com.auth0.client.mgmt.types.CreateUserRequestContent; -import com.auth0.client.mgmt.types.CreateUserResponseContent; - -// Creating a user -CreateUserResponseContent user = client.users().create( - CreateUserRequestContent - .builder() - .connection("Username-Password-Authentication") - .email("test@example.com") - .password("password123") - .build() -); -``` - -#### Key differences - -| Aspect | v2 | v3 | -|--------|----|----| -| Request building | Domain objects with setters | Builder pattern with `*RequestContent` types | -| Response type | `Request` requiring `.execute().getBody()` | Direct return of response object | -| Filtering | Filter classes (e.g., `UserFilter`) | `*RequestParameters` builder classes | -| Execution | Explicit `.execute()` call | Implicit execution on method call | - -### Pagination - -V3 introduces `SyncPagingIterable` for automatic pagination, replacing the manual `Request` pattern. - -**v2:** -```java -import com.auth0.json.mgmt.users.UsersPage; -import com.auth0.client.mgmt.filter.UserFilter; - -Request request = mgmt.users().list(new UserFilter().withPage(0, 50)); -UsersPage page = request.execute().getBody(); - -for (User user : page.getItems()) { - System.out.println(user.getEmail()); -} - -// Manual pagination -while (page.getNext() != null) { - request = mgmt.users().list(new UserFilter().withPage(page.getNext(), 50)); - page = request.execute().getBody(); - for (User user : page.getItems()) { - System.out.println(user.getEmail()); - } -} -``` - -**v3:** -```java -import com.auth0.client.mgmt.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.UserResponseSchema; -import com.auth0.client.mgmt.types.ListUsersRequestParameters; - -// Automatic iteration through all pages -SyncPagingIterable users = client.users().list( - ListUsersRequestParameters - .builder() - .perPage(50) - .build() -); - -for (UserResponseSchema user : users) { - System.out.println(user.getEmail()); -} - -// Or manual page control -List pageItems = users.getItems(); -while (users.hasNext()) { - pageItems = users.nextPage().getItems(); - // process page -} -``` - -### Exception handling - -V3 uses a unified `ManagementApiException` class instead of the v2 exception hierarchy. - -**v2:** -```java -import com.auth0.exception.Auth0Exception; -import com.auth0.exception.APIException; -import com.auth0.exception.RateLimitException; - -try { - User user = mgmt.users().get("user_id", null).execute().getBody(); -} catch (RateLimitException e) { - // Rate limited - long retryAfter = e.getLimit(); -} catch (APIException e) { - int statusCode = e.getStatusCode(); - String error = e.getError(); - String description = e.getDescription(); -} catch (Auth0Exception e) { - // Network or other errors -} -``` - -**v3:** -```java -import com.auth0.client.mgmt.core.ManagementApiException; - -try { - GetUserResponseContent user = client.users().get("user_id"); -} catch (ManagementApiException e) { - int statusCode = e.statusCode(); - Object body = e.body(); - Map> headers = e.headers(); - String message = e.getMessage(); -} -``` - -### Accessing raw HTTP responses - -V3 provides access to full HTTP response metadata via `withRawResponse()`. - -**v2:** -```java -// Response wrapper provided status code -Response response = mgmt.users().get("user_id", null).execute(); -int statusCode = response.getStatusCode(); -User user = response.getBody(); -``` - -**v3:** -```java -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; - -// Use withRawResponse() to access headers and metadata -ManagementApiHttpResponse response = client.users() - .withRawResponse() - .get("user_id"); - -GetUserResponseContent user = response.body(); -Map> headers = response.headers(); -``` - -### Request-level configuration - -V3 allows per-request configuration through `RequestOptions`. - -**v2:** -```java -// Most configuration was at client level only -// Request-level headers required creating a new request manually -Request request = mgmt.users().get("user_id", null); -request.addHeader("X-Custom-Header", "value"); -User user = request.execute().getBody(); -``` - -**v3:** -```java -import com.auth0.client.mgmt.core.RequestOptions; - -GetUserResponseContent user = client.users().get( - "user_id", - GetUserRequestParameters.builder().build(), - RequestOptions.builder() - .timeout(10) - .maxRetries(1) - .addHeader("X-Custom-Header", "value") - .build() -); -``` - -### Type changes - -V3 uses generated type classes located in `com.auth0.client.mgmt.types` instead of the hand-written POJOs in `com.auth0.json.mgmt`. - -**v2:** -```java -import com.auth0.json.mgmt.users.User; -import com.auth0.json.mgmt.roles.Role; -import com.auth0.json.mgmt.organizations.Organization; -``` - -**v3:** -```java -import com.auth0.client.mgmt.types.UserResponseSchema; -import com.auth0.client.mgmt.types.CreateUserRequestContent; -import com.auth0.client.mgmt.types.CreateUserResponseContent; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.types.Organization; -``` - -Type naming conventions in v3: -- Request body types: `*RequestContent` (e.g., `CreateUserRequestContent`) -- Response types: `*ResponseContent` or `*ResponseSchema` (e.g., `GetUserResponseContent`, `UserResponseSchema`) -- Query parameters: `*RequestParameters` (e.g., `ListUsersRequestParameters`) - -All types use immutable builders: - -```java -// v3 type construction -CreateUserRequestContent request = CreateUserRequestContent - .builder() - .connection("Username-Password-Authentication") - .email("test@example.com") - .password("secure-password") - .build(); -``` diff --git a/README.md b/README.md index 8f24453e..69753941 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ > > While this change won't affect most developers, if you have implemented a dependency signature validation step in your build process, you may notice a warning that past releases can't be verified. This is expected, and a result of the key rotation process. Updating to the latest version will resolve this for you. > -> We are improving our API specs which introduces minor breaking changes. +> We are improving our API specs which introduces minor breaking changes. Expect major releases more frequently than usual while this work continues. Each one ships with a migration guide, and breaking changes are kept small and mechanical. ![A Java client library for the Auth0 Authentication and Management APIs.](https://cdn.auth0.com/website/sdks/banners/auth0-java-banner.png) @@ -20,7 +20,8 @@ ## Documentation - [Reference](./reference.md) - code samples for Management APIs. - [Examples](./EXAMPLES.md) - code samples for common auth0-java scenarios. -- [Migration Guide](./MIGRATION_GUIDE.md) - guidance for updating your application to use version 3 of auth0-java. +- [v5 Migration Guide](./v5_MIGRATION_GUIDE.md) - guidance for updating your application from version 4 to version 5 of auth0-java. +- [v4 Migration Guide](./v4_MIGRATION_GUIDE.md) - guidance for updating your application from version 3 to version 4 of auth0-java. - [Docs site](https://www.auth0.com/docs) - explore our docs site and learn more about Auth0. ## Getting Started @@ -39,14 +40,14 @@ Add the dependency via Maven: com.auth0 auth0 - 3.10.0 + 5.6.0 ``` or Gradle: ```gradle -implementation 'com.auth0:auth0:3.10.0' +implementation 'com.auth0:auth0:5.6.0' ``` ### Configure the SDK @@ -63,7 +64,7 @@ AuthAPI auth = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CL #### Management API Client -The Management API client is based on the [Management API Docs](https://auth0.com/docs/api/management/v2). In v3, the Management API is Fern-generated and uses `ManagementApi` as the entry point. +The Management API client is based on the [Management API Docs](https://auth0.com/docs/api/management/v2). The Management API is Fern-generated and uses `ManagementApi` as the entry point. Create a `ManagementApi` instance with a static token: diff --git a/build.gradle b/build.gradle index c413cb15..0e427fd8 100644 --- a/build.gradle +++ b/build.gradle @@ -22,14 +22,14 @@ logger.lifecycle("Using version ${version} for ${name} group $group") dependencies { // Core dependencies api 'com.squareup.okhttp3:okhttp:5.2.1' - api 'com.fasterxml.jackson.core:jackson-databind:2.21.4' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.4' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.4' + api 'com.fasterxml.jackson.core:jackson-databind:2.22.4' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.22.4' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.4' // Dependencies for legacy management code from auth0-real implementation 'com.squareup.okhttp3:logging-interceptor:5.2.1' - implementation 'com.auth0:java-jwt:4.4.0' - implementation 'com.auth0:jwks-rsa:0.22.1' + implementation 'com.auth0:java-jwt:4.6.2' + implementation 'com.auth0:jwks-rsa:0.24.2' implementation 'net.jodah:failsafe:2.4.4' // Test dependencies @@ -49,6 +49,16 @@ java { sourceCompatibility = 1.8 targetCompatibility = 1.8 +// The Management API client is Fern-generated (~4000 types). javac's type +// inference over that tree exhausts the compiler's default heap. Because the +// Java 8 toolchain differs from the JDK running Gradle, javac is forked into a +// separate process, so org.gradle.jvmargs (the daemon heap) does not apply — +// the heap must be set on the forked compiler here. +tasks.withType(JavaCompile).configureEach { + options.fork = true + options.forkOptions.memoryMaximumSize = '2g' +} + jar { manifest { attributes 'Automatic-Module-Name': 'com.auth0.java' @@ -58,6 +68,9 @@ jar { tasks.withType(Javadoc) { failOnError false options.addStringOption('Xdoclint:none', '-quiet') + // Fern-generated POJO types are documented via reference.md; excluding them + // keeps the javadoc JAR within Maven Central's monthly size quota. + exclude 'com/auth0/client/mgmt/**/types/**' } spotless { diff --git a/gradle.properties b/gradle.properties index cb426bef..724f91f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,7 @@ +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + GROUP=com.auth0 POM_ARTIFACT_ID=auth0 VERSION_NAME=3.0.0 diff --git a/reference.md b/reference.md index 18e66e02..29c955ca 100644 --- a/reference.md +++ b/reference.md @@ -30,24 +30,12 @@ Retrieve all actions. client.actions().list( ListActionsRequestParameters .builder() - .triggerId( - OptionalNullable.of(ActionTriggerTypeEnum.POST_LOGIN) - ) - .actionName( - OptionalNullable.of("actionName") - ) - .deployed( - OptionalNullable.of(true) - ) - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .installed( - OptionalNullable.of(true) - ) + .triggerId(ActionTriggerTypeEnum.POST_LOGIN) + .actionName("actionName") + .deployed(true) + .page(1) + .perPage(1) + .installed(true) .build() ); ``` @@ -324,9 +312,7 @@ client.actions().delete( "id", DeleteActionRequestParameters .builder() - .force( - OptionalNullable.of(true) - ) + .force(true) .build() ); ``` @@ -600,6 +586,341 @@ client.actions().test( + + + + +## Agents +
client.agents.list() -> SyncPagingIterable<AgentResponseContent> +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get agents +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.agents().list( + ListAgentsRequestParameters + .builder() + .from("from") + .take(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+
+
+ + +
+
+
+ +
client.agents.create(request) -> AgentResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.agents().create( + CreateAgentRequestContent + .builder() + .name("name") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `String` — The agent name. Cannot contain <, >, or null bytes. + +
+
+ +
+
+ +**clientId:** `Optional` — Optional client ID to associate with the agent + +
+
+ +
+
+ +**externalAgentId:** `Optional` — Optional external identifier for the agent. Immutable after creation. Must be unique within the tenant. + +
+
+ +
+
+ +**metadata:** `Optional>` + +
+
+
+
+ + +
+
+
+ +
client.agents.read(id) -> AgentResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.agents().read("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The agent ID + +
+
+
+
+ + +
+
+
+ +
client.agents.delete(id) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.agents().delete("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The agent ID + +
+
+
+
+ + +
+
+
+ +
client.agents.update(id, request) -> AgentResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an agent +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.agents().update( + "id", + PatchAgentRequestParameters + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The agent ID + +
+
+ +
+
+ +**name:** `Optional` — The agent name. Cannot contain <, >, or null bytes. + +
+
+ +
+
+ +**metadata:** `Optional>` — Arbitrary key-value metadata for the agent. Pass null to clear all metadata. + +
+
+
+
+ +
@@ -757,27 +1078,14 @@ Retrieve a list of [client grants](https://auth0.com/docs/get-started/applicatio client.clientGrants().list( ListClientGrantsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .audience( - OptionalNullable.of("audience") - ) - .clientId( - OptionalNullable.of("client_id") - ) - .allowAnyOrganization( - OptionalNullable.of(true) - ) - .subjectType( - OptionalNullable.of(ClientGrantSubjectTypeEnum.CLIENT) - ) - .defaultFor( - OptionalNullable.of(ClientGrantDefaultForEnum.THIRD_PARTY_CLIENTS) - ) + .includeTotals(true) + .from("from") + .take(1) + .audience("audience") + .clientId("client_id") + .allowAnyOrganization(true) + .subjectType(ClientGrantSubjectTypeEnum.CLIENT) + .defaultFor(ClientGrantDefaultForEnum.THIRD_PARTY_CLIENTS) .build() ); ``` @@ -794,6 +1102,14 @@ client.clientGrants().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -973,6 +1289,120 @@ client.clientGrants().create(
+ + + + +
client.clientGrants.search() -> SyncPagingIterable&lt;ClientGrantResponseContent&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. +Results may not reflect recent updates immediately. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clientGrants().search( + SearchClientGrantsRequestParameters + .builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .fields("fields") + .includeFields(true) + .take(1) + .from("from") + .sort(ClientGrantSortFieldEnum.AUDIENCE) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `Optional` — Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: `audience eq "https://api.example.com"`, `client_id eq "cli_abc"`, `subject_type eq "client"`, `allow_any_organization eq true`, `default_for eq "third_party_clients"`, `audience co "example" and organization_id eq "org_123"`. SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or.

Supported Fields:
  • audience - Filter by audience (eq, ne, sw, co, ew, pr)
  • client_id - Filter by client ID (eq, ne, sw, pr)
  • subject_type - Filter by subject type (eq, ne, sw, pr)
  • allow_any_organization - Filter by allow_any_organization (eq, ne, pr)
  • organization_id - Filter by organization ID (eq, ne, sw, pr)
  • updated_at - Filter by last update date (eq, ne, gt, ge, lt, le, pr)
  • default_for - Filter by default grant group (eq, ne, sw, pr)
Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + +
+
+ +
+
+ +**parser:** `Optional` — Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + +
+
+ +
+
+ +**fields:** `Optional` — Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. + +
+
+ +
+
+ +**includeFields:** `Optional` — Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified. + +
+
+ +
+
+ +**take:** `Optional` — Maximum number of results to return per page (1-100). Defaults to 50. + +
+
+ +
+
+ +**from:** `Optional` — Cursor for the next page of results. Use the value from the next field in the previous response. + +
+
+ +
+
+ +**sort:** `Optional` — Field name to sort results by in ascending order. Defaults to insertion order (oldest first) if not provided. + +
+
+
+
+ +
@@ -1181,6 +1611,369 @@ client.clientGrants().update( + + + + +## ClientProfiles +
client.clientProfiles.list() -> SyncPagingIterable&lt;ClientProfile&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clientProfiles().list( + ListClientProfilesRequestParameters + .builder() + .from("from") + .take(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+
+
+ + +
+
+
+ +
client.clientProfiles.create(request) -> ClientProfile +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clientProfiles().create( + CreateClientProfileRequestContent + .builder() + .name("name") + .clientConfiguration( + ClientProfileClientConfiguration + .builder() + .build() + ) + .applyPolicy( + ClientProfileApplyPolicy + .builder() + .externalMetadataType(ClientProfileApplyPolicyExternalMetadataTypeEnum.CIMD) + .externalMetadataCreatedBy(ClientProfileApplyPolicyExternalMetadataCreatedByEnum.CLIENT) + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `String` + +
+
+ +
+
+ +**description:** `Optional` + +
+
+ +
+
+ +**clientConfiguration:** `ClientProfileClientConfiguration` + +
+
+ +
+
+ +**applyPolicy:** `ClientProfileApplyPolicy` + +
+
+
+
+ + +
+
+
+ +
client.clientProfiles.get(id) -> ClientProfile +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clientProfiles().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the client profile. + +
+
+
+
+ + +
+
+
+ +
client.clientProfiles.delete(id) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clientProfiles().delete("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the client profile. + +
+
+
+
+ + +
+
+
+ +
client.clientProfiles.update(id, request) -> ClientProfile +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clientProfiles().update( + "id", + UpdateClientProfileRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the client profile. + +
+
+ +
+
+ +**name:** `Optional` + +
+
+ +
+
+ +**description:** `Optional` + +
+
+ +
+
+ +**clientConfiguration:** `Optional` + +
+
+ +
+
+ +**applyPolicy:** `Optional` + +
+
+
+
+ +
@@ -1211,7 +2004,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`, @@ -1240,36 +2033,17 @@ For more information, read [Applications in Auth0](https://www.auth0.com/docs/ge client.clients().list( ListClientsRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .isGlobal( - OptionalNullable.of(true) - ) - .isFirstParty( - OptionalNullable.of(true) - ) - .appType( - OptionalNullable.of("app_type") - ) - .externalClientId( - OptionalNullable.of("external_client_id") - ) - .q( - OptionalNullable.of("q") - ) + .fields("fields") + .includeFields(true) + .page(1) + .perPage(1) + .includeTotals(true) + .isGlobal(true) + .isFirstParty(true) + .appType("app_type") + .externalClientId("external_client_id") + .agentId("agent_id") + .q("q") .build() ); ``` @@ -1350,7 +2124,15 @@ client.clients().list(
-**externalClientId:** `Optional` — Optional filter by the Client ID Metadata Document URI for CIMD-registered clients. +**externalClientId:** `Optional` — Optional filter by the Client ID Metadata Document URI for CIMD-registered clients. + +
+
+ +
+
+ +**agentId:** `Optional` — Optional filter by the agent associated with the client.
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Only fields, include_fields, page, per_page, and include_totals are supported alongside it
  • Checkpoint pagination (from, take) is not supported
@@ -1834,6 +2616,30 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**identityAssertionAuthorizationGrant:** `Optional` + +
+
+ +
+
+ +**anonymousSessions:** `Optional` + +
+
+ +
+
+ +**enforceAnonSessionTransferNetworkBinding:** `Optional` + +
+
+ +
+
+ **thirdPartySecurityMode:** `Optional`
@@ -1858,6 +2664,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**b2BIntegrationConfiguration:** `Optional` + +
+
+ +
+
+ **myOrganizationConfiguration:** `Optional`
@@ -1866,8 +2680,32 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**googleAccountLinking:** `Optional` + +
+
+ +
+
+ **asyncApprovalNotificationChannels:** `Optional>` +
+
+ +
+
+ +**agentId:** `Optional` — ID of the agent to associate with this client. + +
+
+ +
+
+ +**oidcSupport:** `Optional` +
@@ -2006,6 +2844,130 @@ client.clients().registerCimdClient(
+ +
+ + +
client.clients.search() -> SyncPagingIterable&lt;ClientSearchResponse&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. +Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). +This endpoint provides an alternative to the standard GET /clients endpoint with better performance +for complex queries. Results may not reflect recent updates immediately. + +- This endpoint only supports `read:clients` and `read:client_summary` scopes. The `read:client_keys` and `read:client_credentials` scopes are not supported. +- The following fields are never returned by this endpoint: + - `client_secret` + - `encryption_key` + - `signing_keys` + - `owners` + - `addons` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.clients().search( + SearchClientsRequestParameters + .builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .fields("fields") + .includeFields(true) + .take(1) + .from("from") + .sort(ClientSortFieldEnum.NAME) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `Optional` — Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: `name eq "Auth0"`, `name sw "auth" and app_type eq "spa"`. SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or.

Supported Fields:
  • client_id - Auth0 client ID (case-sensitive, exact match)
  • external_client_id - URL of the Client ID Metadata Document (CIMD); case-sensitive, exact match
  • name - Client name (supports contains, starts-with, ends-with operators; sortable)
  • app_type - Application type (e.g. "spa", "native", "non_interactive")
  • is_first_party - Whether the client is first-party (boolean)
  • updated_at - Last update timestamp (supports date range operators; sortable)
  • metadata.{key} - Filter by client metadata key-value pairs (max 2-level key depth, values indexed up to 64 characters)
  • client_grant.organization_id - Filter by associated organization ID
  • client_grant.allow_any_organization - Filter by allow any organization setting
Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + +
+
+ +
+
+ +**parser:** `Optional` — Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + +
+
+ +
+
+ +**fields:** `Optional` — Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. Maximum 50 fields. + +
+
+ +
+
+ +**includeFields:** `Optional` — Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified. + +
+
+ +
+
+ +**take:** `Optional` — Maximum number of results to return per page (1-100). Defaults to 50. + +
+
+ +
+
+ +**from:** `Optional` — Cursor for the next page of results. Use the value from the next field in the previous response. + +
+
+ +
+
+ +**sort:** `Optional` — Field name to sort results by in ascending order. Defaults to insertion order (oldest first) if not provided. + +
+
+
+
+ +
@@ -2035,7 +2997,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`, @@ -2064,12 +3026,8 @@ client.clients().get( "id", GetClientRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -2463,6 +3421,30 @@ client.clients().update(
+**identityAssertionAuthorizationGrant:** `Optional` + +
+
+ +
+
+ +**anonymousSessions:** `Optional` + +
+
+ +
+
+ +**enforceAnonSessionTransferNetworkBinding:** `Optional` + +
+
+ +
+
+ **formTemplate:** `Optional` — Form template for WS-Federation protocol
@@ -2643,6 +3625,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**b2BIntegrationConfiguration:** `Optional` + +
+
+ +
+
+ **myOrganizationConfiguration:** `Optional`
@@ -2651,6 +3641,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**googleAccountLinking:** `Optional` + +
+
+ +
+
+ **asyncApprovalNotificationChannels:** `Optional>`
@@ -2669,6 +3667,22 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso **redirectionPolicy:** `Optional` + +
+ +
+
+ +**agentId:** `Optional` — ID of the agent to associate with this client, or null to remove the association. + +
+
+ +
+
+ +**oidcSupport:** `Optional` +
@@ -2768,12 +3782,8 @@ Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagina client.connectionProfiles().list( ListConnectionProfileRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -2899,6 +3909,22 @@ client.connectionProfiles().create( **strategyOverrides:** `Optional` + +
+ +
+
+ +**provisioning:** `Optional` + +
+
+ +
+
+ +**crossAppAccessResourceApp:** `Optional` +
@@ -3207,6 +4233,22 @@ client.connectionProfiles().update( **strategyOverrides:** `Optional` + +
+ +
+
+ +**provisioning:** `Optional` + +
+
+ +
+
+ +**crossAppAccessResourceApp:** `Optional` +
@@ -3264,21 +4306,12 @@ To search by checkpoint, use the following parameters: client.connections().list( ListConnectionsQueryParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .name( - OptionalNullable.of("name") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .includeTotals(true) + .from("from") + .take(1) + .name("name") + .fields("fields") + .includeFields(true) .strategy( Arrays.asList(ConnectionStrategyEnum.AD) ) @@ -3298,6 +4331,14 @@ client.connections().list(
+**includeTotals:** `Optional` — true if a query summary must be included in the result, false otherwise. Not returned when using checkpoint pagination. Default false. + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -3490,6 +4531,14 @@ client.connections().create( **crossAppAccessRequestingApp:** `Optional` + +
+ +
+
+ +**crossAppAccessResourceApp:** `Optional` +
@@ -3531,12 +4580,8 @@ client.connections().get( "id", GetConnectionRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -3651,7 +4696,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. @@ -3768,6 +4813,14 @@ client.connections().update( **crossAppAccessRequestingApp:** `Optional` + + + +
+
+ +**crossAppAccessResourceApp:** `Optional` +
@@ -3863,18 +4916,10 @@ Retrieve details on [custom domains](https://auth0.com/docs/custom-domains). client.customDomains().list( ListCustomDomainsRequestParameters .builder() - .q( - OptionalNullable.of("q") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .sort( - OptionalNullable.of("sort") - ) + .q("q") + .fields("fields") + .includeFields(true) + .sort("sort") .build() ); ``` @@ -4521,30 +5566,14 @@ Retrieve device credential information (`public_key`, `refresh_token`, or `rotat client.deviceCredentials().list( ListDeviceCredentialsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .userId( - OptionalNullable.of("user_id") - ) - .clientId( - OptionalNullable.of("client_id") - ) - .type( - OptionalNullable.of(DeviceCredentialTypeEnum.PUBLIC_KEY) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .fields("fields") + .includeFields(true) + .userId("user_id") + .clientId("client_id") + .type(DeviceCredentialTypeEnum.PUBLIC_KEY) .build() ); ``` @@ -4617,7 +5646,7 @@ client.deviceCredentials().list(
-**type:** `Optional` — Type of credentials to retrieve. Must be `public_key`, `refresh_token` or `rotating_refresh_token`. The property will default to `refresh_token` when paging is requested +**type:** `Optional` — Type of credentials to retrieve. Must be `public_key`, `refresh_token` or `rotating_refresh_token`. If none is provided a combined list of `refresh_tokens` and `public_keys` will be returned (and no `rotating_refresh_token`), in this case `page`, `per_page` and `include_totals` will be ignored.
@@ -4811,6 +5840,21 @@ client.emailTemplates().create( CreateEmailTemplateRequestContent .builder() .template(EmailTemplateNameEnum.VERIFY_EMAIL) + .body( + Nullable.ofNull() + ) + .from( + Nullable.ofNull() + ) + .subject( + Nullable.ofNull() + ) + .syntax( + Nullable.ofNull() + ) + .enabled( + Nullable.ofNull() + ) .build() ); ``` @@ -4989,6 +6033,21 @@ client.emailTemplates().set( SetEmailTemplateRequestContent .builder() .template(EmailTemplateNameEnum.VERIFY_EMAIL) + .body( + Nullable.ofNull() + ) + .from( + Nullable.ofNull() + ) + .subject( + Nullable.ofNull() + ) + .syntax( + Nullable.ofNull() + ) + .enabled( + Nullable.ofNull() + ) .build() ); ``` @@ -5237,12 +6296,8 @@ client.emailTemplates().update( client.eventStreams().list( ListEventStreamsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -5520,7 +6575,7 @@ client.eventStreams().test( "id", CreateEventStreamTestEventRequestContent .builder() - .eventType(EventStreamTestEventTypeEnum.GROUP_CREATED) + .eventType(EventStreamTestEventTypeEnum.CONNECTION_CREATED) .build() ); ``` @@ -5596,14 +6651,10 @@ Subscribe to events via Server-Sent Events (SSE) client.events().subscribe( SubscribeEventsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .fromTimestamp( - OptionalNullable.of("from_timestamp") - ) + .from("from") + .fromTimestamp("from_timestamp") .eventType( - Arrays.asList(EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED) + Arrays.asList(EventStreamSubscribeEventsEventTypeEnum.CONNECTION_CREATED) ) .build() ); @@ -5666,18 +6717,10 @@ client.events().subscribe( client.flows().list( ListFlowsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .synchronous( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .synchronous(true) .hydrate( Arrays.asList(ListFlowsRequestParametersHydrateEnum.FORM_COUNT) ) @@ -5968,15 +7011,9 @@ client.flows().update( client.forms().list( ListFormsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .hydrate( Arrays.asList(FormsRequestParametersHydrateEnum.FLOW_COUNT) ) @@ -6369,24 +7406,12 @@ Retrieve the [grants](https://auth0.com/docs/api-auth/which-oauth-flow-to-use) a client.userGrants().list( ListUserGrantsRequestParameters .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .userId( - OptionalNullable.of("user_id") - ) - .clientId( - OptionalNullable.of("client_id") - ) - .audience( - OptionalNullable.of("audience") - ) + .perPage(1) + .page(1) + .includeTotals(true) + .userId("user_id") + .clientId("client_id") + .audience("audience") .build() ); ``` @@ -6599,30 +7624,15 @@ List all groups in your tenant. client.groups().list( ListGroupsRequestParameters .builder() - .connectionId( - OptionalNullable.of("connection_id") - ) - .name( - OptionalNullable.of("name") - ) - .externalId( - OptionalNullable.of("external_id") - ) - .search( - OptionalNullable.of("search") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .connectionId("connection_id") + .name("name") + .externalId("external_id") + .search("search") + .fields("fields") + .includeFields(true) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -6687,6 +7697,14 @@ client.groups().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). The returned total reflects at most 1,000 results. + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -6811,6 +7829,132 @@ client.groups().delete("id");
+ + + + +## Guardian +
client.guardian.get() -> GetGuardianSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +TODO: Link this endpoint to relevant documentation when available. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.guardian().get(); +``` +
+
+
+
+ + +
+
+
+ +
client.guardian.set(request) -> SetGuardianSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a tenant's guardian settings such as Remember Me +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.guardian().set( + SetGuardianSettingsRequestContent + .builder() + .displayRememberMeCheckbox(true) + .rememberMeDefaultValue(true) + .mfaSessionInactivityTimeout(1) + .mfaSessionOverallTimeout(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**displayRememberMeCheckbox:** `Boolean` — Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login. + +
+
+ +
+
+ +**rememberMeDefaultValue:** `Boolean` — Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login. + +
+
+ +
+
+ +**mfaSessionInactivityTimeout:** `Integer` — Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout. + +
+
+ +
+
+ +**mfaSessionOverallTimeout:** `Integer` — Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days. + +
+
+
+
+ +
@@ -6846,24 +7990,12 @@ Retrieve all [hooks](https://auth0.com/docs/hooks). Accepts a list of fields to client.hooks().list( ListHooksRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .enabled( - OptionalNullable.of(true) - ) - .fields( - OptionalNullable.of("fields") - ) - .triggerId( - OptionalNullable.of(HookTriggerIdEnum.CREDENTIALS_EXCHANGE) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .enabled(true) + .fields("fields") + .triggerId(HookTriggerIdEnum.CREDENTIALS_EXCHANGE) .build() ); ``` @@ -7056,9 +8188,7 @@ client.hooks().get( "id", GetHookRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) + .fields("fields") .build() ); ``` @@ -8163,27 +9293,13 @@ Auth0 [limits the number of logs](https://auth0.com/docs/logs/retrieve-log-event client.logs().list( ListLogsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .sort( - OptionalNullable.of("sort") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .search( - OptionalNullable.of("search") - ) + .page(1) + .perPage(1) + .sort("sort") + .fields("fields") + .includeFields(true) + .includeTotals(true) + .search("search") .build() ); ``` @@ -8349,15 +9465,9 @@ Get all access control list entries for your client. client.networkAcls().list( ListNetworkAclsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -8847,15 +9957,11 @@ To search by checkpoint, use the following parameters: client.organizations().list( ListOrganizationsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .sort( - OptionalNullable.of("sort") - ) + .includeTotals(true) + .from("from") + .take(1) + .sort("sort") + .includeClientAssociationFor("include_client_association_for") .build() ); ``` @@ -8872,6 +9978,14 @@ client.organizations().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -8890,6 +10004,14 @@ client.organizations().list( **sort:** `Optional` — Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1. We currently support sorting by the following fields: name, display_name and created_at. + +
+ +
+
+ +**includeClientAssociationFor:** `Optional` — Client ID. When set, each returned organization that has an association with this client gains a client object describing it; organizations without one omit the field. +
@@ -8989,6 +10111,22 @@ client.organizations().create( **tokenQuota:** `Optional` + + + +
+
+ +**thirdPartyClientAccess:** `Optional` + +
+
+ +
+
+ +**isAppEntitlementActive:** `Optional` — Whether app entitlement is active for this organization. +
@@ -9049,6 +10187,115 @@ client.organizations().getByName("name"); + + + + +
client.organizations.search() -> SyncPagingIterable&lt;SearchOrganization&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve details of organizations matching a search criteria. It is possible to: + +- Specify a search criteria for organizations +- Search via `name` +- Search via `display_name` +- Substring matching (`contains` and `ends-with`) requires at least 3 characters +- Use wildcards + +The `q` query parameter can be used to get organizations that match the specified criteria on `name` OR `display_name`. + +This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the `parser` parameter to specify "scim" or "lucene" syntax (default: "lucene"). + +Results are eventually consistent and may not reflect recent updates immediately. + +**Sortable fields:** `name`, `display_name`, `created_at` (ascending only). Defaults to insertion order (oldest first). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().search( + SearchOrganizationsRequestParameters + .builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .take(1) + .from("from") + .sort(OrganizationSortFieldEnum.NAME) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `Optional` — Filter expression in SCIM or Lucene syntax (depending on parser parameter, default: Lucene). Lucene examples: `name:acme*`, `display_name:*auth*`. SCIM examples: `name eq "Auth0"`, `display_name sw "auth" and created_at gt "2024-01-01"`. SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or.

Supported Fields:
  • id - Organization ID (case-sensitive, exact match)
  • name - Organization name (supports contains, starts-with, ends-with operators; sortable)
  • display_name - Organization display name (supports contains, starts-with, ends-with operators; sortable)
  • created_at - Creation timestamp (supports date range operators; sortable)
  • metadata.{key} - Filter by organization metadata key-value pairs
Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + +
+
+ +
+
+ +**parser:** `Optional` — Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + +
+
+ +
+
+ +**take:** `Optional` — Maximum number of results to return per page (1-100). Defaults to 50. + +
+
+ +
+
+ +**from:** `Optional` — Cursor for the next page of results. Use the value from the next field in the previous response. + +
+
+ +
+
+ +**sort:** `Optional` — Field name to sort results by in ascending order only. Defaults to insertion order (oldest first) if not provided. + +
+
+
+
+ +
@@ -9252,6 +10499,315 @@ client.organizations().update( **tokenQuota:** `Optional` + + + +
+
+ +**thirdPartyClientAccess:** `Optional` + +
+
+ +
+
+ +**isAppEntitlementActive:** `Optional` — Whether app entitlement is active for this organization. + +
+
+ + + + + + + + +## Portals +
client.portals.list() -> ListPortalsResponseContent +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.portals().list(); +``` +
+
+
+
+ + +
+
+
+ +
client.portals.create(request) -> Portal +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.portals().create( + CreatePortalRequestContent + .builder() + .slug("slug") + .name("name") + .client( + PortalClientSecretPostRequest + .builder() + .tokenEndpointAuthMethod(PortalClientSecretPostRequestTokenEndpointAuthMethod.CLIENT_SECRET_POST) + .clientId("client_id") + .clientSecret("client_secret") + .build() + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**slug:** `String` + +
+
+ +
+
+ +**name:** `String` + +
+
+ +
+
+ +**client:** `PortalClientSecretPostRequest` + +
+
+ +
+
+ +**navigation:** `Optional` + +
+
+ +
+
+ +**pages:** `Optional` + +
+
+ +
+
+ +**customCode:** `Optional` + +
+
+
+
+ + +
+
+
+ +
client.portals.get(id) -> Portal +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.portals().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` + +
+
+
+
+ + +
+
+
+ +
client.portals.delete(id) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.portals().delete("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` + +
+
+
+
+ + +
+
+
+ +
client.portals.update(id, request) -> Portal +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.portals().update( + "id", + UpdatePortalRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` + +
+
+ +
+
+ +**slug:** `Optional` + +
+
+ +
+
+ +**name:** `Optional` + +
+
+ +
+
+ +**client:** `Optional` + +
+
+ +
+
+ +**navigation:** `Optional` + +
+
+ +
+
+ +**pages:** `Optional` + +
+
+ +
+
+ +**customCode:** `Optional` +
@@ -9393,21 +10949,11 @@ client.prompts().updateSettings( client.rateLimitPolicies().list( ListRateLimitPoliciesRequestParameters .builder() - .resource( - OptionalNullable.of(RateLimitPolicyResourceEnum.OAUTH_AUTHENTICATION_API) - ) - .consumer( - OptionalNullable.of(RateLimitPolicyConsumerEnum.CLIENT) - ) - .consumerSelector( - OptionalNullable.of("consumer_selector") - ) - .take( - OptionalNullable.of(1) - ) - .from( - OptionalNullable.of("from") - ) + .resource(RateLimitPolicyResourceEnum.OAUTH_AUTHENTICATION_API) + .consumer(RateLimitPolicyConsumerEnum.CLIENT) + .consumerSelector("consumer_selector") + .take(1) + .from("from") .build() ); ``` @@ -9720,21 +11266,11 @@ client.refreshTokens().list( GetRefreshTokensRequestParameters .builder() .userId("user_id") - .clientId( - OptionalNullable.of("client_id") - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .clientId("client_id") + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -10091,18 +11627,10 @@ Retrieve details of all APIs associated with your tenant. client.resourceServers().list( ListResourceServerRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .includeFields( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .includeFields(true) .identifiers( Arrays.asList("identifiers") ) @@ -10285,6 +11813,14 @@ client.resourceServers().create(
+**tokenLifetimeForAnonymousAccessTokens:** `Optional` — Expiration value (in seconds) for anonymous-session access tokens issued for this API. + +
+
+ +
+
+ **tokenDialect:** `Optional`
@@ -10309,6 +11845,14 @@ client.resourceServers().create(
+**accessToken:** `Optional` + +
+
+ +
+
+ **tokenEncryption:** `Optional`
@@ -10325,6 +11869,14 @@ client.resourceServers().create(
+**requireConsentNonRepudiation:** `Optional` — When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + +
+
+ +
+
+ **authorizationDetails:** `Optional>`
@@ -10351,6 +11903,138 @@ client.resourceServers().create( **authorizationPolicy:** `Optional` +
+
+ +
+
+ +**agentSubjectClaims:** `Optional` + +
+
+ +
+
+ +**type:** `Optional` + +
+
+ + + + + + +
+ +
client.resourceServers.search() -> SyncPagingIterable&lt;ResourceServerSearchResponse&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. +Results may not reflect recent updates immediately. + +The `signing_secret` field is not supported by this endpoint. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.resourceServers().search( + SearchResourceServersRequestParameters + .builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .fields("fields") + .includeFields(true) + .take(1) + .from("from") + .sort(ResourceServerSortFieldEnum.IDENTIFIER) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `Optional` — Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: `name eq "My API"`, `identifier sw "https://"`. SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or.

Supported Fields:
  • id - Filter by resource server ID
  • identifier - Filter by resource server identifier
  • name - Filter by resource server name
  • updated_at - Filter by last update date
Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + +
+
+ +
+
+ +**parser:** `Optional` — Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + +
+
+ +
+
+ +**fields:** `Optional` — Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. + +
+
+ +
+
+ +**includeFields:** `Optional` — Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified. + +
+
+ +
+
+ +**take:** `Optional` — Maximum number of results to return per page (1-100). Defaults to 50. + +
+
+ +
+
+ +**from:** `Optional` — Cursor for the next page of results. Use the value from the next field in the previous response. + +
+
+ +
+
+ +**sort:** `Optional` — Field name to sort results by in ascending order only. Defaults to insertion order (oldest first) if not provided. +
@@ -10392,9 +12076,7 @@ client.resourceServers().get( "id", GetResourceServerRequestParameters .builder() - .includeFields( - OptionalNullable.of(true) - ) + .includeFields(true) .build() ); ``` @@ -10612,6 +12294,14 @@ client.resourceServers().update(
+**tokenLifetimeForAnonymousAccessTokens:** `Optional` — Expiration value (in seconds) for anonymous-session access tokens issued for this API. + +
+
+ +
+
+ **tokenDialect:** `Optional`
@@ -10628,6 +12318,14 @@ client.resourceServers().update(
+**accessToken:** `Optional` + +
+
+ +
+
+ **tokenEncryption:** `Optional`
@@ -10644,6 +12342,14 @@ client.resourceServers().update(
+**requireConsentNonRepudiation:** `Optional` — When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + +
+
+ +
+
+ **authorizationDetails:** `Optional>`
@@ -10670,6 +12376,22 @@ client.resourceServers().update( **authorizationPolicy:** `Optional` +
+
+ +
+
+ +**agentSubjectClaims:** `Optional` + +
+
+ +
+
+ +**type:** `Optional` +
@@ -10693,7 +12415,7 @@ client.resourceServers().update(
-Retrieve detailed list of user roles created in your tenant. +Retrieve a list of roles. Includes roles created in your tenant and, when `owner_id=auth0` is supplied, Auth0-managed System Roles. **Note**: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.
@@ -10713,18 +12435,12 @@ Retrieve detailed list of user roles created in your tenant. client.roles().list( ListRolesRequestParameters .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .nameFilter( - OptionalNullable.of("name_filter") - ) + .perPage(1) + .page(1) + .includeTotals(true) + .nameFilter("name_filter") + .type(RoleTypeEnum.TENANT) + .ownerId("owner_id") .build() ); ``` @@ -10767,6 +12483,22 @@ client.roles().list( **nameFilter:** `Optional` — Optional filter on name (case-insensitive). + +
+ +
+
+ +**type:** `Optional` — Optional filter on the type of the role + +
+
+ +
+
+ +**ownerId:** `Optional` — Filter organization-level roles by owner ID. Use an organization ID to filter that organization's roles, or "auth0" to retrieve Auth0-managed System Roles. Required when type is "organization". +
@@ -10836,6 +12568,22 @@ client.roles().create( **description:** `Optional` — Description of the role. + + + +
+
+ +**type:** `Optional` — The type of the role. Defaults to tenant. + +
+
+ +
+
+ +**ownerId:** `Optional` — The ID of the organization that owns this role. Required when type is "organization". +
@@ -11060,24 +12808,12 @@ Retrieve a filtered list of [rules](https://auth0.com/docs/rules). Accepts a lis client.rules().list( ListRulesRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .enabled( - OptionalNullable.of(true) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .enabled(true) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -11263,12 +12999,8 @@ client.rules().get( "id", GetRuleRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -11653,15 +13385,9 @@ Retrieves self-service profiles. client.selfServiceProfiles().list( ListSelfServiceProfilesRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -12320,12 +14046,8 @@ Retrieve the number of logins, signups and breached-password detections (subscri client.stats().getDaily( GetDailyStatsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .to( - OptionalNullable.of("to") - ) + .from("from") + .to("to") .build() ); ``` @@ -12741,12 +14463,8 @@ This endpoint supports Checkpoint pagination. To search by checkpoint, use the f client.tokenExchangeProfiles().list( TokenExchangeProfilesListRequest .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -13091,12 +14809,8 @@ Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pa client.userAttributeProfiles().list( ListUserAttributeProfileRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -13535,9 +15249,7 @@ client.userBlocks().listByIdentifier( ListUserBlocksByIdentifierRequestParameters .builder() .identifier("identifier") - .considerBruteForceEnablement( - OptionalNullable.of(true) - ) + .considerBruteForceEnablement(true) .build() ); ``` @@ -13565,8 +15277,8 @@ client.userBlocks().listByIdentifier( **considerBruteForceEnablement:** `Optional` - If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - If true and Brute Force Protection is disabled, will return an empty list. + If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + If false or omitted, returns all blocks regardless of enforcement state. @@ -13671,9 +15383,7 @@ client.userBlocks().list( "id", ListUserBlocksRequestParameters .builder() - .considerBruteForceEnablement( - OptionalNullable.of(true) - ) + .considerBruteForceEnablement(true) .build() ); ``` @@ -13701,8 +15411,8 @@ client.userBlocks().list( **considerBruteForceEnablement:** `Optional` - If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - If true and Brute Force Protection is disabled, will return an empty list. + If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + If false or omitted, returns all blocks regardless of enforcement state. @@ -13784,24 +15494,22 @@ client.userBlocks().delete("id");
-Retrieve details of users. It is possible to: +This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: -- Specify a search criteria for users +- Specify search criteria for users - Sort the users to be returned - Select the fields to be returned - Specify the number of users to retrieve per page and the page index +This endpoint is **not suited for use in critical paths**. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503. +- Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, [look users up directly by ID or email](https://auth0.com/docs/manage-users/user-search/get-users-by-id-or-email#management-api) to get their current state. +- Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to [Event Streams](https://auth0.com/docs/customize/events/sync-data-across-systems) to receive every change as it happens. +- Do not use this endpoint to enumerate or export your entire user base. Instead, run a [bulk user export](https://auth0.com/docs/manage-users/user-migration/bulk-user-exports) to retrieve the full set. -The `q` query parameter can be used to get users that match the specified criteria [using query string syntax.](https://auth0.com/docs/users/search/v3/query-syntax) - -[Learn more about searching for users.](https://auth0.com/docs/users/search/v3) - -Read about [best practices](https://auth0.com/docs/users/search/best-practices) when working with the API endpoints for retrieving users. - +Use the `q` query parameter to match users with [query string syntax](https://auth0.com/docs/manage-users/user-search/user-search-query-syntax). For full instructions and guidance, see [How to List and Search Users](https://auth0.com/docs/manage-users/user-search/list-and-search-users). - -Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the [export job](https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports), or the [User Import / Export](https://auth0.com/docs/extensions/user-import-export) extension. +For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in `app_metadata` or `user_metadata`) or using leading wildcards.
@@ -13819,36 +15527,16 @@ Auth0 limits the number of users you can return. If you exceed this threshold, p client.users().list( ListUsersRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .sort( - OptionalNullable.of("sort") - ) - .connection( - OptionalNullable.of("connection") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .q( - OptionalNullable.of("q") - ) - .searchEngine( - OptionalNullable.of(SearchEngineVersionsEnum.V1) - ) - .primaryOrder( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .sort("sort") + .connection("connection") + .fields("fields") + .includeFields(true) + .q("q") + .searchEngine(SearchEngineVersionsEnum.V1) + .primaryOrder(true) .build() ); ``` @@ -14173,12 +15861,8 @@ client.users().listUsersByEmail( ListUsersByEmailRequestParameters .builder() .email("email") - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -14254,12 +15938,8 @@ client.users().get( "id", GetUserRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -14651,7 +16331,7 @@ client.users().update(
-
client.users.regenerateRecoveryCode(id) -> RegenerateUsersRecoveryCodeResponseContent +
client.users.listConsentSigningKeys(id) -> ListUserConsentSigningKeysResponseContent
@@ -14663,7 +16343,7 @@ client.users().update(
-Remove an existing multi-factor authentication (MFA) [recovery code](https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa) and generate a new one. If a user cannot access the original device or account used for MFA enrollment, they can use a recovery code to authenticate. +Retrieve all consent signing keys registered for a user. Returns an empty `keys` array when the user has no keys registered.
@@ -14678,7 +16358,7 @@ Remove an existing multi-factor authentication (MFA) [recovery code](https://aut
```java -client.users().regenerateRecoveryCode("id"); +client.users().listConsentSigningKeys("id"); ```
@@ -14693,7 +16373,7 @@ client.users().regenerateRecoveryCode("id");
-**id:** `String` — ID of the user to regenerate a multi-factor authentication recovery code for. +**id:** `String` — The ID of the user.
@@ -14705,7 +16385,7 @@ client.users().regenerateRecoveryCode("id");
-
client.users.revokeAccess(id, request) +
client.users.getConsentSigningKey(id, kid) -> ConsentSigningKey
@@ -14717,7 +16397,7 @@ client.users().regenerateRecoveryCode("id");
-Revokes selected resources related to a user (sessions, refresh tokens, ...). +Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist.
@@ -14732,12 +16412,7 @@ Revokes selected resources related to a user (sessions, refresh tokens, ...).
```java -client.users().revokeAccess( - "id", - RevokeUserAccessRequestContent - .builder() - .build() -); +client.users().getConsentSigningKey("id", "kid"); ```
@@ -14752,7 +16427,7 @@ client.users().revokeAccess(
-**id:** `String` — ID of the user. +**id:** `String` — The ID of the user.
@@ -14760,15 +16435,69 @@ client.users().revokeAccess(
-**sessionId:** `Optional` — ID of the session to revoke. +**kid:** `String` — The key identifier of the consent signing key.
+ + + + + + +
+
client.users.deleteConsentSigningKey(id, kid)
-**preserveRefreshTokens:** `Optional` — Whether to preserve the refresh tokens associated with the session. +#### 📝 Description + +
+
+ +
+
+ +Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.users().deleteConsentSigningKey("id", "kid"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The ID of the user. + +
+
+ +
+
+ +**kid:** `String` — The key identifier of the consent signing key.
@@ -14780,8 +16509,7 @@ client.users().revokeAccess(
-## Actions Versions -
client.actions.versions.list(actionId) -> SyncPagingIterable&lt;ActionVersion&gt; +
client.users.regenerateRecoveryCode(id) -> RegenerateUsersRecoveryCodeResponseContent
@@ -14793,7 +16521,7 @@ client.users().revokeAccess(
-Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. +Remove an existing multi-factor authentication (MFA) [recovery code](https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa) and generate a new one. If a user cannot access the original device or account used for MFA enrollment, they can use a recovery code to authenticate.
@@ -14808,16 +16536,64 @@ Retrieve all of an action's versions. An action version is created whenever an a
```java -client.actions().versions().list( - "actionId", - ListActionVersionsRequestParameters +client.users().regenerateRecoveryCode("id"); +``` +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the user to regenerate a multi-factor authentication recovery code for. + +
+
+
+
+ + + + +
+ +
client.users.revokeAccess(id, request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Revokes selected resources related to a user (sessions, refresh tokens, ...). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.users().revokeAccess( + "id", + RevokeUserAccessRequestContent .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) .build() ); ``` @@ -14834,7 +16610,7 @@ client.actions().versions().list(
-**actionId:** `String` — The ID of the action. +**id:** `String` — ID of the user.
@@ -14842,7 +16618,7 @@ client.actions().versions().list(
-**page:** `Optional` — Use this field to request a specific page of the list results. +**sessionId:** `Optional` — ID of the session to revoke.
@@ -14850,7 +16626,7 @@ client.actions().versions().list(
-**perPage:** `Optional` — This field specify the maximum number of results to be returned by the server. 20 by default +**preserveRefreshTokens:** `Optional` — Whether to preserve the refresh tokens associated with the session.
@@ -14862,7 +16638,8 @@ client.actions().versions().list(
-
client.actions.versions.get(actionId, id) -> GetActionVersionResponseContent +## Actions Versions +
client.actions.versions.list(actionId) -> SyncPagingIterable&lt;ActionVersion&gt;
@@ -14874,7 +16651,7 @@ client.actions().versions().list(
-Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. +Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created.
@@ -14889,7 +16666,84 @@ Retrieve a specific version of an action. An action version is created whenever
```java -client.actions().versions().get("actionId", "id"); +client.actions().versions().list( + "actionId", + ListActionVersionsRequestParameters + .builder() + .page(1) + .perPage(1) + .build() +); +``` +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**actionId:** `String` — The ID of the action. + +
+
+ +
+
+ +**page:** `Optional` — Use this field to request a specific page of the list results. + +
+
+ +
+
+ +**perPage:** `Optional` — This field specify the maximum number of results to be returned by the server. 20 by default + +
+
+
+
+ + + + +
+ +
client.actions.versions.get(actionId, id) -> GetActionVersionResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.actions().versions().get("actionId", "id"); ```
@@ -14954,7 +16808,11 @@ Performs the equivalent of a roll-back of an action to an earlier, specified ver client.actions().versions().deploy( "actionId", "id", - OptionalNullable.absent() + OptionalNullable.of( + DeployActionVersionRequestContent + .builder() + .build() + ) ); ```
@@ -15084,12 +16942,8 @@ Retrieve a paginated list of all Actions Modules with optional filtering and tot client.actions().modules().list( GetActionModulesRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) + .page(1) + .perPage(1) .build() ); ``` @@ -15448,12 +17302,8 @@ client.actions().modules().listActions( "id", GetActionModuleActionsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) + .page(1) + .perPage(1) .build() ); ``` @@ -15638,12 +17488,8 @@ client.actions().modules().versions().list( "id", GetActionModuleVersionsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) + .page(1) + .perPage(1) .build() ); ``` @@ -15836,12 +17682,8 @@ client.actions().triggers().bindings().list( ActionTriggerTypeEnum.POST_LOGIN, ListActionTriggerBindingsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) + .page(1) + .perPage(1) .build() ); ``` @@ -16457,6 +18299,14 @@ Action to take when a brute force protection threshold is violated.
+**formSubmissionMode:** `Optional` + +
+
+ +
+
+ **maxAttempts:** `Optional` — Maximum number of unsuccessful attempts.
@@ -17159,6 +19009,14 @@ client.branding().themes().create(
+**identifiers:** `Optional` + +
+
+ +
+
+ **pageBackground:** `BrandingThemePageBackground`
@@ -17516,6 +19374,14 @@ client.branding().themes().update(
+**identifiers:** `Optional` + +
+
+ +
+
+ **pageBackground:** `BrandingThemePageBackground`
@@ -17567,9 +19433,7 @@ Retrieve a list of [phone providers](https://auth0.com/docs/customize/phone-mess client.branding().phone().providers().list( ListBrandingPhoneProvidersRequestParameters .builder() - .disabled( - OptionalNullable.of(true) - ) + .disabled(true) .build() ); ``` @@ -17969,9 +19833,7 @@ client.branding().phone().providers().test( client.branding().phone().templates().list( ListPhoneTemplatesRequestParameters .builder() - .disabled( - OptionalNullable.of(true) - ) + .disabled(true) .build() ); ``` @@ -18334,12 +20196,9 @@ client.clientGrants().organizations().list( "id", ListClientGrantOrganizationsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -18364,6 +20223,14 @@ client.clientGrants().organizations().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -18858,18 +20725,10 @@ client.clients().connections().get( "id", ConnectionsGetRequest .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .strategy( Arrays.asList(ConnectionStrategyEnum.AD) ) @@ -18972,12 +20831,2336 @@ Retrieve a list of directory provisioning configurations of a tenant. client.connections().directoryProvisioning().list( ListDirectoryProvisioningsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) + .build() +); +``` +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+
+
+ + + + +
+ +
client.connections.directoryProvisioning.get(id) -> GetDirectoryProvisioningResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the directory provisioning configuration of a connection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to retrieve its directory provisioning configuration + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.create(id, request) -> CreateDirectoryProvisioningResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a directory provisioning configuration for a connection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().create( + "id", + OptionalNullable.of( + CreateDirectoryProvisioningRequestContent + .builder() + .build() + ) +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to create its directory provisioning configuration + +
+
+ +
+
+ +**request:** `Optional` + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.delete(id) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete the directory provisioning configuration of a connection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().delete("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to delete its directory provisioning configuration + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.update(id, request) -> UpdateDirectoryProvisioningResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the directory provisioning configuration of a connection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().update( + "id", + OptionalNullable.of( + UpdateDirectoryProvisioningRequestContent + .builder() + .build() + ) +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to create its directory provisioning configuration + +
+
+ +
+
+ +**request:** `Optional` + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.getDefaultMapping(id) -> GetDirectoryProvisioningDefaultMappingResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the directory provisioning default attribute mapping of a connection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().getDefaultMapping("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to retrieve its directory provisioning configuration + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.listSynchronizedGroups(id) -> SyncPagingIterable&lt;SynchronizedGroupPayload&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the configured synchronized groups for a connection directory provisioning configuration. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().listSynchronizedGroups( + "id", + ListSynchronizedGroupsRequestParameters + .builder() + .from("from") + .take(1) + .q("q") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to list synchronized groups for. + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+ +
+
+ +**q:** `Optional` — Query in Lucene query string syntax. Only prefix search on "name" or "email" fields are allowed, with a single wildcard suffix. Operators, modifiers, and groupings are not allowed. Terms are treated as case-insensitive. Example query: "name:engineering*". + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.addSynchronizedGroupSelections(id, request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Add synchronized group selections to a directory provisioning configuration. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().addSynchronizedGroupSelections( + "id", + AddSynchronizedGroupsRequestContent + .builder() + .groups( + Arrays.asList( + SynchronizedGroupPayload + .builder() + .id("id") + .build() + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to add synchronized groups to + +
+
+ +
+
+ +**groups:** `List` — Array of Google Workspace Directory group objects to synchronize. + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.set(id, request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or replace the selected groups for a connection directory provisioning configuration. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().set( + "id", + ReplaceSynchronizedGroupsRequestContent + .builder() + .groups( + Arrays.asList( + SynchronizedGroupPayload + .builder() + .id("id") + .build() + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to create or replace synchronized groups for + +
+
+ +
+
+ +**groups:** `List` — Array of Google Workspace Directory group objects to synchronize. + +
+
+
+
+ + +
+
+
+ +
client.connections.directoryProvisioning.deleteSynchronizedGroupSelections(id, request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete synchronized group selections for a directory provisioning configuration +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().deleteSynchronizedGroupSelections( + "id", + DeleteSynchronizedGroupsRequestContent + .builder() + .groups( + Arrays.asList( + SynchronizedGroupSelectionId + .builder() + .id("id") + .build() + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to delete synchronized group selections for + +
+
+ +
+
+ +**groups:** `List` — Array of groups to remove from the selection set. + +
+
+
+
+ + +
+
+
+ +## Connections ScimConfiguration +
client.connections.scimConfiguration.list() -> SyncPagingIterable&lt;ScimConfiguration&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a list of SCIM configurations of a tenant. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().list( + ListScimConfigurationsRequestParameters + .builder() + .from("from") + .take(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.get(id) -> GetScimConfigurationResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a scim configuration by its `connectionId`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to retrieve its SCIM configuration + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.create(id, request) -> CreateScimConfigurationResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a scim configuration for a connection. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().create( + "id", + OptionalNullable.of( + CreateScimConfigurationRequestContent + .builder() + .build() + ) +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to create its SCIM configuration + +
+
+ +
+
+ +**request:** `Optional` + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.delete(id) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a scim configuration by its `connectionId`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().delete("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to delete its SCIM configuration + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.update(id, request) -> UpdateScimConfigurationResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update a scim configuration by its `connectionId`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().update( + "id", + UpdateScimConfigurationRequestContent + .builder() + .userIdAttribute("user_id_attribute") + .mapping( + Arrays.asList( + ScimMappingItem + .builder() + .build() + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to update its SCIM configuration + +
+
+ +
+
+ +**userIdAttribute:** `String` — User ID attribute for generating unique user ids + +
+
+ +
+
+ +**mapping:** `List` — The mapping between auth0 and SCIM + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.getDefaultMapping(id) -> GetScimConfigurationDefaultMappingResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a scim configuration's default mapping by its `connectionId`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().getDefaultMapping("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to retrieve its default SCIM mapping + +
+
+
+
+ + +
+
+
+ +## Connections Clients +
client.connections.clients.get(id) -> SyncPagingIterable&lt;ConnectionEnabledClient&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve all clients that have the specified [connection](https://auth0.com/docs/authenticate/identity-providers) enabled. + +**Note**: The first time you call this endpoint, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no further results are remaining. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().clients().get( + "id", + GetConnectionEnabledClientsRequestParameters + .builder() + .take(1) + .from("from") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection for which enabled clients are to be retrieved + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+
+
+ + +
+
+
+ +
client.connections.clients.update(id, request) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().clients().update( + "id", + Arrays.asList( + UpdateEnabledClientConnectionsRequestContentItem + .builder() + .clientId("client_id") + .status(true) + .build() + ) +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to modify + +
+
+ +
+
+ +**request:** `List` + +
+
+
+
+ + +
+
+
+ +## Connections Keys +
client.connections.keys.get(id) -> List&lt;ConnectionKey&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by `key_use`. Encryption keys apply only to OIDC and Okta connections. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().keys().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the connection + +
+
+
+
+ + +
+
+
+ +
client.connections.keys.create(id, request) -> List&lt;PostConnectionsKeysResponseContentItem&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + +Set `key_use` to `signing` (default) to provision signing keys, optionally choosing `signing_alg`, or to `encryption` to provision encryption keys, optionally choosing `encryption_alg`. `signing_alg` and `encryption_alg` each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().keys().create( + "id", + OptionalNullable.of( + PostConnectionKeysRequestContent + .builder() + .build() + ) +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the connection + +
+
+ +
+
+ +**request:** `Optional` + +
+
+
+
+ + +
+
+
+ +
client.connections.keys.rotate(id, request) -> RotateConnectionsKeysResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + +Set `key_use` to `signing` (default) to rotate the signing key, optionally choosing `signing_alg`, or to `encryption` to rotate the encryption key, optionally choosing `encryption_alg`. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (`id_token_encrypted_response_alg` set), which applies only to OIDC and Okta connections. When `encryption_alg` is omitted, the new encryption key uses `id_token_encrypted_response_alg`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().keys().rotate( + "id", + OptionalNullable.of( + RotateConnectionKeysRequestContent + .builder() + .build() + ) +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the connection + +
+
+ +
+
+ +**request:** `Optional` + +
+
+
+
+ + +
+
+
+ +## Connections Users +
client.connections.users.deleteByEmail(id) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().users().deleteByEmail( + "id", + DeleteConnectionUsersByEmailQueryParameters + .builder() + .email("email") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection (currently only database connections are supported) + +
+
+ +
+
+ +**email:** `String` — The email of the user to delete + +
+
+
+
+ + +
+
+
+ +## Connections DirectoryProvisioning Synchronizations +
client.connections.directoryProvisioning.synchronizations.create(id) -> CreateDirectorySynchronizationResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Request an on-demand synchronization of the directory. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().directoryProvisioning().synchronizations().create("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to trigger synchronization for + +
+
+
+
+ + +
+
+
+ +## Connections ScimConfiguration Tokens +
client.connections.scimConfiguration.tokens.get(id) -> List&lt;ScimTokenItem&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves all scim tokens by its connection `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().tokens().get("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to retrieve its SCIM configuration + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.tokens.create(id, request) -> CreateScimTokenResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a scim token for a scim client. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().tokens().create( + "id", + CreateScimTokenRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The id of the connection to create its SCIM token + +
+
+ +
+
+ +**scopes:** `Optional>` — The scopes of the scim token + +
+
+ +
+
+ +**tokenLifetime:** `Optional` — Lifetime of the token in seconds. Must be greater than 900 + +
+
+
+
+ + +
+
+
+ +
client.connections.scimConfiguration.tokens.delete(id, tokenId) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a scim token by its connection `id` and `tokenId`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.connections().scimConfiguration().tokens().delete("id", "tokenId"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — The connection id that owns the SCIM token to delete + +
+
+ +
+
+ +**tokenId:** `String` — The id of the scim token to delete + +
+
+
+
+ + +
+
+
+ +## Emails Provider +
client.emails.provider.get() -> GetEmailProviderResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve details of the [email provider configuration](https://auth0.com/docs/customize/email/smtp-email-providers) in your tenant. A list of fields to include or exclude may also be specified. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.emails().provider().get( + GetEmailProviderRequestParameters + .builder() + .fields("fields") + .includeFields(true) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fields:** `Optional` — Comma-separated list of fields to include or exclude (dependent upon include_fields) from the result. Leave empty to retrieve `name` and `enabled`. Additional fields available include `credentials`, `default_from_address`, and `settings`. + +
+
+ +
+
+ +**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). + +
+
+
+
+ + +
+
+
+ +
client.emails.provider.create(request) -> CreateEmailProviderResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an [email provider](https://auth0.com/docs/email/providers). The `credentials` object +requires different properties depending on the email provider (which is specified using the `name` property): + +- `mandrill` requires `api_key` +- `sendgrid` requires `api_key` +- `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + North America. `eu` or `null` are the only valid values for `region`. +- `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + `null` are the only valid values for `region`. +- `ses` requires `accessKeyId`, `secretAccessKey`, and `region` +- `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + `smtp_pass` + +Depending on the type of provider it is possible to specify `settings` object with different configuration +options, which will be used when sending an email: + +- `smtp` provider, `settings` may contain `headers` object. + - When using AWS SES SMTP host, you may provide a name of configuration set in + `X-SES-Configuration-Set` header. Value must be a string. + - When using Sparkpost host, you may provide value for + `X-MSYS_API` header. Value must be an object. +- For `ses` provider, `settings` may contain `message` object, where you can provide + a name of configuration set in `configuration_set_name` property. Value must be a string. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.emails().provider().create( + CreateEmailProviderRequestContent + .builder() + .name(EmailProviderNameEnum.MAILGUN) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `EmailProviderNameEnum` + +
+
+ +
+
+ +**enabled:** `Optional` — Whether the provider is enabled (true) or disabled (false). + +
+
+ +
+
+ +**defaultFromAddress:** `Optional` — Email address to use as "from" when no other address specified. + +
+
+ +
+
+ +**credentials:** `Optional` + +
+
+ +
+
+ +**settings:** `Optional>` + +
+
+
+
+ + +
+
+
+ +
client.emails.provider.delete() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete the email provider. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.emails().provider().delete(); +``` +
+
+
+
+ + +
+
+
+ +
client.emails.provider.update(request) -> UpdateEmailProviderResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an [email provider](https://auth0.com/docs/email/providers). The `credentials` object +requires different properties depending on the email provider (which is specified using the `name` property): + +- `mandrill` requires `api_key` +- `sendgrid` requires `api_key` +- `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use + the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in + North America. `eu` or `null` are the only valid values for `region`. +- `mailgun` requires `api_key` and `domain`. Optionally, set `region` to + `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or + `null` are the only valid values for `region`. +- `ses` requires `accessKeyId`, `secretAccessKey`, and `region` +- `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and + `smtp_pass` + +Depending on the type of provider it is possible to specify `settings` object with different configuration +options, which will be used when sending an email: + +- `smtp` provider, `settings` may contain `headers` object. + - When using AWS SES SMTP host, you may provide a name of configuration set in + `X-SES-Configuration-Set` header. Value must be a string. + - When using Sparkpost host, you may provide value for + `X-MSYS_API` header. Value must be an object. + + For `ses` provider, `settings` may contain `message` object, where you can provide + a name of configuration set in `configuration_set_name` property. Value must be a string. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.emails().provider().update( + UpdateEmailProviderRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `Optional` + +
+
+ +
+
+ +**enabled:** `Optional` — Whether the provider is enabled (true) or disabled (false). + +
+
+ +
+
+ +**defaultFromAddress:** `Optional` — Email address to use as "from" when no other address specified. + +
+
+ +
+
+ +**credentials:** `Optional` + +
+
+ +
+
+ +**settings:** `Optional>` + +
+
+
+
+ + +
+
+
+ +## EventStreams Deliveries +
client.eventStreams.deliveries.list(id) -> SyncPagingIterable&lt;EventStreamDelivery&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.eventStreams().deliveries().list( + "id", + ListEventStreamDeliveriesRequestParameters + .builder() + .statuses("statuses") + .eventTypes("event_types") + .dateFrom("date_from") + .dateTo("date_to") + .from("from") + .take(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Unique identifier for the event stream. + +
+
+ +
+
+ +**statuses:** `Optional` — Comma-separated list of statuses by which to filter + +
+
+ +
+
+ +**eventTypes:** `Optional` — Comma-separated list of event types by which to filter + +
+
+ +
+
+ +**dateFrom:** `Optional` — An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. + +
+
+ +
+
+ +**dateTo:** `Optional` — An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+
+
+ + +
+
+
+ +
client.eventStreams.deliveries.getHistory(id, eventId) -> GetEventStreamDeliveryHistoryResponseContent +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.eventStreams().deliveries().getHistory("id", "event_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Unique identifier for the event stream. + +
+
+ +
+
+ +**eventId:** `String` — Unique identifier for the event + +
+
+
+
+ + +
+
+
+ +## EventStreams Redeliveries +
client.eventStreams.redeliveries.create(id, request) -> CreateEventStreamRedeliveryResponseContent +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.eventStreams().redeliveries().create( + "id", + CreateEventStreamRedeliveryRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Unique identifier for the event stream. + +
+
+ +
+
+ +**dateFrom:** `Optional` — An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. + +
+
+ +
+
+ +**dateTo:** `Optional` — An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. + +
+
+ +
+
+ +**statuses:** `Optional>` — Filter by status + +
+
+ +
+
+ +**eventTypes:** `Optional>` — Filter by event type + +
+
+
+
+ + +
+
+
+ +
client.eventStreams.redeliveries.createById(id, eventId) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.eventStreams().redeliveries().createById("id", "event_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Unique identifier for the event stream. + +
+
+ +
+
+ +**eventId:** `String` — Unique identifier for the event + +
+
+
+
+ + +
+
+
+ +## Experimentation Experiments +
client.experimentation.experiments.list() -> SyncPagingIterable&lt;ExperimentListItem&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve a paginated list of experiments for the tenant, with optional filters. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.experimentation().experiments().list( + ListExperimentsRequestParameters + .builder() + .from("from") + .take(1) + .status(ExperimentStatusEnum.DRAFT) + .authenticationFlow("authentication_flow") + .featureFlagId("feature_flag_id") .build() ); ``` @@ -19002,61 +23185,31 @@ client.connections().directoryProvisioning().list(
-**take:** `Optional` — Number of results per page. Defaults to 50. +**take:** `Optional` — Number of experiments to return per page. Defaults to 25, maximum 50.
-
-
- - -
-
-
- -
client.connections.directoryProvisioning.get(id) -> GetDirectoryProvisioningResponseContent -
-
- -#### 📝 Description - -
-
-Retrieve the directory provisioning configuration of a connection. -
-
+**status:** `Optional` — Filter by status. Exact match. +
-#### 🔌 Usage - -
-
-
-```java -client.connections().directoryProvisioning().get("id"); -``` -
-
+**authenticationFlow:** `Optional` — Filter by authentication flow. Exact match. +
-#### ⚙️ Parameters - -
-
-
-**id:** `String` — The id of the connection to retrieve its directory provisioning configuration +**featureFlagId:** `Optional` — Filter by feature flag ID. Exact match.
@@ -19068,7 +23221,7 @@ client.connections().directoryProvisioning().get("id");
-
client.connections.directoryProvisioning.create(id, request) -> CreateDirectoryProvisioningResponseContent +
client.experimentation.experiments.create(request) -> CreateExperimentResponseContent
@@ -19080,7 +23233,7 @@ client.connections().directoryProvisioning().get("id");
-Create a directory provisioning configuration for a connection. +Create a new experiment for A/B testing.
@@ -19095,9 +23248,14 @@ Create a directory provisioning configuration for a connection.
```java -client.connections().directoryProvisioning().create( - "id", - OptionalNullable.absent() +client.experimentation().experiments().create( + CreateExperimentRequestContent + .builder() + .name("name") + .featureFlagId("feature_flag_id") + .authenticationFlow(AuthenticationFlowEnum.AUTHENTICATION) + .allocationStrategy(AllocationStrategyEnum.PERCENTAGE) + .build() ); ```
@@ -19113,7 +23271,7 @@ client.connections().directoryProvisioning().create(
-**id:** `String` — The id of the connection to create its directory provisioning configuration +**name:** `String` — A human-readable name for the experiment
@@ -19121,61 +23279,55 @@ client.connections().directoryProvisioning().create(
-**request:** `Optional` +**description:** `Optional` — A description of the experiment
- -
+
+
+**featureFlagId:** `String` — The ID of the feature flag this experiment is based on +
-
-
client.connections.directoryProvisioning.delete(id)
-#### 📝 Description - -
-
+**authenticationFlow:** `AuthenticationFlowEnum` + +
+
-Delete the directory provisioning configuration of a connection. -
-
+**defaultConfig:** `Optional` — Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config so the experiment overlays only its changes, 'flag' uses the flag's frozen defaults for a complete config. Optional; defaults to 'tenant' when omitted. Rejected for customer-defined flags. +
-#### 🔌 Usage - -
-
-
-```java -client.connections().directoryProvisioning().delete("id"); -``` -
-
+**allocationStrategy:** `AllocationStrategyEnum` — The traffic allocation strategy for this experiment +
-#### ⚙️ Parameters -
+**allocations:** `Optional>` — Traffic allocations mapping variations to weights or segments + +
+
+
-**id:** `String` — The id of the connection to delete its directory provisioning configuration +**levels:** `Optional>` — Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100].
@@ -19187,7 +23339,7 @@ client.connections().directoryProvisioning().delete("id");
-
client.connections.directoryProvisioning.update(id, request) -> UpdateDirectoryProvisioningResponseContent +
client.experimentation.experiments.get(id) -> GetExperimentResponseContent
@@ -19199,7 +23351,7 @@ client.connections().directoryProvisioning().delete("id");
-Update the directory provisioning configuration of a connection. +Retrieve a single experiment with its allocations by ID.
@@ -19214,10 +23366,7 @@ Update the directory provisioning configuration of a connection.
```java -client.connections().directoryProvisioning().update( - "id", - OptionalNullable.absent() -); +client.experimentation().experiments().get("id"); ```
@@ -19232,15 +23381,7 @@ client.connections().directoryProvisioning().update(
-**id:** `String` — The id of the connection to create its directory provisioning configuration - -
-
- -
-
- -**request:** `Optional` +**id:** `String` — The ID of the experiment to retrieve.
@@ -19252,7 +23393,7 @@ client.connections().directoryProvisioning().update(
-
client.connections.directoryProvisioning.getDefaultMapping(id) -> GetDirectoryProvisioningDefaultMappingResponseContent +
client.experimentation.experiments.delete(id)
@@ -19264,7 +23405,7 @@ client.connections().directoryProvisioning().update(
-Retrieve the directory provisioning default attribute mapping of a connection. +Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist.
@@ -19279,7 +23420,7 @@ Retrieve the directory provisioning default attribute mapping of a connection.
```java -client.connections().directoryProvisioning().getDefaultMapping("id"); +client.experimentation().experiments().delete("id"); ```
@@ -19294,7 +23435,7 @@ client.connections().directoryProvisioning().getDefaultMapping("id");
-**id:** `String` — The id of the connection to retrieve its directory provisioning configuration +**id:** `String` — The ID of the experiment to delete.
@@ -19306,7 +23447,7 @@ client.connections().directoryProvisioning().getDefaultMapping("id");
-
client.connections.directoryProvisioning.listSynchronizedGroups(id) -> SyncPagingIterable&lt;SynchronizedGroupPayload&gt; +
client.experimentation.experiments.update(id, request) -> UpdateExperimentResponseContent
@@ -19318,7 +23459,7 @@ client.connections().directoryProvisioning().getDefaultMapping("id");
-Retrieve the configured synchronized groups for a connection directory provisioning configuration. +Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set.
@@ -19333,16 +23474,10 @@ Retrieve the configured synchronized groups for a connection directory provision
```java -client.connections().directoryProvisioning().listSynchronizedGroups( +client.experimentation().experiments().update( "id", - ListSynchronizedGroupsRequestParameters + UpdateExperimentRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) .build() ); ``` @@ -19359,7 +23494,7 @@ client.connections().directoryProvisioning().listSynchronizedGroups(
-**id:** `String` — The id of the connection to list synchronized groups for. +**id:** `String` — The ID of the experiment to update.
@@ -19367,7 +23502,7 @@ client.connections().directoryProvisioning().listSynchronizedGroups(
-**from:** `Optional` — Optional Id from which to start selection. +**name:** `Optional` — A human-readable name for the experiment
@@ -19375,74 +23510,39 @@ client.connections().directoryProvisioning().listSynchronizedGroups(
-**take:** `Optional` — Number of results per page. Defaults to 50. +**description:** `Optional` — A description of the experiment
-
-
- - - - -
-
client.connections.directoryProvisioning.set(id, request)
-#### 📝 Description - -
-
+**authenticationFlow:** `Optional` — Specifies the target authentication flow for this experiment. This field can only be modified on draft experiments. Must be one of: authentication, mfa_enrollment, mfa_challenge, password_reset, passkey_enrollment, or all. Note that the all value targets every flow at once, but requires that this is the only active experiment. + +
+
-Create or replace the selected groups for a connection directory provisioning configuration. -
-
+**allocations:** `Optional>` — Replaces all traffic allocations. Cannot be modified while the experiment is active. +
-#### 🔌 Usage -
-
-
- -```java -client.connections().directoryProvisioning().set( - "id", - ReplaceSynchronizedGroupsRequestContent - .builder() - .groups( - Arrays.asList( - SynchronizedGroupPayload - .builder() - .id("id") - .build() - ) - ) - .build() -); -``` -
-
+**defaultConfig:** `Optional` — Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config, 'flag' uses the flag's frozen defaults. Can only be modified on draft experiments. Rejected for customer-defined flags. +
-#### ⚙️ Parameters -
-
-
- -**id:** `String` — The id of the connection to create or replace synchronized groups for +**levels:** `Optional>` — Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100]. Can only be modified on draft experiments.
@@ -19450,7 +23550,7 @@ client.connections().directoryProvisioning().set(
-**groups:** `List` — Array of Google Workspace Directory group objects to synchronize. +**status:** `Optional`
@@ -19462,8 +23562,7 @@ client.connections().directoryProvisioning().set(
-## Connections ScimConfiguration -
client.connections.scimConfiguration.list() -> SyncPagingIterable&lt;ScimConfiguration&gt; +
client.experimentation.experiments.advanceRamp(id, request) -> AdvanceRampResponseContent
@@ -19475,7 +23574,7 @@ client.connections().directoryProvisioning().set(
-Retrieve a list of SCIM configurations of a tenant. +Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything.
@@ -19490,15 +23589,11 @@ Retrieve a list of SCIM configurations of a tenant.
```java -client.connections().scimConfiguration().list( - ListScimConfigurationsRequestParameters +client.experimentation().experiments().advanceRamp( + "id", + AdvanceRampRequestContent .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .targetLevel(1) .build() ); ``` @@ -19515,7 +23610,7 @@ client.connections().scimConfiguration().list(
-**from:** `Optional` — Optional Id from which to start selection. +**id:** `String` — The ID of the experiment to advance.
@@ -19523,7 +23618,7 @@ client.connections().scimConfiguration().list(
-**take:** `Optional` — Number of results per page. Defaults to 50. +**targetLevel:** `Integer` — The target percentage level from the experiment schedule. Must be the immediate next level.
@@ -19535,7 +23630,7 @@ client.connections().scimConfiguration().list(
-
client.connections.scimConfiguration.get(id) -> GetScimConfigurationResponseContent +
client.experimentation.experiments.validate(id) -> ValidateExperimentResponseContent
@@ -19547,7 +23642,7 @@ client.connections().scimConfiguration().list(
-Retrieves a scim configuration by its `connectionId`. +Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified.
@@ -19562,7 +23657,7 @@ Retrieves a scim configuration by its `connectionId`.
```java -client.connections().scimConfiguration().get("id"); +client.experimentation().experiments().validate("id"); ```
@@ -19577,7 +23672,7 @@ client.connections().scimConfiguration().get("id");
-**id:** `String` — The id of the connection to retrieve its SCIM configuration +**id:** `String` — The ID of the experiment to validate.
@@ -19589,7 +23684,8 @@ client.connections().scimConfiguration().get("id");
-
client.connections.scimConfiguration.create(id, request) -> CreateScimConfigurationResponseContent +## Experimentation FeatureFlags +
client.experimentation.featureFlags.list() -> SyncPagingIterable&lt;FeatureFlag&gt;
@@ -19601,7 +23697,7 @@ client.connections().scimConfiguration().get("id");
-Create a scim configuration for a connection. +Retrieve a paginated list of feature flags for the tenant.
@@ -19616,9 +23712,14 @@ Create a scim configuration for a connection.
```java -client.connections().scimConfiguration().create( - "id", - OptionalNullable.absent() +client.experimentation().featureFlags().list( + ListFeatureFlagsRequestParameters + .builder() + .from("from") + .take(1) + .type(FeatureFlagTypeEnum.AUTH0) + .status(FeatureFlagStatusEnum.DRAFT) + .build() ); ```
@@ -19634,7 +23735,7 @@ client.connections().scimConfiguration().create(
-**id:** `String` — The id of the connection to create its SCIM configuration +**from:** `Optional` — Optional Id from which to start selection.
@@ -19642,61 +23743,23 @@ client.connections().scimConfiguration().create(
-**request:** `Optional` +**take:** `Optional` — Number of feature flags to return per page. Defaults to 25, maximum 50.
- -
- - - - -
- -
client.connections.scimConfiguration.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a scim configuration by its `connectionId`. -
-
-
-
- -#### 🔌 Usage - -
-
-```java -client.connections().scimConfiguration().delete("id"); -``` -
-
+**type:** `Optional` — Filter by type. Exact match. +
-#### ⚙️ Parameters - -
-
-
-**id:** `String` — The id of the connection to delete its SCIM configuration +**status:** `Optional` — Filter by status. Exact match.
@@ -19708,7 +23771,7 @@ client.connections().scimConfiguration().delete("id");
-
client.connections.scimConfiguration.update(id, request) -> UpdateScimConfigurationResponseContent +
client.experimentation.featureFlags.create(request) -> CreateFeatureFlagResponseContent
@@ -19720,7 +23783,7 @@ client.connections().scimConfiguration().delete("id");
-Update a scim configuration by its `connectionId`. +Create a new feature flag with parameters for use in experiments.
@@ -19735,17 +23798,12 @@ Update a scim configuration by its `connectionId`.
```java -client.connections().scimConfiguration().update( - "id", - UpdateScimConfigurationRequestContent +client.experimentation().featureFlags().create( + CreateFeatureFlagRequestContent .builder() - .userIdAttribute("user_id_attribute") - .mapping( - Arrays.asList( - ScimMappingItem - .builder() - .build() - ) + .name("name") + .parameters( + new HashMap() ) .build() ); @@ -19763,7 +23821,7 @@ client.connections().scimConfiguration().update(
-**id:** `String` — The id of the connection to update its SCIM configuration +**name:** `String` — A human-readable name for the feature flag
@@ -19771,7 +23829,7 @@ client.connections().scimConfiguration().update(
-**userIdAttribute:** `String` — User ID attribute for generating unique user ids +**description:** `Optional` — A description of what this feature flag controls
@@ -19779,7 +23837,7 @@ client.connections().scimConfiguration().update(
-**mapping:** `List` — The mapping between auth0 and SCIM +**parameters:** `Map`
@@ -19791,7 +23849,7 @@ client.connections().scimConfiguration().update(
-
client.connections.scimConfiguration.getDefaultMapping(id) -> GetScimConfigurationDefaultMappingResponseContent +
client.experimentation.featureFlags.get(id) -> GetFeatureFlagResponseContent
@@ -19803,7 +23861,7 @@ client.connections().scimConfiguration().update(
-Retrieves a scim configuration's default mapping by its `connectionId`. +Retrieve a single feature flag by its ID.
@@ -19818,7 +23876,7 @@ Retrieves a scim configuration's default mapping by its `connectionId`.
```java -client.connections().scimConfiguration().getDefaultMapping("id"); +client.experimentation().featureFlags().get("id"); ```
@@ -19833,7 +23891,7 @@ client.connections().scimConfiguration().getDefaultMapping("id");
-**id:** `String` — The id of the connection to retrieve its default SCIM mapping +**id:** `String` — The ID of the feature flag to retrieve.
@@ -19845,8 +23903,7 @@ client.connections().scimConfiguration().getDefaultMapping("id");
-## Connections Clients -
client.connections.clients.get(id) -> SyncPagingIterable&lt;ConnectionEnabledClient&gt; +
client.experimentation.featureFlags.delete(id)
@@ -19858,9 +23915,7 @@ client.connections().scimConfiguration().getDefaultMapping("id");
-Retrieve all clients that have the specified [connection](https://auth0.com/docs/authenticate/identity-providers) enabled. - -**Note**: The first time you call this endpoint, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no further results are remaining. +Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist.
@@ -19875,18 +23930,7 @@ Retrieve all clients that have the specified [connection](https://auth0.com/docs
```java -client.connections().clients().get( - "id", - GetConnectionEnabledClientsRequestParameters - .builder() - .take( - OptionalNullable.of(1) - ) - .from( - OptionalNullable.of("from") - ) - .build() -); +client.experimentation().featureFlags().delete("id"); ```
@@ -19901,23 +23945,7 @@ client.connections().clients().get(
-**id:** `String` — The id of the connection for which enabled clients are to be retrieved - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. +**id:** `String` — The ID of the feature flag to delete.
@@ -19929,65 +23957,7 @@ client.connections().clients().get(
-
client.connections.clients.update(id, request) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().clients().update( - "id", - Arrays.asList( - UpdateEnabledClientConnectionsRequestContentItem - .builder() - .clientId("client_id") - .status(true) - .build() - ) -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the connection to modify - -
-
- -
-
- -**request:** `List` - -
-
-
-
- - -
-
-
- -## Connections Keys -
client.connections.keys.get(id) -> List&lt;ConnectionKey&gt; +
client.experimentation.featureFlags.update(id, request) -> UpdateFeatureFlagResponseContent
@@ -19999,7 +23969,7 @@ client.connections().clients().update(
-Gets the connection keys for the Okta or OIDC connection strategy. +Partially update a feature flag by ID. Only provided fields are updated.
@@ -20014,7 +23984,12 @@ Gets the connection keys for the Okta or OIDC connection strategy.
```java -client.connections().keys().get("id"); +client.experimentation().featureFlags().update( + "id", + UpdateFeatureFlagRequestContent + .builder() + .build() +); ```
@@ -20029,64 +24004,31 @@ client.connections().keys().get("id");
-**id:** `String` — ID of the connection +**id:** `String` — The ID of the feature flag to update.
- - - - - - -
- -
client.connections.keys.create(id, request) -> List&lt;PostConnectionsKeysResponseContentItem&gt; -
-
- -#### 📝 Description - -
-
-Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. -
-
+**name:** `Optional` — A human-readable name for the feature flag +
-#### 🔌 Usage - -
-
-
-```java -client.connections().keys().create( - "id", - OptionalNullable.absent() -); -``` -
-
+**description:** `Optional` — A description of what this feature flag controls +
-#### ⚙️ Parameters -
-
-
- -**id:** `String` — ID of the connection +**parameters:** `Optional>`
@@ -20094,7 +24036,7 @@ client.connections().keys().create(
-**request:** `Optional` +**status:** `Optional` — Target lifecycle status (draft → active, draft → archived, active → archived). Activating a flag requires at least 2 variations. When combined with field edits, the edits and the transition are applied together; if the transition is rejected, no edits are applied.
@@ -20106,7 +24048,8 @@ client.connections().keys().create(
-
client.connections.keys.rotate(id, request) -> RotateConnectionsKeysResponseContent +## Experimentation Segments +
client.experimentation.segments.list() -> SyncPagingIterable&lt;Segment&gt;
@@ -20118,7 +24061,7 @@ client.connections().keys().create(
-Rotates the connection keys for the Okta or OIDC connection strategies. +Retrieve a paginated list of segments for the tenant.
@@ -20133,9 +24076,14 @@ Rotates the connection keys for the Okta or OIDC connection strategies.
```java -client.connections().keys().rotate( - "id", - OptionalNullable.absent() +client.experimentation().segments().list( + ListSegmentsRequestParameters + .builder() + .from("from") + .take(1) + .type(SegmentTypeFilterEnum.AUTH0) + .status(SegmentStatusEnum.ACTIVE) + .build() ); ```
@@ -20151,7 +24099,7 @@ client.connections().keys().rotate(
-**id:** `String` — ID of the connection +**from:** `Optional` — Optional Id from which to start selection.
@@ -20159,7 +24107,23 @@ client.connections().keys().rotate(
-**request:** `Optional` +**take:** `Optional` — Number of segments to return per page. Defaults to 25, maximum 50. + +
+
+ +
+
+ +**type:** `Optional` — Filter by type. Exact match. + +
+
+ +
+
+ +**status:** `Optional` — Filter by status. Exact match.
@@ -20171,8 +24135,7 @@ client.connections().keys().rotate(
-## Connections Users -
client.connections.users.deleteByEmail(id) +
client.experimentation.segments.create(request) -> CreateSegmentResponseContent
@@ -20184,7 +24147,7 @@ client.connections().keys().rotate(
-Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. +Create a new segment with rule-based membership criteria for use in experiments.
@@ -20199,11 +24162,17 @@ Deletes a specified connection user by its email (you cannot delete all users fr
```java -client.connections().users().deleteByEmail( - "id", - DeleteConnectionUsersByEmailQueryParameters +client.experimentation().segments().create( + CreateSegmentRequestContent .builder() - .email("email") + .name("name") + .rules( + Arrays.asList( + SegmentRule + .builder() + .build() + ) + ) .build() ); ``` @@ -20220,7 +24189,7 @@ client.connections().users().deleteByEmail(
-**id:** `String` — The id of the connection (currently only database connections are supported) +**name:** `String` — A human-readable name for the segment
@@ -20228,7 +24197,15 @@ client.connections().users().deleteByEmail(
-**email:** `String` — The email of the user to delete +**description:** `Optional` — A description of the segment + +
+
+ +
+
+ +**rules:** `List` — An ordered list of rules. A segment matches if any rule matches. Each rule is limited to 4KB and the whole segment to 10KB (serialized).
@@ -20240,8 +24217,7 @@ client.connections().users().deleteByEmail(
-## Connections DirectoryProvisioning Synchronizations -
client.connections.directoryProvisioning.synchronizations.create(id) -> CreateDirectorySynchronizationResponseContent +
client.experimentation.segments.get(id) -> GetSegmentResponseContent
@@ -20253,7 +24229,7 @@ client.connections().users().deleteByEmail(
-Request an on-demand synchronization of the directory. +Retrieve a single segment by its ID.
@@ -20268,7 +24244,7 @@ Request an on-demand synchronization of the directory.
```java -client.connections().directoryProvisioning().synchronizations().create("id"); +client.experimentation().segments().get("id"); ```
@@ -20283,7 +24259,7 @@ client.connections().directoryProvisioning().synchronizations().create("id");
-**id:** `String` — The id of the connection to trigger synchronization for +**id:** `String` — The ID of the segment to retrieve.
@@ -20295,8 +24271,7 @@ client.connections().directoryProvisioning().synchronizations().create("id");
-## Connections ScimConfiguration Tokens -
client.connections.scimConfiguration.tokens.get(id) -> List&lt;ScimTokenItem&gt; +
client.experimentation.segments.delete(id)
@@ -20308,7 +24283,7 @@ client.connections().directoryProvisioning().synchronizations().create("id");
-Retrieves all scim tokens by its connection `id`. +Delete a segment by ID. Idempotent: returns 204 even if segment does not exist.
@@ -20323,7 +24298,7 @@ Retrieves all scim tokens by its connection `id`.
```java -client.connections().scimConfiguration().tokens().get("id"); +client.experimentation().segments().delete("id"); ```
@@ -20338,7 +24313,7 @@ client.connections().scimConfiguration().tokens().get("id");
-**id:** `String` — The id of the connection to retrieve its SCIM configuration +**id:** `String` — The ID of the segment to delete.
@@ -20350,7 +24325,7 @@ client.connections().scimConfiguration().tokens().get("id");
-
client.connections.scimConfiguration.tokens.create(id, request) -> CreateScimTokenResponseContent +
client.experimentation.segments.update(id, request) -> UpdateSegmentResponseContent
@@ -20362,7 +24337,7 @@ client.connections().scimConfiguration().tokens().get("id");
-Create a scim token for a scim client. +Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array.
@@ -20377,9 +24352,9 @@ Create a scim token for a scim client.
```java -client.connections().scimConfiguration().tokens().create( +client.experimentation().segments().update( "id", - CreateScimTokenRequestContent + UpdateSegmentRequestContent .builder() .build() ); @@ -20397,7 +24372,7 @@ client.connections().scimConfiguration().tokens().create(
-**id:** `String` — The id of the connection to create its SCIM token +**id:** `String` — The ID of the segment to update.
@@ -20405,7 +24380,7 @@ client.connections().scimConfiguration().tokens().create(
-**scopes:** `Optional>` — The scopes of the scim token +**name:** `Optional` — A human-readable name for the segment
@@ -20413,7 +24388,23 @@ client.connections().scimConfiguration().tokens().create(
-**tokenLifetime:** `Optional` — Lifetime of the token in seconds. Must be greater than 900 +**description:** `Optional` — A description of the segment + +
+
+ +
+
+ +**rules:** `Optional>` — Replaces the entire rules array. Each rule is limited to 4KB and the whole segment to 10KB (serialized). + +
+
+ +
+
+ +**status:** `Optional` — Target lifecycle status. Archiving removes the segment from the active pool and is terminal (an archived segment cannot return to active). When combined with field edits, the edits apply first and the transition follows.
@@ -20425,7 +24416,8 @@ client.connections().scimConfiguration().tokens().create(
-
client.connections.scimConfiguration.tokens.delete(id, tokenId) +## Experimentation FeatureFlags Variations +
client.experimentation.featureFlags.variations.list(id) -> ListVariationsResponseContent
@@ -20437,7 +24429,7 @@ client.connections().scimConfiguration().tokens().create(
-Deletes a scim token by its connection `id` and `tokenId`. +Retrieve all variations defined for a specific feature flag.
@@ -20452,7 +24444,7 @@ Deletes a scim token by its connection `id` and `tokenId`.
```java -client.connections().scimConfiguration().tokens().delete("id", "tokenId"); +client.experimentation().featureFlags().variations().list("id"); ```
@@ -20467,15 +24459,7 @@ client.connections().scimConfiguration().tokens().delete("id", "tokenId");
-**id:** `String` — The connection id that owns the SCIM token to delete - -
-
- -
-
- -**tokenId:** `String` — The id of the scim token to delete +**id:** `String` — The ID of the parent feature flag.
@@ -20487,8 +24471,7 @@ client.connections().scimConfiguration().tokens().delete("id", "tokenId");
-## Emails Provider -
client.emails.provider.get() -> GetEmailProviderResponseContent +
client.experimentation.featureFlags.variations.create(id, request) -> CreateVariationResponseContent
@@ -20500,7 +24483,7 @@ client.connections().scimConfiguration().tokens().delete("id", "tokenId");
-Retrieve details of the [email provider configuration](https://auth0.com/docs/customize/email/smtp-email-providers) in your tenant. A list of fields to include or exclude may also be specified. +Create a new variation with parameter overrides for a specific feature flag.
@@ -20515,14 +24498,15 @@ Retrieve details of the [email provider configuration](https://auth0.com/docs/cu
```java -client.emails().provider().get( - GetEmailProviderRequestParameters +client.experimentation().featureFlags().variations().create( + "id", + CreateVariationRequestContent .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) + .name("name") + .overrides( + new HashMap() {{ + put("key", "value"); + }} ) .build() ); @@ -20540,7 +24524,7 @@ client.emails().provider().get(
-**fields:** `Optional` — Comma-separated list of fields to include or exclude (dependent upon include_fields) from the result. Leave empty to retrieve `name` and `enabled`. Additional fields available include `credentials`, `default_from_address`, and `settings`. +**id:** `String` — The ID of the parent feature flag.
@@ -20548,7 +24532,23 @@ client.emails().provider().get(
-**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). +**name:** `String` — A human-readable name for the variation + +
+
+ +
+
+ +**description:** `Optional` — A description of what this variation controls + +
+
+ +
+
+ +**overrides:** `Map` — Configuration overrides for this variation; keys must exist in the parent flag parameters. Empty {} is the baseline (control) variation that overrides nothing.
@@ -20560,7 +24560,7 @@ client.emails().provider().get(
-
client.emails.provider.create(request) -> CreateEmailProviderResponseContent +
client.experimentation.featureFlags.variations.get(id, vid) -> GetVariationResponseContent
@@ -20572,31 +24572,7 @@ client.emails().provider().get(
-Create an [email provider](https://auth0.com/docs/email/providers). The `credentials` object -requires different properties depending on the email provider (which is specified using the `name` property): - -- `mandrill` requires `api_key` -- `sendgrid` requires `api_key` -- `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use - the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in - North America. `eu` or `null` are the only valid values for `region`. -- `mailgun` requires `api_key` and `domain`. Optionally, set `region` to - `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or - `null` are the only valid values for `region`. -- `ses` requires `accessKeyId`, `secretAccessKey`, and `region` -- `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and - `smtp_pass` - -Depending on the type of provider it is possible to specify `settings` object with different configuration -options, which will be used when sending an email: - -- `smtp` provider, `settings` may contain `headers` object. - - When using AWS SES SMTP host, you may provide a name of configuration set in - `X-SES-Configuration-Set` header. Value must be a string. - - When using Sparkpost host, you may provide value for - `X-MSYS_API` header. Value must be an object. -- For `ses` provider, `settings` may contain `message` object, where you can provide - a name of configuration set in `configuration_set_name` property. Value must be a string. +Retrieve a single variation by its ID.
@@ -20611,20 +24587,7 @@ options, which will be used when sending an email:
```java -client.emails().provider().create( - CreateEmailProviderRequestContent - .builder() - .name(EmailProviderNameEnum.MAILGUN) - .credentials( - EmailProviderCredentialsSchema.of( - EmailProviderCredentialsSchemaZero - .builder() - .apiKey("api_key") - .build() - ) - ) - .build() -); +client.experimentation().featureFlags().variations().get("id", "vid"); ```
@@ -20639,7 +24602,7 @@ client.emails().provider().create(
-**name:** `EmailProviderNameEnum` +**id:** `String` — The ID of the parent feature flag.
@@ -20647,47 +24610,37 @@ client.emails().provider().create(
-**enabled:** `Optional` — Whether the provider is enabled (true) or disabled (false). +**vid:** `String` — The ID of the variation to retrieve.
+ + -
-
-**defaultFromAddress:** `Optional` — Email address to use as "from" when no other address specified. -
+
+
client.experimentation.featureFlags.variations.delete(id, vid)
-**credentials:** `EmailProviderCredentialsSchema` - -
-
+#### 📝 Description
-**settings:** `Optional>` - +
+
+ +Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist.
- - - -
- -
client.emails.provider.delete() -
-
- -#### 📝 Description +#### 🔌 Usage
@@ -20695,13 +24648,15 @@ client.emails().provider().create(
-Delete the email provider. +```java +client.experimentation().featureFlags().variations().delete("id", "vid"); +```
-#### 🔌 Usage +#### ⚙️ Parameters
@@ -20709,9 +24664,16 @@ Delete the email provider.
-```java -client.emails().provider().delete(); -``` +**id:** `String` — The ID of the parent feature flag. + +
+
+ +
+
+ +**vid:** `String` — The ID of the variation to delete. +
@@ -20722,7 +24684,7 @@ client.emails().provider().delete();
-
client.emails.provider.update(request) -> UpdateEmailProviderResponseContent +
client.experimentation.featureFlags.variations.update(id, vid, request) -> UpdateVariationResponseContent
@@ -20734,32 +24696,7 @@ client.emails().provider().delete();
-Update an [email provider](https://auth0.com/docs/email/providers). The `credentials` object -requires different properties depending on the email provider (which is specified using the `name` property): - -- `mandrill` requires `api_key` -- `sendgrid` requires `api_key` -- `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use - the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in - North America. `eu` or `null` are the only valid values for `region`. -- `mailgun` requires `api_key` and `domain`. Optionally, set `region` to - `eu` to use the Mailgun service hosted in Europe; set to `null` otherwise. `eu` or - `null` are the only valid values for `region`. -- `ses` requires `accessKeyId`, `secretAccessKey`, and `region` -- `smtp` requires `smtp_host`, `smtp_port`, `smtp_user`, and - `smtp_pass` - -Depending on the type of provider it is possible to specify `settings` object with different configuration -options, which will be used when sending an email: - -- `smtp` provider, `settings` may contain `headers` object. - - When using AWS SES SMTP host, you may provide a name of configuration set in - `X-SES-Configuration-Set` header. Value must be a string. - - When using Sparkpost host, you may provide value for - `X-MSYS_API` header. Value must be an object. - - For `ses` provider, `settings` may contain `message` object, where you can provide - a name of configuration set in `configuration_set_name` property. Value must be a string. +Partially update a variation by ID. Only provided fields are updated.
@@ -20774,8 +24711,10 @@ options, which will be used when sending an email:
```java -client.emails().provider().update( - UpdateEmailProviderRequestContent +client.experimentation().featureFlags().variations().update( + "id", + "vid", + UpdateVariationRequestContent .builder() .build() ); @@ -20793,7 +24732,7 @@ client.emails().provider().update(
-**name:** `Optional` +**id:** `String` — The ID of the parent feature flag.
@@ -20801,7 +24740,7 @@ client.emails().provider().update(
-**enabled:** `Optional` — Whether the provider is enabled (true) or disabled (false). +**vid:** `String` — The ID of the variation to update.
@@ -20809,7 +24748,7 @@ client.emails().provider().update(
-**defaultFromAddress:** `Optional` — Email address to use as "from" when no other address specified. +**name:** `Optional` — A human-readable name for the variation
@@ -20817,7 +24756,7 @@ client.emails().provider().update(
-**credentials:** `Optional` +**description:** `Optional` — A description of what this variation controls
@@ -20825,7 +24764,7 @@ client.emails().provider().update(
-**settings:** `Optional>` +**overrides:** `Optional>`
@@ -20837,8 +24776,8 @@ client.emails().provider().update(
-## EventStreams Deliveries -
client.eventStreams.deliveries.list(id) -> List&lt;EventStreamDelivery&gt; +## Flows Executions +
client.flows.executions.list(flowId) -> SyncPagingIterable&lt;FlowExecutionSummary&gt;
@@ -20851,28 +24790,13 @@ client.emails().provider().update(
```java -client.eventStreams().deliveries().list( - "id", - ListEventStreamDeliveriesRequestParameters +client.flows().executions().list( + "flow_id", + ListFlowExecutionsRequestParameters .builder() - .statuses( - OptionalNullable.of("statuses") - ) - .eventTypes( - OptionalNullable.of("event_types") - ) - .dateFrom( - OptionalNullable.of("date_from") - ) - .dateTo( - OptionalNullable.of("date_to") - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -20889,31 +24813,7 @@ client.eventStreams().deliveries().list(
-**id:** `String` — Unique identifier for the event stream. - -
-
- -
-
- -**statuses:** `Optional` — Comma-separated list of statuses by which to filter - -
-
- -
-
- -**eventTypes:** `Optional` — Comma-separated list of event types by which to filter - -
-
- -
-
- -**dateFrom:** `Optional` — An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. +**flowId:** `String` — Flow id
@@ -20921,249 +24821,7 @@ client.eventStreams().deliveries().list(
-**dateTo:** `Optional` — An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - - - -
- -
client.eventStreams.deliveries.getHistory(id, eventId) -> GetEventStreamDeliveryHistoryResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().deliveries().getHistory("id", "event_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
- -
-
- -**eventId:** `String` — Unique identifier for the event - -
-
-
-
- - -
-
-
- -## EventStreams Redeliveries -
client.eventStreams.redeliveries.create(id, request) -> CreateEventStreamRedeliveryResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().redeliveries().create( - "id", - CreateEventStreamRedeliveryRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
- -
-
- -**dateFrom:** `Optional` — An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. - -
-
- -
-
- -**dateTo:** `Optional` — An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. - -
-
- -
-
- -**statuses:** `Optional>` — Filter by status - -
-
- -
-
- -**eventTypes:** `Optional>` — Filter by event type - -
-
-
-
- - -
-
-
- -
client.eventStreams.redeliveries.createById(id, eventId) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().redeliveries().createById("id", "event_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
- -
-
- -**eventId:** `String` — Unique identifier for the event - -
-
-
-
- - -
-
-
- -## Flows Executions -
client.flows.executions.list(flowId) -> SyncPagingIterable&lt;FlowExecutionSummary&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().executions().list( - "flow_id", - ListFlowExecutionsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**flowId:** `String` — Flow id +**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
@@ -21321,15 +24979,9 @@ client.flows().executions().delete("flow_id", "execution_id"); client.flows().vault().connections().list( ListFlowsVaultConnectionsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -21605,18 +25257,10 @@ client.groups().members().get( "id", GetGroupMembersRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .fields("fields") + .includeFields(true) + .from("from") + .take(1) .build() ); ``` @@ -21709,12 +25353,8 @@ client.groups().roles().list( "id", ListGroupRolesRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -22195,7 +25835,7 @@ client.guardian().factors().set(
-**name:** `GuardianFactorNameEnum` — Factor name. Can be `sms`, `push-notification`, `email`, `duo` `otp` `webauthn-roaming`, `webauthn-platform`, or `recovery-code`. +**name:** `GuardianFactorNameEnum` — Factor name. Can be `sms`, `push-notification`, `email`, `duo`, `otp`, `webauthn-roaming`, `webauthn-platform`, `recovery-code`, or `passkey`.
@@ -22321,6 +25961,114 @@ client.guardian().policies().set(
+
+
+
+ +## Guardian Factors Email +
client.guardian.factors.email.get() -> GetEmailFactorSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +TODO: Link this endpoint to relevant documentation when available. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.guardian().factors().email().get(); +``` +
+
+
+
+ + +
+
+
+ +
client.guardian.factors.email.set(request) -> SetEmailFactorSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +TODO: Link this endpoint to relevant documentation when available. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.guardian().factors().email().set( + SetEmailFactorSettingsRequestContent + .builder() + .otpLength(1) + .otpExpirationTime(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**otpLength:** `Integer` — The length of the OTP code. + +
+
+ +
+
+ +**otpExpirationTime:** `Integer` — The OTP expiration time in seconds. + +
+
+
+
+ +
@@ -22627,6 +26375,113 @@ client.guardian().factors().phone().setProvider( + + +
+ +
client.guardian.factors.phone.get() -> GetPhoneFactorSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +TODO: Link this endpoint to relevant documentation when available. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.guardian().factors().phone().get(); +``` +
+
+
+
+ + +
+
+
+ +
client.guardian.factors.phone.set(request) -> SetPhoneFactorSettingsResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +TODO: Link this endpoint to relevant documentation when available. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.guardian().factors().phone().set( + SetPhoneFactorSettingsRequestContent + .builder() + .otpLength(1) + .otpExpirationTime(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**otpLength:** `Integer` — The length of the OTP code. + +
+
+ +
+
+ +**otpExpirationTime:** `Integer` — The OTP expiration time in seconds. + +
+
+
+
+ +
@@ -23703,7 +27558,7 @@ client.guardian().factors().sms().setProvider(
-
client.guardian.factors.sms.getTemplates() -> GetGuardianFactorSmsTemplatesResponseContent +
client.guardian.factors.sms.getTemplates() -> Optional&lt;GetGuardianFactorSmsTemplatesResponseContent&gt;
@@ -24354,6 +28209,7 @@ Import users from a ## Jobs Errors -
client.jobs.errors.get(id) -> ErrorsGetResponse +
client.jobs.errors.get(id) -> Optional&lt;ErrorsGetResponse&gt;
@@ -24687,15 +28543,9 @@ Retrieve details of all the encryption keys associated with your tenant. client.keys().encryption().list( ListEncryptionKeysRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -25064,6 +28914,231 @@ 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. + +
+
+
+
+ + +
+
+
+ +
client.keys.networkAcls.delete(id) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a key used to verify HTTP Message Signatures on Network ACL rules +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.keys().networkAcls().delete("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the Network ACL Key to delete. + +
+
+
+
+ +
@@ -25273,21 +29348,11 @@ client.organizations().clientGrants().list( "id", ListOrganizationClientGrantsRequestParameters .builder() - .audience( - OptionalNullable.of("audience") - ) - .clientId( - OptionalNullable.of("client_id") - ) - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .audience("audience") + .clientId("client_id") + .page(1) + .perPage(1) + .includeTotals(true) .grantIds( Arrays.asList("grant_ids") ) @@ -25315,15 +29380,216 @@ client.organizations().clientGrants().list(
-**audience:** `Optional` — Optional filter on audience of the client grant. +**audience:** `Optional` — Optional filter on audience of the client grant. + +
+
+ +
+
+ +**clientId:** `Optional` — Optional filter on client_id of the client grant. + +
+
+ +
+
+ +**grantIds:** `Optional` — Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../client-grants?grant_ids=id1&grant_ids=id2 + +
+
+ +
+
+ +**page:** `Optional` — Page index of the results to return. First page is 0. + +
+
+ +
+
+ +**perPage:** `Optional` — Number of results per page. Defaults to 50. + +
+
+ +
+
+ +**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ + + + + + +
+ +
client.organizations.clientGrants.create(id, request) -> AssociateOrganizationClientGrantResponseContent +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().clientGrants().create( + "id", + AssociateOrganizationClientGrantRequestContent + .builder() + .grantId("grant_id") + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Organization identifier. + +
+
+ +
+
+ +**grantId:** `String` — A Client Grant ID to add to the organization. + +
+
+
+
+ + +
+
+
+ +
client.organizations.clientGrants.delete(id, grantId) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().clientGrants().delete("id", "grant_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Organization identifier. + +
+
+ +
+
+ +**grantId:** `String` — The Client Grant ID to remove from the organization
+
+
+ + +
+
+
+## Organizations Clients +
client.organizations.clients.list(id) -> SyncPagingIterable&lt;OrganizationClient&gt;
-**clientId:** `Optional` — Optional filter on client_id of the client grant. +#### 📝 Description + +
+
+ +
+
+ +List all clients associated with an organization, using checkpoint pagination. +
    +
  • + Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. +
  • +
+
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().clients().list( + "id", + ListOrganizationClientsRequestParameters + .builder() + .from("from") + .take(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the organization.
@@ -25331,7 +29597,7 @@ client.organizations().clientGrants().list(
-**grantIds:** `Optional` — Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../client-grants?grant_ids=id1&grant_ids=id2 +**from:** `Optional` — Optional Id from which to start selection.
@@ -25339,15 +29605,75 @@ client.organizations().clientGrants().list(
-**page:** `Optional` — Page index of the results to return. First page is 0. +**take:** `Optional` — Number of results per page. Defaults to 50. Values greater than the maximum of 100 are capped at 100.
+
+
+ + +
+
+
+
client.organizations.clients.create(id, request) -> List&lt;OrganizationClient&gt;
-**perPage:** `Optional` — Number of results per page. Defaults to 50. +#### 📝 Description + +
+
+ +
+
+ +Associate one or more clients with an organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().clients().create( + "id", + CreateOrganizationClientsRequestContent + .builder() + .clients( + Arrays.asList( + CreateOrganizationClientRequestItem + .builder() + .clientId("client_id") + .useForMemberAccess(true) + .build() + ) + ) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the organization.
@@ -25355,7 +29681,7 @@ client.organizations().clientGrants().list(
-**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). +**clients:** `List` — List of clients to associate with the organization.
@@ -25367,10 +29693,24 @@ client.organizations().clientGrants().list(
-
client.organizations.clientGrants.create(id, request) -> AssociateOrganizationClientGrantResponseContent +
client.organizations.clients.delete(id, request) +
+
+ +#### 📝 Description +
+
+
+ +Remove one or more client associations from an organization. +
+
+
+
+ #### 🔌 Usage
@@ -25380,11 +29720,13 @@ client.organizations().clientGrants().list(
```java -client.organizations().clientGrants().create( +client.organizations().clients().delete( "id", - AssociateOrganizationClientGrantRequestContent + DeleteOrganizationClientsRequestContent .builder() - .grantId("grant_id") + .clients( + Arrays.asList("clients") + ) .build() ); ``` @@ -25401,7 +29743,7 @@ client.organizations().clientGrants().create(
-**id:** `String` — Organization identifier. +**id:** `String` — ID of the organization.
@@ -25409,7 +29751,7 @@ client.organizations().clientGrants().create(
-**grantId:** `String` — A Client Grant ID to add to the organization. +**clients:** `List` — List of client IDs to disassociate from the organization.
@@ -25421,10 +29763,24 @@ client.organizations().clientGrants().create(
-
client.organizations.clientGrants.delete(id, grantId) +
client.organizations.clients.get(id, clientId) -> GetOrganizationClientResponseContent
+#### 📝 Description + +
+
+ +
+
+ +Get a specific client association for an organization. +
+
+
+
+ #### 🔌 Usage
@@ -25434,7 +29790,7 @@ client.organizations().clientGrants().create(
```java -client.organizations().clientGrants().delete("id", "grant_id"); +client.organizations().clients().get("id", "client_id"); ```
@@ -25449,7 +29805,7 @@ client.organizations().clientGrants().delete("id", "grant_id");
-**id:** `String` — Organization identifier. +**id:** `String` — ID of the organization.
@@ -25457,7 +29813,83 @@ client.organizations().clientGrants().delete("id", "grant_id");
-**grantId:** `String` — The Client Grant ID to remove from the organization +**clientId:** `String` — ID of the client association to retrieve. + +
+
+
+
+ + + + +
+ +
client.organizations.clients.update(id, clientId, request) -> UpdateOrganizationClientResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update an organization client association. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().clients().update( + "id", + "client_id", + UpdateOrganizationClientRequestContent + .builder() + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — ID of the organization. + +
+
+ +
+
+ +**clientId:** `String` — ID of the client association to update. + +
+
+ +
+
+ +**useForMemberAccess:** `Optional` — Whether this client is used for member access to the organization.
@@ -25487,18 +29919,10 @@ client.organizations().connections().list( "id", ListOrganizationAllConnectionsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .isEnabled( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) + .isEnabled(true) .build() ); ``` @@ -25641,6 +30065,14 @@ client.organizations().connections().create(
+**organizationMemberAccessLevel:** `Optional` + +
+
+ +
+
+ **isEnabled:** `Optional` — Whether the connection is enabled for the organization.
@@ -25847,6 +30279,14 @@ client.organizations().connections().update(
+**organizationMemberAccessLevel:** `Optional` + +
+
+ +
+
+ **isEnabled:** `Optional` — Whether the connection is enabled for the organization.
@@ -25892,12 +30332,8 @@ client.organizations().discoveryDomains().list( "id", ListOrganizationDiscoveryDomainsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -26330,15 +30766,9 @@ client.organizations().enabledConnections().list( "id", ListOrganizationConnectionsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -26735,24 +31165,12 @@ client.organizations().invitations().list( "id", ListOrganizationInvitationsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .sort( - OptionalNullable.of("sort") - ) + .page(1) + .perPage(1) + .includeTotals(true) + .fields("fields") + .includeFields(true) + .sort("sort") .build() ); ``` @@ -26991,12 +31409,8 @@ client.organizations().invitations().get( "invitation_id", GetOrganizationInvitationRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -27114,7 +31528,7 @@ List organization members. This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. - Use the `fields` parameter to optionally define the specific member details retrieved. If `fields` is left blank, all fields (except roles) are returned. -- Member roles are not sent by default. Use `fields=roles` to retrieve the roles assigned to each listed member. To use this parameter, you must include the `read:organization_member_roles` scope in the token. +- Member roles are not sent by default. Use `fields=roles` to retrieve the roles assigned to each listed member. To use this parameter, you must include the `read:organization_member_roles` scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use `GET /api/v2/organizations/{id}/members/{user_id}/effective-roles`. This endpoint supports two types of pagination: @@ -27144,18 +31558,11 @@ client.organizations().members().list( "id", ListOrganizationMembersRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .includeTotals(true) + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -27180,6 +31587,14 @@ client.organizations().members().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -27376,12 +31791,8 @@ client.organizations().groups().list( "organization_id", ListOrganizationGroupsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -27459,12 +31870,8 @@ client.organizations().groups().roles().list( "group_id", ListOrganizationGroupRolesRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -27708,12 +32115,8 @@ client.organizations().members().effectiveRoles().list( "user_id", ListOrganizationMemberEffectiveRolesRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -27782,6 +32185,8 @@ client.organizations().members().effectiveRoles().list( Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included. + +**Note**: Returns only direct role assignments for this member. To also include group-based role assignments, use `GET /api/v2/organizations/{id}/members/{user_id}/effective-roles`.
@@ -27801,14 +32206,186 @@ client.organizations().members().roles().list( "user_id", ListOrganizationMemberRolesRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) + .page(1) + .perPage(1) + .includeTotals(true) + .build() +); +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Organization identifier. + +
+
+ +
+
+ +**userId:** `String` — ID of the user to associate roles with. + +
+
+ +
+
+ +**page:** `Optional` — Page index of the results to return. First page is 0. + +
+
+ +
+
+ +**perPage:** `Optional` — Number of results per page. Defaults to 50. + +
+
+ +
+
+ +**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+
+
+ + + + +
+ +
client.organizations.members.roles.assign(id, userId, request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Assign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) to a user to determine their access for a specific Organization. + +Users can be members of multiple Organizations with unique roles assigned for each membership. This action assigns roles to a user only for the specified Organization. Roles cannot be assigned to a user across multiple Organizations in the same call. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().members().roles().assign( + "id", + "user_id", + AssignOrganizationMemberRolesRequestContent + .builder() + .roles( + Arrays.asList("roles") ) - .includeTotals( - OptionalNullable.of(true) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Organization identifier. + +
+
+ +
+
+ +**userId:** `String` — ID of the user to associate roles with. + +
+
+ +
+
+ +**roles:** `List` — List of roles IDs to associated with the user. + +
+
+
+
+ + +
+
+
+ +
client.organizations.members.roles.delete(id, userId, request) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove one or more Organization-specific [roles](https://auth0.com/docs/manage-users/access-control/rbac) from a given user. + +Users can be members of multiple Organizations with unique roles assigned for each membership. This action removes roles from a user in relation to the specified Organization. Roles assigned to the user within a different Organization cannot be managed in the same call. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().members().roles().delete( + "id", + "user_id", + DeleteOrganizationMemberRolesRequestContent + .builder() + .roles( + Arrays.asList("roles") ) .build() ); @@ -27834,7 +32411,87 @@ client.organizations().members().roles().list(
-**userId:** `String` — ID of the user to associate roles with. +**userId:** `String` — User ID of the organization member to remove roles from. + +
+
+ +
+
+ +**roles:** `List` — List of roles IDs associated with the organization member to remove. + +
+
+
+
+ + +
+
+
+ +## Organizations Members EffectiveRoles Sources Groups +
client.organizations.members.effectiveRoles.sources.groups.list(id, userId) -> SyncPagingIterable&lt;Group&gt; +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists the groups which grant the org member a given role. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.organizations().members().effectiveRoles().sources().groups().list( + "id", + "user_id", + ListOrganizationMemberRoleSourceGroupsRequestParameters + .builder() + .roleId("role_id") + .from("from") + .take(1) + .build() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `String` — Organization identifier. + +
+
+ +
+
+ +**userId:** `String` — ID of the user to list role source groups for.
@@ -27842,7 +32499,7 @@ client.organizations().members().roles().list(
-**page:** `Optional` — Page index of the results to return. First page is 0. +**from:** `Optional` — Optional Id from which to start selection.
@@ -27850,7 +32507,7 @@ client.organizations().members().roles().list(
-**perPage:** `Optional` — Number of results per page. Defaults to 50. +**take:** `Optional` — Number of results per page. Defaults to 50.
@@ -27858,7 +32515,7 @@ client.organizations().members().roles().list(
-**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). +**roleId:** `String` — The role ID to get group sources for.
@@ -27870,7 +32527,8 @@ client.organizations().members().roles().list(
-
client.organizations.members.roles.assign(id, userId, request) +## Organizations Roles Members +
client.organizations.roles.members.list(id, roleId) -> SyncPagingIterable&lt;RoleMember&gt;
@@ -27882,9 +32540,12 @@ client.organizations().members().roles().list(
-Assign one or more [roles](https://auth0.com/docs/manage-users/access-control/rbac) to a user to determine their access for a specific Organization. - -Users can be members of multiple Organizations with unique roles assigned for each membership. This action assigns roles to a user only for the specified Organization. Roles cannot be assigned to a user across multiple Organizations in the same call. +List the organization members assigned a specific role within the context of an organization. +
    +
  • + Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. +
  • +
@@ -27899,14 +32560,15 @@ Users can be members of multiple Organizations with unique roles assigned for ea
```java -client.organizations().members().roles().assign( +client.organizations().roles().members().list( "id", - "user_id", - AssignOrganizationMemberRolesRequestContent + "role_id", + ListOrganizationRoleMembersRequestParameters .builder() - .roles( - Arrays.asList("roles") - ) + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -27923,7 +32585,7 @@ client.organizations().members().roles().assign(
-**id:** `String` — Organization identifier. +**id:** `String` — ID of the organization.
@@ -27931,7 +32593,7 @@ client.organizations().members().roles().assign(
-**userId:** `String` — ID of the user to associate roles with. +**roleId:** `String` — ID of the role to retrieve the assigned members for.
@@ -27939,72 +32601,15 @@ client.organizations().members().roles().assign(
-**roles:** `List` — List of roles IDs to associated with the user. +**from:** `Optional` — Optional Id from which to start selection.
-
-
- - - -
- -
client.organizations.members.roles.delete(id, userId, request)
-#### 📝 Description - -
-
- -
-
- -Remove one or more Organization-specific [roles](https://auth0.com/docs/manage-users/access-control/rbac) from a given user. - -Users can be members of multiple Organizations with unique roles assigned for each membership. This action removes roles from a user in relation to the specified Organization. Roles assigned to the user within a different Organization cannot be managed in the same call. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().members().roles().delete( - "id", - "user_id", - DeleteOrganizationMemberRolesRequestContent - .builder() - .roles( - Arrays.asList("roles") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. +**take:** `Optional` — Number of results per page. Defaults to 50. Values above the maximum permitted size are capped.
@@ -28012,7 +32617,7 @@ client.organizations().members().roles().delete(
-**userId:** `String` — User ID of the organization member to remove roles from. +**fields:** `Optional` — Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
@@ -28020,7 +32625,7 @@ client.organizations().members().roles().delete(
-**roles:** `List` — List of roles IDs associated with the organization member to remove. +**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). Defaults to true.
@@ -28032,8 +32637,8 @@ client.organizations().members().roles().delete(
-## Organizations Members EffectiveRoles Sources Groups -
client.organizations.members.effectiveRoles.sources.groups.list(id, userId) -> SyncPagingIterable&lt;Group&gt; +## Organizations Roles Groups +
client.organizations.roles.groups.list(organizationId, roleId) -> SyncPagingIterable&lt;RoleGroup&gt;
@@ -28045,7 +32650,7 @@ client.organizations().members().roles().delete(
-Lists the groups which grant the org member a given role. +Retrieve the list of groups assigned to a role in the context of an organization.
@@ -28060,18 +32665,13 @@ Lists the groups which grant the org member a given role.
```java -client.organizations().members().effectiveRoles().sources().groups().list( - "id", - "user_id", - ListOrganizationMemberRoleSourceGroupsRequestParameters +client.organizations().roles().groups().list( + "organization_id", + "role_id", + ListOrganizationRoleGroupsRequestParameters .builder() - .roleId("role_id") - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -28088,7 +32688,7 @@ client.organizations().members().effectiveRoles().sources().groups().list(
-**id:** `String` — Organization identifier. +**organizationId:** `String` — ID of the organization.
@@ -28096,7 +32696,7 @@ client.organizations().members().effectiveRoles().sources().groups().list(
-**userId:** `String` — ID of the user to list role source groups for. +**roleId:** `String` — ID of the role.
@@ -28114,14 +32714,6 @@ client.organizations().members().effectiveRoles().sources().groups().list( **take:** `Optional` — Number of results per page. Defaults to 50. -
-
- -
-
- -**roleId:** `String` — The role ID to get group sources for. -
@@ -28163,30 +32755,14 @@ Get render setting configurations for all screens. client.prompts().rendering().list( ListAculsRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .prompt( - OptionalNullable.of("prompt") - ) - .screen( - OptionalNullable.of("screen") - ) - .renderingMode( - OptionalNullable.of(AculRenderingModeEnum.ADVANCED) - ) + .fields("fields") + .includeFields(true) + .page(1) + .perPage(1) + .includeTotals(true) + .prompt("prompt") + .screen("screen") + .renderingMode(AculRenderingModeEnum.ADVANCED) .build() ); ``` @@ -29007,12 +33583,8 @@ client.roles().groups().get( "id", ListRoleGroupsParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -29229,15 +33801,9 @@ client.roles().permissions().list( "id", ListRolePermissionsRequestParameters .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .perPage(1) + .page(1) + .includeTotals(true) .build() ); ``` @@ -29457,6 +34023,8 @@ client.roles().permissions().delete( Retrieve list of users associated with a specific role. For Dashboard instructions, review [View Users Assigned to Roles](https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles). +**Note**: Returns only users with direct role assignments. For groups assigned to this role, use `GET /api/v2/roles/{id}/groups`. + This endpoint supports two types of pagination: - Offset pagination @@ -29490,12 +34058,9 @@ client.roles().users().list( "id", ListRoleUsersRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -29520,6 +34085,14 @@ client.roles().users().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -29888,6 +34461,22 @@ client.selfServiceProfiles().ssoTicket().create(
+**thirdPartyClientAccessConfig:** `Optional` + +
+
+ +
+
+ +**universalLogoutConfig:** `Optional` + +
+
+ +
+
+ **enabledFeatures:** `Optional`
@@ -29994,12 +34583,8 @@ Retrieve tenant settings. A list of fields to include or exclude may also be spe client.tenants().settings().get( GetTenantSettingsRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) + .fields("fields") + .includeFields(true) .build() ); ``` @@ -30282,6 +34867,14 @@ client.tenants().settings().update(
+**accessToken:** `Optional` + +
+
+ +
+
+ **securityHeaders:** `Optional`
@@ -30362,6 +34955,14 @@ client.tenants().settings().update(
+**dpopStrictRefreshTokenBinding:** `Optional` — Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility. + +
+
+ +
+
+ **skipNonVerifiableCallbackUriConfirmationPrompt:** `Optional` Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). @@ -30390,6 +34991,14 @@ See https://auth0.com/docs/secure/security-guidance/measures-against-app-imperso
+**clientIdMetadataDocumentDynamicRegistrationSupported:** `Optional` — Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled. + +
+
+ +
+
+ **enableAiGuide:** `Optional` — Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant.
@@ -30466,15 +35075,9 @@ client.users().authenticationMethods().list( "id", ListUserAuthenticationMethodsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -30775,171 +35378,7 @@ client.users().authenticationMethods().set(
-**request:** `List` - -
-
-
-
- - - -
-
- -
client.users.authenticationMethods.deleteAll(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticationMethods().deleteAll("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user in question. - -
-
-
-
- - -
-
-
- -
client.users.authenticationMethods.get(id, authenticationMethodId) -> GetUserAuthenticationMethodResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticationMethods().get("id", "authentication_method_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user in question. - -
-
- -
-
- -**authenticationMethodId:** `String` — The ID of the authentication methods in question. - -
-
-
-
- - -
-
-
- -
client.users.authenticationMethods.delete(id, authenticationMethodId) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove the authentication method with the given ID from the specified user. For more information, review Manage Authentication Methods with Management API. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticationMethods().delete("id", "authentication_method_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user in question. - -
-
- -
-
- -**authenticationMethodId:** `String` — The ID of the authentication method to delete. +**request:** `List`
@@ -30951,7 +35390,7 @@ client.users().authenticationMethods().delete("id", "authentication_method_id");
-
client.users.authenticationMethods.update(id, authenticationMethodId, request) -> UpdateUserAuthenticationMethodResponseContent +
client.users.authenticationMethods.deleteAll(id)
@@ -30963,7 +35402,7 @@ client.users().authenticationMethods().delete("id", "authentication_method_id");
-Modify the authentication method with the given ID from the specified user. For more information, review Manage Authentication Methods with Management API. +Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone.
@@ -30978,13 +35417,7 @@ Modify the authentication method with the given ID from the specified user. For
```java -client.users().authenticationMethods().update( - "id", - "authentication_method_id", - UpdateUserAuthenticationMethodRequestContent - .builder() - .build() -); +client.users().authenticationMethods().deleteAll("id"); ```
@@ -31003,19 +35436,43 @@ client.users().authenticationMethods().update( + + + + + +
+ +
client.users.authenticationMethods.get(id, authenticationMethodId) -> GetUserAuthenticationMethodResponseContent
-**authenticationMethodId:** `String` — The ID of the authentication method to update. - +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.users().authenticationMethods().get("id", "authentication_method_id"); +```
+
+
+ +#### ⚙️ Parameters
-**name:** `Optional` — A human-readable label to identify the authentication method. +
+
+ +**id:** `String` — The ID of the user in question.
@@ -31023,7 +35480,7 @@ client.users().authenticationMethods().update(
-**preferredAuthenticationMethod:** `Optional` — Preferred phone authentication method +**authenticationMethodId:** `String` — The ID of the authentication methods in question.
@@ -31035,8 +35492,7 @@ client.users().authenticationMethods().update(
-## Users Authenticators -
client.users.authenticators.deleteAll(id) +
client.users.authenticationMethods.delete(id, authenticationMethodId)
@@ -31048,7 +35504,7 @@ client.users().authenticationMethods().update(
-Remove all authenticators registered to a given user ID, such as OTP, email, phone, and push-notification. This action cannot be undone. For more information, review [Manage Authentication Methods with Management API](https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api). +Remove the authentication method with the given ID from the specified user. For more information, review Manage Authentication Methods with Management API.
@@ -31063,7 +35519,7 @@ Remove all authenticators registered to a given user ID, such as OTP, email, pho
```java -client.users().authenticators().deleteAll("id"); +client.users().authenticationMethods().delete("id", "authentication_method_id"); ```
@@ -31078,7 +35534,15 @@ client.users().authenticators().deleteAll("id");
-**id:** `String` — ID of the user to delete. +**id:** `String` — The ID of the user in question. + +
+
+ +
+
+ +**authenticationMethodId:** `String` — The ID of the authentication method to delete.
@@ -31090,8 +35554,7 @@ client.users().authenticators().deleteAll("id");
-## Users ConnectedAccounts -
client.users.connectedAccounts.list(id) -> SyncPagingIterable&lt;ConnectedAccount&gt; +
client.users.authenticationMethods.update(id, authenticationMethodId, request) -> UpdateUserAuthenticationMethodResponseContent
@@ -31103,7 +35566,7 @@ client.users().authenticators().deleteAll("id");
-Retrieve all connected accounts associated with the user. +Modify the authentication method with the given ID from the specified user. For more information, review Manage Authentication Methods with Management API.
@@ -31118,16 +35581,11 @@ Retrieve all connected accounts associated with the user.
```java -client.users().connectedAccounts().list( +client.users().authenticationMethods().update( "id", - GetUserConnectedAccountsRequestParameters + "authentication_method_id", + UpdateUserAuthenticationMethodRequestContent .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) .build() ); ``` @@ -31144,7 +35602,7 @@ client.users().connectedAccounts().list(
-**id:** `String` — ID of the user to list connected accounts for. +**id:** `String` — The ID of the user in question.
@@ -31152,7 +35610,7 @@ client.users().connectedAccounts().list(
-**from:** `Optional` — Optional Id from which to start selection. +**authenticationMethodId:** `String` — The ID of the authentication method to update.
@@ -31160,7 +35618,15 @@ client.users().connectedAccounts().list(
-**take:** `Optional` — Number of results to return. Defaults to 10 with a maximum of 20 +**name:** `Optional` — A human-readable label to identify the authentication method. + +
+
+ +
+
+ +**preferredAuthenticationMethod:** `Optional` — Preferred phone authentication method
@@ -31172,8 +35638,8 @@ client.users().connectedAccounts().list(
-## Users EffectivePermissions -
client.users.effectivePermissions.list(id) -> SyncPagingIterable&lt;UserEffectivePermissionResponseContent&gt; +## Users Authenticators +
client.users.authenticators.deleteAll(id)
@@ -31185,7 +35651,7 @@ client.users().connectedAccounts().list(
-Returns the list of effective permissions for a user, taking into account permissions granted directly to the user, as well as those inherited through roles and group memberships. +Remove all authenticators registered to a given user ID, such as OTP, email, phone, and push-notification. This action cannot be undone. For more information, review [Manage Authentication Methods with Management API](https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api).
@@ -31200,19 +35666,7 @@ Returns the list of effective permissions for a user, taking into account permis
```java -client.users().effectivePermissions().list( - "id", - ListUserEffectivePermissionsRequestParameters - .builder() - .resourceServerIdentifier("resource_server_identifier") - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); +client.users().authenticators().deleteAll("id"); ```
@@ -31227,31 +35681,7 @@ client.users().effectivePermissions().list(
-**id:** `String` — ID of the user to retrieve the permissions for. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**resourceServerIdentifier:** `String` — The identifier of the resource server for which to calculate user permissions. +**id:** `String` — ID of the user to delete.
@@ -31263,8 +35693,8 @@ client.users().effectivePermissions().list(
-## Users EffectiveRoles -
client.users.effectiveRoles.list(id) -> SyncPagingIterable&lt;UserEffectiveRole&gt; +## Users ConnectedAccounts +
client.users.connectedAccounts.list(id) -> SyncPagingIterable&lt;ConnectedAccount&gt;
@@ -31276,7 +35706,7 @@ client.users().effectivePermissions().list(
-Retrieve detailed list of effective roles for a user, including roles assigned directly and through group memberships. +Retrieve all connected accounts associated with the user.
@@ -31291,16 +35721,12 @@ Retrieve detailed list of effective roles for a user, including roles assigned d
```java -client.users().effectiveRoles().list( +client.users().connectedAccounts().list( "id", - ListUserEffectiveRolesRequestParameters + GetUserConnectedAccountsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -31317,7 +35743,7 @@ client.users().effectiveRoles().list(
-**id:** `String` — ID of the user to list effective roles for. +**id:** `String` — ID of the user to list connected accounts for.
@@ -31333,7 +35759,7 @@ client.users().effectiveRoles().list(
-**take:** `Optional` — Number of results per page. Defaults to 50. +**take:** `Optional` — Number of results to return. Defaults to 10 with a maximum of 20
@@ -31345,8 +35771,8 @@ client.users().effectiveRoles().list(
-## Users Enrollments -
client.users.enrollments.get(id) -> List&lt;UsersEnrollment&gt; +## Users EffectivePermissions +
client.users.effectivePermissions.list(id) -> SyncPagingIterable&lt;UserEffectivePermissionResponseContent&gt;
@@ -31358,7 +35784,7 @@ client.users().effectiveRoles().list(
-Retrieve the first [multi-factor authentication](https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors) enrollment that a specific user has confirmed. +Returns the list of effective permissions for a user, taking into account permissions granted directly to the user, as well as those inherited through roles and group memberships.
@@ -31373,7 +35799,15 @@ Retrieve the first [multi-factor authentication](https://auth0.com/docs/secure/m
```java -client.users().enrollments().get("id"); +client.users().effectivePermissions().list( + "id", + ListUserEffectivePermissionsRequestParameters + .builder() + .resourceServerIdentifier("resource_server_identifier") + .from("from") + .take(1) + .build() +); ```
@@ -31388,7 +35822,31 @@ client.users().enrollments().get("id");
-**id:** `String` — ID of the user to list enrollments for. +**id:** `String` — ID of the user to retrieve the permissions for. + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50. + +
+
+ +
+
+ +**resourceServerIdentifier:** `String` — The identifier of the resource server for which to calculate user permissions.
@@ -31400,8 +35858,8 @@ client.users().enrollments().get("id");
-## Users FederatedConnectionsTokensets -
client.users.federatedConnectionsTokensets.list(id) -> List&lt;FederatedConnectionTokenSet&gt; +## Users EffectiveRoles +
client.users.effectiveRoles.list(id) -> SyncPagingIterable&lt;UserEffectiveRole&gt;
@@ -31413,7 +35871,7 @@ client.users().enrollments().get("id");
-List active federated connections tokensets for a provided user +Retrieve detailed list of effective roles for a user, including roles assigned directly and through group memberships.
@@ -31428,7 +35886,14 @@ List active federated connections tokensets for a provided user
```java -client.users().federatedConnectionsTokensets().list("id"); +client.users().effectiveRoles().list( + "id", + ListUserEffectiveRolesRequestParameters + .builder() + .from("from") + .take(1) + .build() +); ```
@@ -31443,7 +35908,23 @@ client.users().federatedConnectionsTokensets().list("id");
-**id:** `String` — User identifier +**id:** `String` — ID of the user to list effective roles for. + +
+
+ +
+
+ +**from:** `Optional` — Optional Id from which to start selection. + +
+
+ +
+
+ +**take:** `Optional` — Number of results per page. Defaults to 50.
@@ -31455,11 +35936,12 @@ client.users().federatedConnectionsTokensets().list("id");
-
client.users.federatedConnectionsTokensets.delete(id, tokensetId) +## Users Enrollments +
client.users.enrollments.get(id) -> List&lt;UsersEnrollment&gt;
-#### 🔌 Usage +#### 📝 Description
@@ -31467,15 +35949,13 @@ client.users().federatedConnectionsTokensets().list("id");
-```java -client.users().federatedConnectionsTokensets().delete("id", "tokenset_id"); -``` +Retrieve the first [multi-factor authentication](https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors) enrollment that a specific user has confirmed.
-#### ⚙️ Parameters +#### 🔌 Usage
@@ -31483,15 +35963,23 @@ client.users().federatedConnectionsTokensets().delete("id", "tokenset_id");
-**id:** `String` — Id of the user that owns the tokenset - +```java +client.users().enrollments().get("id"); +```
+
+
+ +#### ⚙️ Parameters
-**tokensetId:** `String` — The tokenset id +
+
+ +**id:** `String` — ID of the user to list enrollments for.
@@ -31535,18 +36023,11 @@ client.users().groups().get( "id", GetUserGroupsRequestParameters .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .fields("fields") + .includeFields(true) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -31587,6 +36068,14 @@ client.users().groups().get(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). The returned total reflects at most 1,000 results. + +
+
+ +
+
+ **from:** `Optional` — Optional Id from which to start selection.
@@ -31837,18 +36326,10 @@ client.users().logs().list( "id", ListUserLogsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .sort( - OptionalNullable.of("sort") - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .sort("sort") + .includeTotals(true) .build() ); ``` @@ -32040,6 +36521,22 @@ client.users().multifactor().deleteProvider("id", UserMultifactorProviderEnum.DU
Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review [Auth0 Organizations](https://auth0.com/docs/manage-users/organizations). + +This endpoint supports two types of pagination: + +- Offset pagination +- Checkpoint pagination + +Checkpoint pagination must be used if you need to retrieve more than 1000 organizations. + +**Checkpoint Pagination** + +To search by checkpoint, use the following parameters: + +- `from`: Optional id from which to start selection. +- `take`: The total number of entries to retrieve when using the `from` parameter. Defaults to 50. + +**Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining.
@@ -32058,15 +36555,9 @@ client.users().organizations().list( "id", ListUserOrganizationsRequestParameters .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .page(1) + .perPage(1) + .includeTotals(true) .build() ); ``` @@ -32133,6 +36624,8 @@ client.users().organizations().list(
Retrieve all permissions associated with the user. + +**Note**: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use `GET /api/v2/users/{id}/effective-permissions`.
@@ -32151,15 +36644,9 @@ client.users().permissions().list( "id", ListUserPermissionsRequestParameters .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .perPage(1) + .page(1) + .includeTotals(true) .build() ); ``` @@ -32460,6 +36947,8 @@ client.users().riskAssessments().clear( Retrieve detailed list of all user roles currently assigned to a user. **Note**: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: [Get user roles assigned to an Organization member](https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles). + +**Note**: Returns only direct role assignments. To also include group-based role assignments, use `GET /api/v2/users/{id}/effective-roles`.
@@ -32478,15 +36967,9 @@ client.users().roles().list( "id", ListUserRolesRequestParameters .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) + .perPage(1) + .page(1) + .includeTotals(true) .build() ); ``` @@ -32715,12 +37198,9 @@ client.users().refreshToken().list( "user_id", ListRefreshTokensRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -32745,6 +37225,14 @@ client.users().refreshToken().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — An optional cursor from which to start the selection (exclusive).
@@ -32851,12 +37339,9 @@ client.users().sessions().list( "user_id", ListUserSessionsRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .includeTotals(true) + .from("from") + .take(1) .build() ); ``` @@ -32881,6 +37366,14 @@ client.users().sessions().list(
+**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + +
+
+ +
+
+ **from:** `Optional` — An optional cursor from which to start the selection (exclusive).
@@ -32989,12 +37482,8 @@ client.users().effectivePermissions().sources().roles().list( .builder() .resourceServerIdentifier("resource_server_identifier") .permissionName("permission_name") - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -33088,12 +37577,8 @@ client.users().effectiveRoles().sources().groups().list( ListUserRoleSourceGroupsRequestParameters .builder() .roleId("role_id") - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` @@ -33177,12 +37662,8 @@ List verifiable credential templates. client.verifiableCredentials().verification().templates().list( ListVerifiableCredentialTemplatesRequestParameters .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) + .from("from") + .take(1) .build() ); ``` diff --git a/references/code-style.md b/references/code-style.md new file mode 100644 index 00000000..39c14fbd --- /dev/null +++ b/references/code-style.md @@ -0,0 +1,35 @@ +# Code Style + +Read this when writing new Java code. See [CLAUDE.md](../CLAUDE.md) for the always-applied formatting rule. + +## Formatting (enforced) + +- **Spotless + palantir-java-format** (`build.gradle`). Run `./gradlew spotlessApply` before committing; `./gradlew check` (and CI) fails on unformatted code. Do not hand-tune whitespace to fight the formatter — let it decide. +- `.editorconfig`: 4-space indentation for `*.java`, 2-space for `*.gradle`, LF line endings, UTF-8, final newline required. +- Target **Java 8** language level — no `var`, records, switch expressions, or other post-8 syntax in `src/`. + +## Generated code + +Fern-generated files begin with: + +```java +/** + * This file was auto-generated by Fern from our API Definition. + */ +``` + +Match the surrounding generated style only if you are (rarely) editing a generated file that is explicitly listed in `.fernignore`. Otherwise, do not touch generated files — see [pitfalls.md](pitfalls.md). + +## Patterns used in this project + +- **Builder entry points.** Public clients are constructed via builders, not raw constructors: + - `AuthAPI.newBuilder(domain, clientId, clientSecret).build()` (Authentication API, hand-maintained) + - `ManagementApi.builder().domain(...).token(...).build()` or `.clientCredentials(clientId, clientSecret)` (Management API) +- **`Supplier`-backed lazy resource clients.** `ManagementApi` exposes each resource client as a `Supplier` (e.g. `usersClient`, `rolesClient`) constructed lazily from `ClientOptions`. Follow this shape when extending the hand-maintained core. +- **Sync + Async pairs.** Most Management resource clients have a mirror `AsyncXxxClient` and a `RawXxxClient` (raw HTTP response) variant. Keep additions consistent across the trio when working in hand-maintained code. +- **Typed request/response objects.** Management calls return typed response types (e.g. `GetUserResponseContent`) rather than generic maps. +- **HTTP abstraction.** All HTTP goes through the `com.auth0.net` layer over OkHttp; don't instantiate OkHttp clients directly in feature code. + +## Naming + +Standard Java conventions: `UpperCamelCase` types, `lowerCamelCase` members, `UPPER_SNAKE_CASE` constants. `wildcard_import_limit = 9999` in `.editorconfig` means wildcard imports are not collapsed — but palantir-java-format governs import ordering, so just run `spotlessApply`. diff --git a/references/commands.md b/references/commands.md new file mode 100644 index 00000000..9801e745 --- /dev/null +++ b/references/commands.md @@ -0,0 +1,61 @@ +# Command Reference + +Full command list, extracted from `.github/workflows/build-and-test.yml`, `CONTRIBUTING.md`, and `build.gradle`. See [CLAUDE.md](../CLAUDE.md) for the always-loaded quick set. Always use the committed Gradle wrapper (`./gradlew`), never a system `gradle`. + +## Build + +```bash +# Full build: compile, run tests, assemble artifacts +./gradlew build + +# Assemble artifacts only (no tests) +./gradlew assemble + +# What CI runs (build-and-test.yml) — assemble + all verification tasks, keep going on failure +./gradlew assemble check --continue --console=plain + +# Clean +./gradlew clean +``` + +## Test + +```bash +# Run the full JUnit 5 suite +./gradlew test + +# Run a single test class +./gradlew test --tests 'com.auth0.client.mgmt.ManagementApiBuilderTest' + +# Run a single test method +./gradlew test --tests 'com.auth0.client.mgmt.OAuthTokenSupplierTest.someMethod' + +# Standard streams are shown during tests (configured in build.gradle) +``` + +## Format + +```bash +# Apply formatting (palantir-java-format via Spotless) — run before committing +./gradlew spotlessApply + +# Check formatting without modifying (part of `check`) +./gradlew spotlessCheck +``` + +## Sample app (manual verification / issue repros) + +`sample-app/` is a separate Gradle module that depends on the root project (`implementation rootProject`). Use it to reproduce reported issues against local SDK changes. + +```bash +# Compile the sample app against the local SDK +./gradlew :sample-app:build +``` + +## Coverage + +Coverage reports are produced during `check` and uploaded to Codecov under the `unittests` flag in CI (`.codecov.yml`). Build reports land in `build/reports/`. + +## Release (CI only) + +Releases run via `.github/workflows/release.yml` → `java-release.yml`, triggered by merging a `release/*` branch. The version is read from `.version` by `gradle/versioning.gradle`; publishing uses the `maven-publish` action with signing keys injected as GitHub secrets. Do not run publish tasks locally. diff --git a/references/docs-update.md b/references/docs-update.md new file mode 100644 index 00000000..a50d43b3 --- /dev/null +++ b/references/docs-update.md @@ -0,0 +1,23 @@ +# Docs Update Rules — Code-to-Docs Mapping + +Full mapping table. See [CLAUDE.md](../CLAUDE.md) for the tracked-docs inventory and the always-loaded "update docs in the same PR" boundary. + +This is a **library/SDK** repo (public surface = exported classes/methods under `com.auth0`). Docs split into **hand-maintained** (safe to edit; in `.fernignore`) and **generated** (do not hand-edit). + +| When this changes | Update these docs | +|-------------------|-------------------| +| Hand-maintained public API — Authentication API (`AuthAPI`, `AuthorizeUrlBuilder`, `LogoutUrlBuilder`, passwordless, token vault) | `README.md` (Getting Started), `EXAMPLES.md` (relevant scenario section) | +| Client construction / options (`ManagementApiBuilder`, `TokenProvider`, `ClientOptions`, `ProxyOptions`, `LoggingOptions`) | `README.md` (Configure the SDK), `EXAMPLES.md` (HTTP Client configuration / Management API usage) | +| New usage pattern or scenario (pagination, error handling, async, org login, ID-token verification) | `EXAMPLES.md` (add/adjust the matching section) | +| Minimum Java version, install coordinates, or dependency changes | `README.md` (Requirements / Installation) | +| A source- or binary-breaking change (approval required) | `v4_MIGRATION_GUIDE.md` (current major), plus `README.md`/`EXAMPLES.md` for affected samples | + +## Generated docs — do NOT hand-edit + +- `reference.md` — Management API code samples, generated by Fern. Regenerate; never patch by hand. + +## Release-flow docs — not touched per feature PR + +- `CHANGELOG.md` — updated by the release process, not as part of a feature PR (it is in `.fernignore` so it isn't regenerated, but it's owned by the release flow). + +> When you touch code that maps to a hand-maintained doc above, update that doc **in the same PR** — do not defer. `README.md`, `EXAMPLES.md`, and the migration guides are in `.fernignore`, so your edits persist across SDK regeneration. diff --git a/references/git-workflow.md b/references/git-workflow.md new file mode 100644 index 00000000..48ea11da --- /dev/null +++ b/references/git-workflow.md @@ -0,0 +1,19 @@ +# Git Workflow + +## Branch naming + +No enforced convention detected. Release branches use the `release/*` prefix (the release workflow only runs for merged PRs whose head branch starts with `release/`). + +## Commit messages + +Conventional Commits, matching recent `git log`: `feat:`, `fix:`, `chore:`, `ci:`, `docs:`. Release commits are titled `Release X.Y.Z` (e.g. `Release 4.2.0`). SDK-regeneration PRs are commonly titled `SDK regeneration`. + +## Pull requests + +- **Body:** follow `.github/pull_request_template.md` — fill in **Changes**, **References**, **Testing**, and complete the **Checklist** (contribution guidelines read, tests added, existing + new tests pass). +- **Tests must pass:** CI (`build-and-test.yml`) runs `./gradlew assemble check --continue` on Java 8; formatting (`spotlessCheck`) is part of `check`, so run `./gradlew spotlessApply` before pushing. +- **Generated code:** if a PR changes Management API behavior, note whether it originates from an SDK regeneration (spec/generator change) rather than a hand-edit — reviewers need to know a local edit to generated code won't survive. + +## Releases + +Releases are automated: bump `.version`, cut a `release/*` branch, and merging it triggers `release.yml` → `java-release.yml` (RL security scan, then Maven Central publish with signing secrets). Do not publish locally. diff --git a/references/pitfalls.md b/references/pitfalls.md new file mode 100644 index 00000000..9a87e453 --- /dev/null +++ b/references/pitfalls.md @@ -0,0 +1,15 @@ +# Common Pitfalls + +1. **Editing Fern-generated files directly.** Any file with the `/** This file was auto-generated by Fern ... */` header that is **not** listed in `.fernignore` is regenerated on the next SDK build — your edit is silently lost. Fix the Fern API spec or the `generators/java-v2` generator instead, or move the file's logic into a hand-maintained (`.fernignore`) location. This is the single most common mistake in this repo. + +2. **Assuming `.fernignore` covers the whole Management API.** It protects only the **explicitly listed** files/dirs (the Authentication API, `net/`, `exception/`, `utils/`, `json/auth/`, the custom builders/token providers, and specific tests). Everything else under the generated `mgmt` tree is fair game for regeneration. + +3. **Using post-Java-8 syntax.** The library compiles and runs on Java 8 (`sourceCompatibility = 1.8`, toolchain pinned to 8). No `var`, records, sealed types, or switch expressions in `src/`. + +4. **Skipping `spotlessApply`.** CI's `check` includes `spotlessCheck` (palantir-java-format). Unformatted code fails the build even if tests pass. + +5. **Introducing breaking changes.** This is a widely-consumed published library. Source/binary-breaking changes require explicit approval and a migration-guide entry — see Boundaries in [CLAUDE.md](../CLAUDE.md). + +6. **Hardcoding a real tenant/secret.** Never put a real Auth0 domain, client secret, or token into code, tests, fixtures, or the sample app. + +7. **Hand-editing `reference.md`.** It is large and generated; regenerate rather than edit. diff --git a/references/testing.md b/references/testing.md new file mode 100644 index 00000000..830f2e6d --- /dev/null +++ b/references/testing.md @@ -0,0 +1,36 @@ +# Testing Conventions + +Read this when writing or modifying tests. See [CLAUDE.md](../CLAUDE.md) for the always-loaded safe command. + +## Framework & layout + +| Aspect | Detail | +|--------|--------| +| Test framework | JUnit Jupiter 5 (`useJUnitPlatform()` in `build.gradle`) | +| Mocking | Mockito 4 (`mockito-core`) | +| HTTP | OkHttp `MockWebServer` — real HTTP against a local mock server, not stubbed clients | +| Assertions | Hamcrest matchers | +| Location | `src/test/java/com/auth0/` mirrors the `src/main` package layout | +| Fixtures | `src/test/resources/` — `wire-tests/`, `auth/` | + +## Generated vs. hand-maintained tests + +- Most Management API tests are **Fern-generated** (they carry the auto-generated header and live under the generated `mgmt` tree). Do not hand-edit them; behavioral test changes come from the spec/generator. +- Hand-maintained tests are the ones listed in `.fernignore`, e.g.: + - `src/test/java/com/auth0/client/mgmt/ManagementApiBuilderTest.java` + - `src/test/java/com/auth0/client/mgmt/DynamicTokenManagementTest.java` + - `src/test/java/com/auth0/client/mgmt/OAuthTokenSupplierTest.java` + - `src/test/java/com/auth0/client/mgmt/CustomDomainInterceptorTest.java` + - `src/test/java/com/auth0/client/mgmt/CustomDomainHeaderIntegrationTest.java` + - the entire `src/test/java/com/auth0/client/auth/` tree (Authentication API) +- Shared test infrastructure — also hand-maintained (`.fernignore`): `MockServer`, `RecordedRequestMatcher`, `UrlMatcher` (under `com/auth0/client/`) and `AssertsUtil`. Reuse these rather than rolling new HTTP-assertion helpers. + +## Conventions + +- New functionality in hand-maintained code (Authentication API, builders, token providers, interceptors) **must** ship with tests in the corresponding `.fernignore`-listed location so Fern regeneration doesn't clobber them. +- Tests must run with no network access and no real Auth0 tenant — use `MockWebServer` / `MockServer` and fixture files under `src/test/resources/`. +- Never put a real tenant domain, client secret, or token into a test or fixture. + +## Coverage + +Coverage is uploaded to Codecov under the `unittests` flag (`.codecov.yml`); HTML/XML reports are written to `build/reports/` and uploaded as the `Reports` artifact in CI. diff --git a/src/main/java/com/auth0/client/auth/AuthAPI.java b/src/main/java/com/auth0/client/auth/AuthAPI.java index 342e70ca..c36975df 100644 --- a/src/main/java/com/auth0/client/auth/AuthAPI.java +++ b/src/main/java/com/auth0/client/auth/AuthAPI.java @@ -843,15 +843,20 @@ public TokenRequest exchangeToken(String subjectToken, String subjectTokenType) } /** - * Creates a request to exchange an Auth0 refresh token for a federated identity provider's access token + * Creates a request to exchange a subject token for a federated identity provider's access token * using the Token Vault grant * {@code urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token}. + * This is the generic entry point: the caller supplies both the {@code subjectToken} and its + * {@code subjectTokenType}, so no assumption is made about which kind of token is being exchanged. + * For the common cases, prefer {@link #getTokenForConnectionWithRefreshToken(String, String, String)} + * or {@link #getTokenForConnectionWithAccessToken(String, String, String)}. * The connection must have the token vault enabled, and client authentication * (client secret or client assertion) is required as this must be a private client. *
      * {@code
      * try {
-     *      TokenHolder result = authAPI.getTokenForConnection("google-oauth2", refreshToken, "google-user-id")
+     *      TokenHolder result = authAPI.getTokenForConnection(
+     *              "google-oauth2", subjectToken, "urn:ietf:params:oauth:token-type:refresh_token", "google-user-id")
      *          .execute()
      *          .getBody();
      *      String federatedAccessToken = result.getAccessToken();
@@ -864,22 +869,27 @@ public TokenRequest exchangeToken(String subjectToken, String subjectTokenType)
      * @see Token Vault documentation
      * @param connection the name of the federated connection to obtain an access token for
      *                   (for example {@code google-oauth2}). Must not be null.
-     * @param refreshToken a valid Auth0 refresh token to exchange. Must not be null.
+     * @param subjectToken the Auth0 token to exchange. Must not be null.
+     * @param subjectTokenType the identifier for the type of {@code subjectToken}, for example
+     *                         {@code urn:ietf:params:oauth:token-type:refresh_token} or
+     *                         {@code urn:ietf:params:oauth:token-type:access_token}. Must not be null.
      * @param loginHint the user's ID within the identity provider specified by the connection
      *                  (for example, the Google user ID when the connection is {@code google-oauth2}).
      *                  May be null, in which case no {@code login_hint} is sent.
      * @return a Request to configure and execute.
      */
-    public TokenRequest getTokenForConnection(String connection, String refreshToken, String loginHint) {
+    public TokenRequest getTokenForConnection(
+            String connection, String subjectToken, String subjectTokenType, String loginHint) {
         Asserts.assertNotNull(connection, "connection");
-        Asserts.assertNotNull(refreshToken, "refresh token");
+        Asserts.assertNotNull(subjectToken, "subject token");
+        Asserts.assertNotNull(subjectTokenType, "subject token type");
 
         TokenRequest request = new TokenRequest(client, getTokenUrl());
         request.addParameter(KEY_CLIENT_ID, clientId);
         request.addParameter(
                 KEY_GRANT_TYPE, "urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token");
-        request.addParameter(KEY_SUBJECT_TOKEN, refreshToken);
-        request.addParameter(KEY_SUBJECT_TOKEN_TYPE, "urn:ietf:params:oauth:token-type:refresh_token");
+        request.addParameter(KEY_SUBJECT_TOKEN, subjectToken);
+        request.addParameter(KEY_SUBJECT_TOKEN_TYPE, subjectTokenType);
         request.addParameter(
                 KEY_REQUESTED_TOKEN_TYPE, "http://auth0.com/oauth/token-type/federated-connection-access-token");
         request.addParameter(KEY_CONNECTION, connection);
@@ -890,6 +900,97 @@ public TokenRequest getTokenForConnection(String connection, String refreshToken
         return request;
     }
 
+    /**
+     * Convenience method to exchange an Auth0 refresh token for a federated identity provider's access token
+     * using the Token Vault grant. Delegates to
+     * {@link #getTokenForConnection(String, String, String, String)} with the subject token type
+     * {@code urn:ietf:params:oauth:token-type:refresh_token}.
+     * The connection must have the token vault enabled, and client authentication
+     * (client secret or client assertion) is required as this must be a private client.
+     * 
+     * {@code
+     * try {
+     *      TokenHolder result = authAPI.getTokenForConnectionWithRefreshToken("google-oauth2", refreshToken, "google-user-id")
+     *          .execute()
+     *          .getBody();
+     *      String federatedAccessToken = result.getAccessToken();
+     * } catch (Auth0Exception e) {
+     *      //Something happened
+     * }
+     * }
+     * 
+ * + * @see Token Vault documentation + * @param connection the name of the federated connection to obtain an access token for + * (for example {@code google-oauth2}). Must not be null. + * @param refreshToken a valid Auth0 refresh token to exchange. Must not be null. + * @param loginHint the user's ID within the identity provider specified by the connection + * (for example, the Google user ID when the connection is {@code google-oauth2}). + * May be null, in which case no {@code login_hint} is sent. + * @return a Request to configure and execute. + */ + public TokenRequest getTokenForConnectionWithRefreshToken( + String connection, String refreshToken, String loginHint) { + Asserts.assertNotNull(refreshToken, "refresh token"); + return getTokenForConnection( + connection, refreshToken, "urn:ietf:params:oauth:token-type:refresh_token", loginHint); + } + + /** + * Convenience method to exchange an Auth0 access token for a federated identity provider's access token + * using the Token Vault grant. Delegates to + * {@link #getTokenForConnection(String, String, String, String)} with the subject token type + * {@code urn:ietf:params:oauth:token-type:access_token}. + * The connection must have the token vault enabled, and client authentication + * (client secret or client assertion) is required as this must be a private client. + *
+     * {@code
+     * try {
+     *      TokenHolder result = authAPI.getTokenForConnectionWithAccessToken("google-oauth2", accessToken, "google-user-id")
+     *          .execute()
+     *          .getBody();
+     *      String federatedAccessToken = result.getAccessToken();
+     * } catch (Auth0Exception e) {
+     *      //Something happened
+     * }
+     * }
+     * 
+ * + * @see Token Vault documentation + * @param connection the name of the federated connection to obtain an access token for + * (for example {@code google-oauth2}). Must not be null. + * @param accessToken a valid Auth0 access token to exchange. Must not be null. + * @param loginHint the user's ID within the identity provider specified by the connection + * (for example, the Google user ID when the connection is {@code google-oauth2}). + * May be null, in which case no {@code login_hint} is sent. + * @return a Request to configure and execute. + */ + public TokenRequest getTokenForConnectionWithAccessToken(String connection, String accessToken, String loginHint) { + Asserts.assertNotNull(accessToken, "access token"); + return getTokenForConnection( + connection, accessToken, "urn:ietf:params:oauth:token-type:access_token", loginHint); + } + + /** + * Creates a request to exchange an Auth0 refresh token for a federated identity provider's access token + * using the Token Vault grant. + * + * @deprecated Use {@link #getTokenForConnectionWithRefreshToken(String, String, String)} to exchange a + * refresh token, or {@link #getTokenForConnectionWithAccessToken(String, String, String)} to + * exchange an access token. For full control over the subject token type, use + * {@link #getTokenForConnection(String, String, String, String)}. + * @param connection the name of the federated connection to obtain an access token for + * (for example {@code google-oauth2}). Must not be null. + * @param refreshToken a valid Auth0 refresh token to exchange. Must not be null. + * @param loginHint the user's ID within the identity provider specified by the connection. + * May be null, in which case no {@code login_hint} is sent. + * @return a Request to configure and execute. + */ + @Deprecated + public TokenRequest getTokenForConnection(String connection, String refreshToken, String loginHint) { + return getTokenForConnectionWithRefreshToken(connection, refreshToken, loginHint); + } + /** * Creates a request to revoke an existing Refresh Token. * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. diff --git a/src/main/java/com/auth0/client/mgmt/AgentsClient.java b/src/main/java/com/auth0/client/mgmt/AgentsClient.java new file mode 100644 index 00000000..c65b25b5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AgentsClient.java @@ -0,0 +1,129 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.AgentResponseContent; +import com.auth0.client.mgmt.types.CreateAgentRequestContent; +import com.auth0.client.mgmt.types.ListAgentsRequestParameters; +import com.auth0.client.mgmt.types.PatchAgentRequestParameters; + +public class AgentsClient { + protected final ClientOptions clientOptions; + + private final RawAgentsClient rawClient; + + public AgentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawAgentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawAgentsClient withRawResponse() { + return this.rawClient; + } + + /** + * Get agents + */ + public SyncPagingIterable list() { + return this.rawClient.list().body(); + } + + /** + * Get agents + */ + public SyncPagingIterable list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + /** + * Get agents + */ + public SyncPagingIterable list(ListAgentsRequestParameters request) { + return this.rawClient.list(request).body(); + } + + /** + * Get agents + */ + public SyncPagingIterable list( + ListAgentsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).body(); + } + + /** + * Create an agent + */ + public AgentResponseContent create(CreateAgentRequestContent request) { + return this.rawClient.create(request).body(); + } + + /** + * Create an agent + */ + public AgentResponseContent create(CreateAgentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + /** + * Get an agent + */ + public AgentResponseContent read(String id) { + return this.rawClient.read(id).body(); + } + + /** + * Get an agent + */ + public AgentResponseContent read(String id, RequestOptions requestOptions) { + return this.rawClient.read(id, requestOptions).body(); + } + + /** + * Delete an agent + */ + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + /** + * Delete an agent + */ + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } + + /** + * Update an agent + */ + public AgentResponseContent update(String id) { + return this.rawClient.update(id).body(); + } + + /** + * Update an agent + */ + public AgentResponseContent update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).body(); + } + + /** + * Update an agent + */ + public AgentResponseContent update(String id, PatchAgentRequestParameters request) { + return this.rawClient.update(id, request).body(); + } + + /** + * Update an agent + */ + public AgentResponseContent update(String id, PatchAgentRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncAgentsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncAgentsClient.java new file mode 100644 index 00000000..e6598c36 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncAgentsClient.java @@ -0,0 +1,132 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.AgentResponseContent; +import com.auth0.client.mgmt.types.CreateAgentRequestContent; +import com.auth0.client.mgmt.types.ListAgentsRequestParameters; +import com.auth0.client.mgmt.types.PatchAgentRequestParameters; +import java.util.concurrent.CompletableFuture; + +public class AsyncAgentsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawAgentsClient rawClient; + + public AsyncAgentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawAgentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawAgentsClient withRawResponse() { + return this.rawClient; + } + + /** + * Get agents + */ + public CompletableFuture> list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Get agents + */ + public CompletableFuture> list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + /** + * Get agents + */ + public CompletableFuture> list(ListAgentsRequestParameters request) { + return this.rawClient.list(request).thenApply(response -> response.body()); + } + + /** + * Get agents + */ + public CompletableFuture> list( + ListAgentsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Create an agent + */ + public CompletableFuture create(CreateAgentRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Create an agent + */ + public CompletableFuture create( + CreateAgentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Get an agent + */ + public CompletableFuture read(String id) { + return this.rawClient.read(id).thenApply(response -> response.body()); + } + + /** + * Get an agent + */ + public CompletableFuture read(String id, RequestOptions requestOptions) { + return this.rawClient.read(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Delete an agent + */ + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + /** + * Delete an agent + */ + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Update an agent + */ + public CompletableFuture update(String id) { + return this.rawClient.update(id).thenApply(response -> response.body()); + } + + /** + * Update an agent + */ + public CompletableFuture update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Update an agent + */ + public CompletableFuture update(String id, PatchAgentRequestParameters request) { + return this.rawClient.update(id, request).thenApply(response -> response.body()); + } + + /** + * Update an agent + */ + public CompletableFuture update( + String id, PatchAgentRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java index 62813ccd..16524a98 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.types.CreateClientGrantResponseContent; import com.auth0.client.mgmt.types.GetClientGrantResponseContent; import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsRequestParameters; import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; import java.util.concurrent.CompletableFuture; @@ -83,6 +84,40 @@ public CompletableFuture create( return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); } + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture> search() { + return this.rawClient.search().thenApply(response -> response.body()); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture> search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).thenApply(response -> response.body()); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture> search( + SearchClientGrantsRequestParameters request) { + return this.rawClient.search(request).thenApply(response -> response.body()); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture> search( + SearchClientGrantsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve a single client grant, including the * scopes associated with the application/API pair. diff --git a/src/main/java/com/auth0/client/mgmt/AsyncClientProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncClientProfilesClient.java new file mode 100644 index 00000000..32167898 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncClientProfilesClient.java @@ -0,0 +1,132 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ClientProfile; +import com.auth0.client.mgmt.types.CreateClientProfileRequestContent; +import com.auth0.client.mgmt.types.ListClientProfilesRequestParameters; +import com.auth0.client.mgmt.types.UpdateClientProfileRequestContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncClientProfilesClient { + protected final ClientOptions clientOptions; + + private final AsyncRawClientProfilesClient rawClient; + + public AsyncClientProfilesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawClientProfilesClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawClientProfilesClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture> list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture> list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture> list(ListClientProfilesRequestParameters request) { + return this.rawClient.list(request).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture> list( + ListClientProfilesRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public CompletableFuture create(CreateClientProfileRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public CompletableFuture create( + CreateClientProfileRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public CompletableFuture get(String id) { + return this.rawClient.get(id).thenApply(response -> response.body()); + } + + /** + * Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public CompletableFuture get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture update(String id) { + return this.rawClient.update(id).thenApply(response -> response.body()); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture update(String id, UpdateClientProfileRequestContent request) { + return this.rawClient.update(id, request).thenApply(response -> response.body()); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture update( + String id, UpdateClientProfileRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java index 2a927520..36be4784 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Client; +import com.auth0.client.mgmt.types.ClientSearchResponse; import com.auth0.client.mgmt.types.CreateClientRequestContent; import com.auth0.client.mgmt.types.CreateClientResponseContent; import com.auth0.client.mgmt.types.GetClientRequestParameters; @@ -20,6 +21,7 @@ import com.auth0.client.mgmt.types.RegisterCimdClientRequestContent; import com.auth0.client.mgmt.types.RegisterCimdClientResponseContent; import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; +import com.auth0.client.mgmt.types.SearchClientsRequestParameters; import com.auth0.client.mgmt.types.UpdateClientRequestContent; import com.auth0.client.mgmt.types.UpdateClientResponseContent; import java.util.concurrent.CompletableFuture; @@ -62,7 +64,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 +96,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 +128,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 +160,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, @@ -274,6 +276,95 @@ public CompletableFuture registerCimdClient( return this.rawClient.registerCimdClient(request, requestOptions).thenApply(response -> response.body()); } + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture> search() { + return this.rawClient.search().thenApply(response -> response.body()); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture> search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).thenApply(response -> response.body()); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture> search(SearchClientsRequestParameters request) { + return this.rawClient.search(request).thenApply(response -> response.body()); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture> search( + SearchClientsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified. * For more information, read Applications in Auth0 and Single Sign-On. @@ -288,7 +379,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 +410,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 +441,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 +472,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 025ee1b2..045a4e66 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/AsyncGuardianClient.java b/src/main/java/com/auth0/client/mgmt/AsyncGuardianClient.java new file mode 100644 index 00000000..908f2daa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncGuardianClient.java @@ -0,0 +1,84 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.Suppliers; +import com.auth0.client.mgmt.guardian.AsyncEnrollmentsClient; +import com.auth0.client.mgmt.guardian.AsyncFactorsClient; +import com.auth0.client.mgmt.guardian.AsyncPoliciesClient; +import com.auth0.client.mgmt.types.GetGuardianSettingsResponseContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsRequestContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsResponseContent; +import java.util.concurrent.CompletableFuture; +import java.util.function.Supplier; + +public class AsyncGuardianClient { + protected final ClientOptions clientOptions; + + private final AsyncRawGuardianClient rawClient; + + protected final Supplier enrollmentsClient; + + protected final Supplier factorsClient; + + protected final Supplier policiesClient; + + public AsyncGuardianClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawGuardianClient(clientOptions); + this.enrollmentsClient = Suppliers.memoize(() -> new AsyncEnrollmentsClient(clientOptions)); + this.factorsClient = Suppliers.memoize(() -> new AsyncFactorsClient(clientOptions)); + this.policiesClient = Suppliers.memoize(() -> new AsyncPoliciesClient(clientOptions)); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawGuardianClient withRawResponse() { + return this.rawClient; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture get() { + return this.rawClient.get().thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).thenApply(response -> response.body()); + } + + /** + * Update a tenant's guardian settings such as Remember Me + */ + public CompletableFuture set(SetGuardianSettingsRequestContent request) { + return this.rawClient.set(request).thenApply(response -> response.body()); + } + + /** + * Update a tenant's guardian settings such as Remember Me + */ + public CompletableFuture set( + SetGuardianSettingsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(request, requestOptions).thenApply(response -> response.body()); + } + + public AsyncEnrollmentsClient enrollments() { + return this.enrollmentsClient.get(); + } + + public AsyncFactorsClient factors() { + return this.factorsClient.get(); + } + + public AsyncPoliciesClient policies() { + return this.policiesClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java index 46b51ca6..8f16b540 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java @@ -8,7 +8,7 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.emails.AsyncEmailsClient; -import com.auth0.client.mgmt.guardian.AsyncGuardianClient; +import com.auth0.client.mgmt.experimentation.AsyncExperimentationClient; import com.auth0.client.mgmt.keys.AsyncKeysClient; import com.auth0.client.mgmt.riskassessments.AsyncRiskAssessmentsClient; import com.auth0.client.mgmt.tenants.AsyncTenantsClient; @@ -20,10 +20,14 @@ public class AsyncManagementApi { protected final Supplier actionsClient; + protected final Supplier agentsClient; + protected final Supplier brandingClient; protected final Supplier clientGrantsClient; + protected final Supplier clientProfilesClient; + protected final Supplier clientsClient; protected final Supplier connectionProfilesClient; @@ -48,6 +52,8 @@ public class AsyncManagementApi { protected final Supplier groupsClient; + protected final Supplier guardianClient; + protected final Supplier hooksClient; protected final Supplier jobsClient; @@ -60,6 +66,8 @@ public class AsyncManagementApi { protected final Supplier organizationsClient; + protected final Supplier portalsClient; + protected final Supplier promptsClient; protected final Supplier rateLimitPoliciesClient; @@ -98,7 +106,7 @@ public class AsyncManagementApi { protected final Supplier emailsClient; - protected final Supplier guardianClient; + protected final Supplier experimentationClient; protected final Supplier keysClient; @@ -111,8 +119,10 @@ public class AsyncManagementApi { public AsyncManagementApi(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.actionsClient = Suppliers.memoize(() -> new AsyncActionsClient(clientOptions)); + this.agentsClient = Suppliers.memoize(() -> new AsyncAgentsClient(clientOptions)); this.brandingClient = Suppliers.memoize(() -> new AsyncBrandingClient(clientOptions)); this.clientGrantsClient = Suppliers.memoize(() -> new AsyncClientGrantsClient(clientOptions)); + this.clientProfilesClient = Suppliers.memoize(() -> new AsyncClientProfilesClient(clientOptions)); this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions)); this.connectionProfilesClient = Suppliers.memoize(() -> new AsyncConnectionProfilesClient(clientOptions)); this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions)); @@ -125,12 +135,14 @@ public AsyncManagementApi(ClientOptions clientOptions) { this.formsClient = Suppliers.memoize(() -> new AsyncFormsClient(clientOptions)); this.userGrantsClient = Suppliers.memoize(() -> new AsyncUserGrantsClient(clientOptions)); this.groupsClient = Suppliers.memoize(() -> new AsyncGroupsClient(clientOptions)); + this.guardianClient = Suppliers.memoize(() -> new AsyncGuardianClient(clientOptions)); this.hooksClient = Suppliers.memoize(() -> new AsyncHooksClient(clientOptions)); this.jobsClient = Suppliers.memoize(() -> new AsyncJobsClient(clientOptions)); this.logStreamsClient = Suppliers.memoize(() -> new AsyncLogStreamsClient(clientOptions)); this.logsClient = Suppliers.memoize(() -> new AsyncLogsClient(clientOptions)); this.networkAclsClient = Suppliers.memoize(() -> new AsyncNetworkAclsClient(clientOptions)); this.organizationsClient = Suppliers.memoize(() -> new AsyncOrganizationsClient(clientOptions)); + this.portalsClient = Suppliers.memoize(() -> new AsyncPortalsClient(clientOptions)); this.promptsClient = Suppliers.memoize(() -> new AsyncPromptsClient(clientOptions)); this.rateLimitPoliciesClient = Suppliers.memoize(() -> new AsyncRateLimitPoliciesClient(clientOptions)); this.refreshTokensClient = Suppliers.memoize(() -> new AsyncRefreshTokensClient(clientOptions)); @@ -150,7 +162,7 @@ public AsyncManagementApi(ClientOptions clientOptions) { this.anomalyClient = Suppliers.memoize(() -> new AsyncAnomalyClient(clientOptions)); this.attackProtectionClient = Suppliers.memoize(() -> new AsyncAttackProtectionClient(clientOptions)); this.emailsClient = Suppliers.memoize(() -> new AsyncEmailsClient(clientOptions)); - this.guardianClient = Suppliers.memoize(() -> new AsyncGuardianClient(clientOptions)); + this.experimentationClient = Suppliers.memoize(() -> new AsyncExperimentationClient(clientOptions)); this.keysClient = Suppliers.memoize(() -> new AsyncKeysClient(clientOptions)); this.riskAssessmentsClient = Suppliers.memoize(() -> new AsyncRiskAssessmentsClient(clientOptions)); this.tenantsClient = Suppliers.memoize(() -> new AsyncTenantsClient(clientOptions)); @@ -161,6 +173,10 @@ public AsyncActionsClient actions() { return this.actionsClient.get(); } + public AsyncAgentsClient agents() { + return this.agentsClient.get(); + } + public AsyncBrandingClient branding() { return this.brandingClient.get(); } @@ -169,6 +185,10 @@ public AsyncClientGrantsClient clientGrants() { return this.clientGrantsClient.get(); } + public AsyncClientProfilesClient clientProfiles() { + return this.clientProfilesClient.get(); + } + public AsyncClientsClient clients() { return this.clientsClient.get(); } @@ -217,6 +237,10 @@ public AsyncGroupsClient groups() { return this.groupsClient.get(); } + public AsyncGuardianClient guardian() { + return this.guardianClient.get(); + } + public AsyncHooksClient hooks() { return this.hooksClient.get(); } @@ -241,6 +265,10 @@ public AsyncOrganizationsClient organizations() { return this.organizationsClient.get(); } + public AsyncPortalsClient portals() { + return this.portalsClient.get(); + } + public AsyncPromptsClient prompts() { return this.promptsClient.get(); } @@ -317,8 +345,8 @@ public AsyncEmailsClient emails() { return this.emailsClient.get(); } - public AsyncGuardianClient guardian() { - return this.guardianClient.get(); + public AsyncExperimentationClient experimentation() { + return this.experimentationClient.get(); } public AsyncKeysClient keys() { diff --git a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java index c5d659e0..45951f50 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java @@ -8,18 +8,22 @@ import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.AsyncClientGrantsClient; +import com.auth0.client.mgmt.organizations.AsyncClientsClient; import com.auth0.client.mgmt.organizations.AsyncConnectionsClient; import com.auth0.client.mgmt.organizations.AsyncDiscoveryDomainsClient; import com.auth0.client.mgmt.organizations.AsyncEnabledConnectionsClient; import com.auth0.client.mgmt.organizations.AsyncGroupsClient; import com.auth0.client.mgmt.organizations.AsyncInvitationsClient; import com.auth0.client.mgmt.organizations.AsyncMembersClient; +import com.auth0.client.mgmt.organizations.roles.AsyncRolesClient; import com.auth0.client.mgmt.types.CreateOrganizationRequestContent; import com.auth0.client.mgmt.types.CreateOrganizationResponseContent; import com.auth0.client.mgmt.types.GetOrganizationByNameResponseContent; import com.auth0.client.mgmt.types.GetOrganizationResponseContent; import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; import com.auth0.client.mgmt.types.Organization; +import com.auth0.client.mgmt.types.SearchOrganization; +import com.auth0.client.mgmt.types.SearchOrganizationsRequestParameters; import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; import java.util.concurrent.CompletableFuture; @@ -32,6 +36,8 @@ public class AsyncOrganizationsClient { protected final Supplier clientGrantsClient; + protected final Supplier clientsClient; + protected final Supplier connectionsClient; protected final Supplier discoveryDomainsClient; @@ -44,16 +50,20 @@ public class AsyncOrganizationsClient { protected final Supplier groupsClient; + protected final Supplier rolesClient; + public AsyncOrganizationsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new AsyncRawOrganizationsClient(clientOptions); this.clientGrantsClient = Suppliers.memoize(() -> new AsyncClientGrantsClient(clientOptions)); + this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions)); this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions)); this.discoveryDomainsClient = Suppliers.memoize(() -> new AsyncDiscoveryDomainsClient(clientOptions)); this.enabledConnectionsClient = Suppliers.memoize(() -> new AsyncEnabledConnectionsClient(clientOptions)); this.invitationsClient = Suppliers.memoize(() -> new AsyncInvitationsClient(clientOptions)); this.membersClient = Suppliers.memoize(() -> new AsyncMembersClient(clientOptions)); this.groupsClient = Suppliers.memoize(() -> new AsyncGroupsClient(clientOptions)); + this.rolesClient = Suppliers.memoize(() -> new AsyncRolesClient(clientOptions)); } /** @@ -174,6 +184,80 @@ public CompletableFuture getByName( return this.rawClient.getByName(name, requestOptions).thenApply(response -> response.body()); } + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture> search() { + return this.rawClient.search().thenApply(response -> response.body()); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture> search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture> search( + SearchOrganizationsRequestParameters request) { + return this.rawClient.search(request).thenApply(response -> response.body()); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture> search( + SearchOrganizationsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve details about a single Organization specified by ID. */ @@ -238,6 +322,10 @@ public AsyncClientGrantsClient clientGrants() { return this.clientGrantsClient.get(); } + public AsyncClientsClient clients() { + return this.clientsClient.get(); + } + public AsyncConnectionsClient connections() { return this.connectionsClient.get(); } @@ -261,4 +349,8 @@ public AsyncMembersClient members() { public AsyncGroupsClient groups() { return this.groupsClient.get(); } + + public AsyncRolesClient roles() { + return this.rolesClient.get(); + } } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncPortalsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncPortalsClient.java new file mode 100644 index 00000000..79cd6ce8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncPortalsClient.java @@ -0,0 +1,79 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.types.CreatePortalRequestContent; +import com.auth0.client.mgmt.types.ListPortalsResponseContent; +import com.auth0.client.mgmt.types.Portal; +import com.auth0.client.mgmt.types.UpdatePortalRequestContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncPortalsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawPortalsClient rawClient; + + public AsyncPortalsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawPortalsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawPortalsClient withRawResponse() { + return this.rawClient; + } + + public CompletableFuture list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + public CompletableFuture list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture create(CreatePortalRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + public CompletableFuture create(CreatePortalRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture get(String id) { + return this.rawClient.get(id).thenApply(response -> response.body()); + } + + public CompletableFuture get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture update(String id) { + return this.rawClient.update(id).thenApply(response -> response.body()); + } + + public CompletableFuture update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); + } + + public CompletableFuture update(String id, UpdatePortalRequestContent request) { + return this.rawClient.update(id, request).thenApply(response -> response.body()); + } + + public CompletableFuture update( + String id, UpdatePortalRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java index a327a57e..61ef6cf5 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -118,6 +119,15 @@ public CompletableFuture>> 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 @@ -178,6 +188,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -230,6 +243,15 @@ public CompletableFuture> 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 @@ -273,6 +295,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -317,6 +342,15 @@ public CompletableFuture> ge 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 @@ -364,6 +398,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -426,6 +463,15 @@ public CompletableFuture> delete( 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 @@ -471,6 +517,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -539,6 +588,15 @@ public CompletableFuture> 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 @@ -587,6 +645,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -632,6 +693,15 @@ public CompletableFuture> 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 @@ -675,6 +745,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -729,6 +802,15 @@ public CompletableFuture> t 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 @@ -772,6 +854,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawAgentsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawAgentsClient.java new file mode 100644 index 00000000..b600fc24 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawAgentsClient.java @@ -0,0 +1,617 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.AgentResponseContent; +import com.auth0.client.mgmt.types.CreateAgentRequestContent; +import com.auth0.client.mgmt.types.ListAgentsRequestParameters; +import com.auth0.client.mgmt.types.ListAgentsResponseContent; +import com.auth0.client.mgmt.types.PatchAgentRequestParameters; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawAgentsClient { + protected final ClientOptions clientOptions; + + public AsyncRawAgentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Get agents + */ + public CompletableFuture>> list() { + return list(ListAgentsRequestParameters.builder().build()); + } + + /** + * Get agents + */ + public CompletableFuture>> list( + RequestOptions requestOptions) { + return list(ListAgentsRequestParameters.builder().build(), requestOptions); + } + + /** + * Get agents + */ + public CompletableFuture>> list( + ListAgentsRequestParameters request) { + return list(request, null); + } + + /** + * Get agents + */ + public CompletableFuture>> list( + ListAgentsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListAgentsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListAgentsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListAgentsRequestParameters nextRequest = ListAgentsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getAgents(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Create an agent + */ + public CompletableFuture> create( + CreateAgentRequestContent request) { + return create(request, null); + } + + /** + * Create an agent + */ + public CompletableFuture> create( + CreateAgentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents"); + 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, AgentResponseContent.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; + } + + /** + * Get an agent + */ + public CompletableFuture> read(String id) { + return read(id, null); + } + + /** + * Get an agent + */ + public CompletableFuture> read( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents") + .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, AgentResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Delete an agent + */ + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + /** + * Delete an agent + */ + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Update an agent + */ + public CompletableFuture> update(String id) { + return update(id, PatchAgentRequestParameters.builder().build()); + } + + /** + * Update an agent + */ + public CompletableFuture> update( + String id, RequestOptions requestOptions) { + return update(id, PatchAgentRequestParameters.builder().build(), requestOptions); + } + + /** + * Update an agent + */ + public CompletableFuture> update( + String id, PatchAgentRequestParameters request) { + return update(id, request, null); + } + + /** + * Update an agent + */ + public CompletableFuture> update( + String id, PatchAgentRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentResponseContent.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/AsyncRawBrandingClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawBrandingClient.java index 8ad46d30..cae9bf47 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawBrandingClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawBrandingClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -67,6 +68,15 @@ public CompletableFuture> 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 @@ -105,6 +115,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -172,6 +185,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -215,6 +237,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java index 048e3712..1a640ce6 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java @@ -11,10 +11,13 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; +import com.auth0.client.mgmt.errors.InternalServerError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -24,6 +27,8 @@ import com.auth0.client.mgmt.types.GetClientGrantResponseContent; import com.auth0.client.mgmt.types.ListClientGrantPaginatedResponseContent; import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsResponseContent; import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -82,6 +87,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -181,6 +197,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -233,6 +252,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -287,6 +315,183 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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; + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture>> search() { + return search(SearchClientGrantsRequestParameters.builder().build()); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture>> search( + RequestOptions requestOptions) { + return search(SearchClientGrantsRequestParameters.builder().build(), requestOptions); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture>> search( + SearchClientGrantsRequestParameters request) { + return search(request, null); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public CompletableFuture>> search( + SearchClientGrantsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-grants/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + if (!request.getIncludeFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchClientGrantsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchClientGrantsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchClientGrantsRequestParameters nextRequest = SearchClientGrantsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClientGrants(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return search(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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; + case 500: + future.completeExceptionally(new InternalServerError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 504: + future.completeExceptionally(new GatewayTimeoutError( + 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)); } @@ -333,6 +538,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -376,6 +590,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -419,6 +636,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -459,6 +685,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -527,6 +756,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -576,6 +814,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawClientProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientProfilesClient.java new file mode 100644 index 00000000..c4e2fdbc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawClientProfilesClient.java @@ -0,0 +1,621 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.ClientProfile; +import com.auth0.client.mgmt.types.CreateClientProfileRequestContent; +import com.auth0.client.mgmt.types.ListClientProfilesPaginatedResponseContent; +import com.auth0.client.mgmt.types.ListClientProfilesRequestParameters; +import com.auth0.client.mgmt.types.UpdateClientProfileRequestContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawClientProfilesClient { + protected final ClientOptions clientOptions; + + public AsyncRawClientProfilesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture>> list() { + return list(ListClientProfilesRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture>> list( + RequestOptions requestOptions) { + return list(ListClientProfilesRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture>> list( + ListClientProfilesRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public CompletableFuture>> list( + ListClientProfilesRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListClientProfilesPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListClientProfilesPaginatedResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListClientProfilesRequestParameters nextRequest = ListClientProfilesRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClientProfiles(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public CompletableFuture> create( + CreateClientProfileRequestContent request) { + return create(request, null); + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public CompletableFuture> create( + CreateClientProfileRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles"); + 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, ClientProfile.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 single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public CompletableFuture> get(String id) { + return get(id, null); + } + + /** + * Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public CompletableFuture> get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles") + .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, ClientProfile.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; + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture> update(String id) { + return update(id, UpdateClientProfileRequestContent.builder().build()); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture> update( + String id, RequestOptions requestOptions) { + return update(id, UpdateClientProfileRequestContent.builder().build(), requestOptions); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture> update( + String id, UpdateClientProfileRequestContent request) { + return update(id, request, null); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public CompletableFuture> update( + String id, UpdateClientProfileRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ClientProfile.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/AsyncRawClientsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java index fe59433f..032ebde9 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java @@ -11,15 +11,18 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; import com.auth0.client.mgmt.errors.InternalServerError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.types.Client; +import com.auth0.client.mgmt.types.ClientSearchResponse; import com.auth0.client.mgmt.types.CreateClientRequestContent; import com.auth0.client.mgmt.types.CreateClientResponseContent; import com.auth0.client.mgmt.types.GetClientRequestParameters; @@ -31,12 +34,15 @@ import com.auth0.client.mgmt.types.RegisterCimdClientRequestContent; import com.auth0.client.mgmt.types.RegisterCimdClientResponseContent; import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; +import com.auth0.client.mgmt.types.SearchClientsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientsResponseContent; import com.auth0.client.mgmt.types.UpdateClientRequestContent; import com.auth0.client.mgmt.types.UpdateClientResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import okhttp3.Call; @@ -71,7 +77,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, @@ -103,7 +109,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, @@ -136,7 +142,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, @@ -169,7 +175,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, @@ -217,6 +223,10 @@ public CompletableFuture>> QueryStringMapper.addQueryParameter( httpUrl, "external_client_id", request.getExternalClientId().orElse(null), false); } + if (!request.getAgentId().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "agent_id", request.getAgentId().orElse(null), false); + } if (!request.getQ().isAbsent()) { QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); } @@ -235,6 +245,15 @@ public CompletableFuture>> 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 @@ -295,6 +314,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -373,6 +395,15 @@ public CompletableFuture> 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 @@ -426,6 +457,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -482,6 +516,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -531,6 +574,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -603,6 +649,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -634,6 +689,236 @@ 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), + response)); + return; + case 500: + future.completeExceptionally(new InternalServerError( + 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; + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture>> search() { + return search(SearchClientsRequestParameters.builder().build()); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture>> search( + RequestOptions requestOptions) { + return search(SearchClientsRequestParameters.builder().build(), requestOptions); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture>> search( + SearchClientsRequestParameters request) { + return search(request, null); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
    + *
  • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
  • + *
  • The following fields are never returned by this endpoint: + *
      + *
    • client_secret
    • + *
    • encryption_key
    • + *
    • signing_keys
    • + *
    • owners
    • + *
    • addons
    • + *
    + *
  • + *
+ */ + public CompletableFuture>> search( + SearchClientsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("clients/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + if (!request.getIncludeFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchClientsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchClientsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchClientsRequestParameters nextRequest = SearchClientsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClients(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return search(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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), @@ -644,6 +929,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 504: + future.completeExceptionally(new GatewayTimeoutError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; } } catch (JsonProcessingException ignored) { // unable to map error response, throwing generic error @@ -652,6 +942,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -679,7 +972,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, @@ -710,7 +1003,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, @@ -742,7 +1035,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, @@ -774,7 +1067,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, @@ -816,6 +1109,15 @@ public CompletableFuture> ge 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 @@ -863,6 +1165,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -906,6 +1211,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -946,6 +1260,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1050,6 +1367,15 @@ public CompletableFuture> 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 @@ -1098,6 +1424,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1147,6 +1476,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -1196,6 +1534,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionProfilesClient.java index 3d29af88..89882f8b 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -104,6 +105,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -167,6 +177,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -219,6 +232,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -268,6 +290,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -311,6 +336,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -350,6 +384,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -395,6 +432,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -439,6 +485,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -483,6 +532,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -527,6 +585,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -570,6 +631,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -605,6 +675,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -673,6 +746,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -722,6 +804,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java index 0497fcb8..acc5d140 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -18,6 +19,7 @@ import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.errors.UnprocessableEntityError; import com.auth0.client.mgmt.types.ConnectionForList; import com.auth0.client.mgmt.types.CreateConnectionRequestContent; import com.auth0.client.mgmt.types.CreateConnectionResponseContent; @@ -135,6 +137,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -233,6 +246,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -287,6 +303,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -323,6 +348,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 422: + future.completeExceptionally(new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -336,6 +366,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -404,6 +437,15 @@ public CompletableFuture 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 @@ -452,6 +494,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -497,6 +542,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -537,6 +591,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -552,7 +609,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()); @@ -560,7 +617,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) { @@ -569,7 +626,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) { @@ -578,7 +635,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) { @@ -609,6 +666,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -650,6 +716,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 422: + future.completeExceptionally(new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 429: future.completeExceptionally(new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -663,6 +734,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -707,6 +781,15 @@ public CompletableFuture> checkStatus(String id, 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 @@ -752,6 +835,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java index 66cbdf8f..e9d1a1d7 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -112,6 +113,15 @@ public CompletableFuture>> list( 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 @@ -150,6 +160,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -224,6 +237,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -273,6 +295,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -316,6 +341,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -355,6 +389,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -407,6 +444,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -441,6 +487,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -485,6 +534,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -533,6 +591,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -576,6 +637,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -621,6 +691,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -781,6 +854,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -825,6 +907,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -870,6 +955,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -919,6 +1013,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -972,6 +1069,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -1021,6 +1127,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawDeviceCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawDeviceCredentialsClient.java index a2f4a0a7..c7b4298e 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawDeviceCredentialsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawDeviceCredentialsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -117,6 +118,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -181,6 +191,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -235,6 +248,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -284,6 +306,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -327,6 +352,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -367,6 +401,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java index 65ea9926..58764508 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java @@ -10,6 +10,7 @@ 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; @@ -84,6 +85,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -133,6 +143,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -178,6 +191,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -222,6 +244,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -275,6 +300,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -324,6 +358,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -395,6 +432,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -444,6 +490,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawEventStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEventStreamsClient.java index 96440b1b..80cb5888 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEventStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawEventStreamsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -92,6 +93,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -153,6 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -199,6 +212,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -248,6 +270,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -286,6 +311,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -329,6 +363,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -366,6 +403,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -406,6 +452,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -462,6 +511,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -506,6 +564,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -554,6 +615,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -593,6 +663,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java index 261c6a66..ec0622a7 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawEventsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.ResponseBodyReader; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.Stream; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -99,6 +100,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); @@ -109,9 +119,10 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ResponseBody responseBody = response.body(); if (response.isSuccessful()) { future.complete(new ManagementApiHttpResponse<>( - Stream.fromSse( + Stream.fromSseWithEventDiscrimination( EventStreamSubscribeEventsResponseContent.class, - new ResponseBodyReader(response)), + new ResponseBodyReader(response), + "type"), response)); return; } @@ -156,6 +167,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java index 78bfab67..298886a7 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java @@ -11,8 +11,10 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -97,6 +99,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -158,6 +169,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -204,6 +218,15 @@ public CompletableFuture> c 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 @@ -247,6 +270,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -299,6 +325,15 @@ public CompletableFuture> get( 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 @@ -346,6 +381,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -383,6 +421,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -415,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), @@ -428,6 +480,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -484,6 +539,15 @@ public CompletableFuture> u 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 @@ -499,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), @@ -527,6 +596,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java index 9594af96..54ea648e 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -93,6 +94,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -154,6 +164,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -200,6 +213,15 @@ public CompletableFuture> c 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 @@ -243,6 +265,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -295,6 +320,15 @@ public CompletableFuture> get( 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 @@ -342,6 +376,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -379,6 +416,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -419,6 +465,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -475,6 +524,15 @@ public CompletableFuture> u 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 @@ -490,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), @@ -500,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), @@ -513,6 +581,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java index ae7a8460..4bf5034f 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -97,6 +98,8 @@ public CompletableFuture>> l QueryStringMapper.addQueryParameter( httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); } + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -117,6 +120,15 @@ public CompletableFuture>> l 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 @@ -175,6 +187,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -219,6 +234,15 @@ public CompletableFuture> get 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 @@ -266,6 +290,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -309,6 +336,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -349,6 +385,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawFederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawGuardianClient.java similarity index 68% rename from src/main/java/com/auth0/client/mgmt/users/AsyncRawFederatedConnectionsTokensetsClient.java rename to src/main/java/com/auth0/client/mgmt/AsyncRawGuardianClient.java index 6f4456f4..3ff3aa96 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawFederatedConnectionsTokensetsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawGuardianClient.java @@ -1,24 +1,25 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.auth0.client.mgmt.users; +package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.ManagementApiException; import com.auth0.client.mgmt.core.ManagementApiHttpResponse; import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.FederatedConnectionTokenSet; +import com.auth0.client.mgmt.types.GetGuardianSettingsResponseContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsRequestContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; -import java.util.List; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -26,34 +27,33 @@ 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 AsyncRawFederatedConnectionsTokensetsClient { +public class AsyncRawGuardianClient { protected final ClientOptions clientOptions; - public AsyncRawFederatedConnectionsTokensetsClient(ClientOptions clientOptions) { + public AsyncRawGuardianClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } /** - * List active federated connections tokensets for a provided user + * TODO: Link this endpoint to relevant documentation when available. */ - public CompletableFuture>> list(String id) { - return list(id, null); + public CompletableFuture> get() { + return get(null); } /** - * List active federated connections tokensets for a provided user + * TODO: Link this endpoint to relevant documentation when available. */ - public CompletableFuture>> list( - String id, RequestOptions requestOptions) { + public CompletableFuture> get( + RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets"); + .addPathSegments("guardian/settings"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -69,7 +69,16 @@ public CompletableFuture>> future = + 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 @@ -79,7 +88,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO if (response.isSuccessful()) { future.complete(new ManagementApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), + responseBodyString, GetGuardianSettingsResponseContent.class), response)); return; } @@ -95,11 +104,6 @@ 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), @@ -113,6 +117,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -126,43 +133,68 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> delete(String id, String tokensetId) { - return delete(id, tokensetId, null); + /** + * Update a tenant's guardian settings such as Remember Me + */ + public CompletableFuture> set( + SetGuardianSettingsRequestContent request) { + return set(request, null); } - public CompletableFuture> delete( - String id, String tokensetId, RequestOptions requestOptions) { + /** + * Update a tenant's guardian settings such as Remember Me + */ + public CompletableFuture> set( + SetGuardianSettingsRequestContent request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets") - .addPathSegment(tokensetId); + .addPathSegments("guardian/settings"); 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("DELETE", null) + .method("PUT", body) .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - CompletableFuture> future = new CompletableFuture<>(); + 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<>(null, response)); + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SetGuardianSettingsResponseContent.class), + response)); return; } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; try { switch (response.code()) { case 400: @@ -193,6 +225,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawHooksClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawHooksClient.java index 27410a0d..ce0eaf4f 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawHooksClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawHooksClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -113,6 +114,15 @@ public CompletableFuture>> li 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 @@ -178,6 +188,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -230,6 +243,15 @@ public CompletableFuture> c 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 @@ -278,6 +300,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -342,6 +367,15 @@ public CompletableFuture> get( 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 @@ -389,6 +423,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -432,6 +469,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -472,6 +518,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -540,6 +589,15 @@ public CompletableFuture> u 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 @@ -593,6 +651,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawJobsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawJobsClient.java index fefa3dcc..0ea49cec 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawJobsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawJobsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -66,6 +67,15 @@ public CompletableFuture> get( 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 @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java index b619ac29..31cc2af0 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java @@ -10,6 +10,7 @@ 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; @@ -209,6 +210,15 @@ public CompletableFuture 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 @@ -252,6 +262,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -618,6 +631,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -666,6 +688,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -950,6 +975,15 @@ public CompletableFuture> 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 @@ -993,6 +1027,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1036,6 +1073,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -1081,6 +1127,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1361,6 +1410,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -1404,6 +1462,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawLogsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawLogsClient.java index 1ab0e67d..5843ef52 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawLogsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawLogsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -189,6 +190,15 @@ public CompletableFuture>> lis 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 @@ -249,6 +259,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -293,6 +306,15 @@ public CompletableFuture> get( 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 @@ -340,6 +362,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawNetworkAclsClient.java index 2accd174..0d9c18e3 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawNetworkAclsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawNetworkAclsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -103,6 +104,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -166,6 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -217,6 +230,15 @@ public CompletableFuture> create( 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 @@ -267,6 +289,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -311,6 +336,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -354,6 +388,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -407,6 +444,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -455,6 +501,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -498,6 +547,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -543,6 +601,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -611,6 +672,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -660,6 +730,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java index 4a008614..c7dda483 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java @@ -11,10 +11,12 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -25,6 +27,9 @@ import com.auth0.client.mgmt.types.ListOrganizationsPaginatedResponseContent; import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; import com.auth0.client.mgmt.types.Organization; +import com.auth0.client.mgmt.types.SearchOrganization; +import com.auth0.client.mgmt.types.SearchOrganizationsPaginatedResponseContent; +import com.auth0.client.mgmt.types.SearchOrganizationsRequestParameters; import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -135,6 +140,8 @@ public CompletableFuture { httpUrl.addQueryParameter(_key, _value); @@ -159,6 +173,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -220,6 +243,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -272,6 +298,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -321,6 +356,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -365,6 +403,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -414,6 +461,207 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture>> search() { + return search(SearchOrganizationsRequestParameters.builder().build()); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture>> search( + RequestOptions requestOptions) { + return search(SearchOrganizationsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture>> search( + SearchOrganizationsRequestParameters request) { + return search(request, null); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
    + *
  • Specify a search criteria for organizations
  • + *
  • Search via name
  • + *
  • Search via display_name
  • + *
  • Substring matching (contains and ends-with) requires at least 3 characters
  • + *
  • Use wildcards
  • + *
+ *

The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

+ *

This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

+ *

Results are eventually consistent and may not reflect recent updates immediately.

+ *

Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

+ */ + public CompletableFuture>> search( + SearchOrganizationsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchOrganizationsPaginatedResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchOrganizationsPaginatedResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchOrganizationsRequestParameters nextRequest = + SearchOrganizationsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getOrganizations(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return search(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 504: + future.completeExceptionally(new GatewayTimeoutError( + 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)); } @@ -458,6 +706,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -506,6 +763,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -551,6 +811,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -596,6 +865,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -664,6 +936,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -708,6 +989,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawPortalsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawPortalsClient.java new file mode 100644 index 00000000..0a460ac1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawPortalsClient.java @@ -0,0 +1,576 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.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.InternalServerError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.CreatePortalRequestContent; +import com.auth0.client.mgmt.types.ListPortalsResponseContent; +import com.auth0.client.mgmt.types.Portal; +import com.auth0.client.mgmt.types.UpdatePortalRequestContent; +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 AsyncRawPortalsClient { + protected final ClientOptions clientOptions; + + public AsyncRawPortalsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public CompletableFuture> list() { + return list(null); + } + + public CompletableFuture> list( + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals"); + 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, ListPortalsResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 500: + future.completeExceptionally(new InternalServerError( + 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; + } + + public CompletableFuture> create(CreatePortalRequestContent request) { + return create(request, null); + } + + public CompletableFuture> create( + CreatePortalRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals"); + 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, Portal.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 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; + case 500: + future.completeExceptionally(new InternalServerError( + 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; + } + + public CompletableFuture> get(String id) { + return get(id, null); + } + + public CompletableFuture> get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals") + .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, Portal.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; + case 500: + future.completeExceptionally(new InternalServerError( + 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; + } + + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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; + case 500: + future.completeExceptionally(new InternalServerError( + 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; + } + + public CompletableFuture> update(String id) { + return update(id, UpdatePortalRequestContent.builder().build()); + } + + public CompletableFuture> update(String id, RequestOptions requestOptions) { + return update(id, UpdatePortalRequestContent.builder().build(), requestOptions); + } + + public CompletableFuture> update(String id, UpdatePortalRequestContent request) { + return update(id, request, null); + } + + public CompletableFuture> update( + String id, UpdatePortalRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Portal.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 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; + case 500: + future.completeExceptionally(new InternalServerError( + 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/AsyncRawPromptsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawPromptsClient.java index 908370e5..b4ecb8ab 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawPromptsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawPromptsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> 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 @@ -106,6 +116,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -173,6 +186,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -216,6 +238,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawRateLimitPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRateLimitPoliciesClient.java index 6cc104b2..87f9b4f6 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRateLimitPoliciesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawRateLimitPoliciesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -102,6 +103,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -165,6 +175,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -211,6 +224,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -260,6 +282,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -298,6 +323,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -342,6 +376,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -379,6 +416,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -419,6 +465,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -466,6 +515,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -515,6 +573,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java index c2cef620..2ff01bec 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -98,6 +99,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -164,6 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -229,6 +242,15 @@ public CompletableFuture> revoke( 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 @@ -269,6 +291,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -313,6 +338,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -361,6 +395,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -404,6 +441,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -444,6 +490,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -512,6 +561,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -561,6 +619,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawResourceServersClient.java index ffd130f3..74cb3bfc 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawResourceServersClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawResourceServersClient.java @@ -11,10 +11,13 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; +import com.auth0.client.mgmt.errors.InternalServerError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -25,12 +28,16 @@ import com.auth0.client.mgmt.types.ListResourceServerOffsetPaginatedResponseContent; import com.auth0.client.mgmt.types.ListResourceServerRequestParameters; import com.auth0.client.mgmt.types.ResourceServer; +import com.auth0.client.mgmt.types.ResourceServerSearchResponse; +import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters; +import com.auth0.client.mgmt.types.SearchResourceServersResponseContent; import com.auth0.client.mgmt.types.UpdateResourceServerRequestContent; import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import okhttp3.Call; @@ -110,6 +117,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -173,6 +189,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -225,6 +244,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -274,6 +302,188 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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; + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

The signing_secret field is not supported by this endpoint.

+ */ + public CompletableFuture>> search() { + return search(SearchResourceServersRequestParameters.builder().build()); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

The signing_secret field is not supported by this endpoint.

+ */ + public CompletableFuture>> search( + RequestOptions requestOptions) { + return search(SearchResourceServersRequestParameters.builder().build(), requestOptions); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

The signing_secret field is not supported by this endpoint.

+ */ + public CompletableFuture>> search( + SearchResourceServersRequestParameters request) { + return search(request, null); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

The signing_secret field is not supported by this endpoint.

+ */ + public CompletableFuture>> search( + SearchResourceServersRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("resource-servers/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + if (!request.getIncludeFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchResourceServersResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchResourceServersResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchResourceServersRequestParameters nextRequest = + SearchResourceServersRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getResourceServers(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return search(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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; + case 500: + future.completeExceptionally(new InternalServerError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 504: + future.completeExceptionally(new GatewayTimeoutError( + 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)); } @@ -338,6 +548,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -387,6 +606,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -430,6 +652,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -470,6 +701,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -538,6 +772,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -587,6 +830,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java index f400749a..67cdf4c6 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -51,7 +52,7 @@ public AsyncRawRolesClient(ClientOptions clientOptions) { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

*/ public CompletableFuture>> list() { @@ -59,7 +60,7 @@ public CompletableFuture>> li } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

*/ public CompletableFuture>> list(RequestOptions requestOptions) { @@ -67,7 +68,7 @@ public CompletableFuture>> li } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

*/ public CompletableFuture>> list( @@ -76,7 +77,7 @@ public CompletableFuture>> li } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

*/ public CompletableFuture>> list( @@ -93,6 +94,14 @@ public CompletableFuture>> li QueryStringMapper.addQueryParameter( httpUrl, "name_filter", request.getNameFilter().orElse(null), false); } + if (!request.getType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "type", request.getType().orElse(null), false); + } + if (!request.getOwnerId().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "owner_id", request.getOwnerId().orElse(null), false); + } if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -108,6 +117,15 @@ public CompletableFuture>> li 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 @@ -168,6 +186,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -222,6 +243,15 @@ public CompletableFuture> c 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 @@ -270,6 +300,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -314,6 +347,15 @@ public CompletableFuture> get( 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 @@ -361,6 +403,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -404,6 +449,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -449,6 +503,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -517,6 +574,15 @@ public CompletableFuture> u 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 @@ -560,6 +626,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawRulesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRulesClient.java index 16bafce4..06aa5cad 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRulesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawRulesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -113,6 +114,15 @@ public CompletableFuture>> li 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 @@ -178,6 +188,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -232,6 +245,15 @@ public CompletableFuture> c 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 @@ -280,6 +302,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -348,6 +373,15 @@ public CompletableFuture> get( 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 @@ -395,6 +429,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -438,6 +475,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -478,6 +524,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -546,6 +595,15 @@ public CompletableFuture> u 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 @@ -599,6 +657,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawRulesConfigsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRulesConfigsClient.java index 43c04f64..1a910b09 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRulesConfigsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawRulesConfigsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -72,6 +73,15 @@ public CompletableFuture>> list(Requ 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 @@ -110,6 +120,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -163,6 +176,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -201,6 +223,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -244,6 +269,15 @@ public CompletableFuture> delete(String key, Req 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 @@ -279,6 +313,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java index d6431aac..be0715d9 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -102,6 +103,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -166,6 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -218,6 +231,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -272,6 +294,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -316,6 +341,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -370,6 +404,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -413,6 +450,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -458,6 +504,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -526,6 +575,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -580,6 +638,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawSessionsClient.java index e439fd36..a514ff73 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawSessionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawSessionsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -70,6 +71,15 @@ public CompletableFuture> g 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 @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -156,6 +169,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -196,6 +218,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -264,6 +289,15 @@ public CompletableFuture 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 @@ -312,6 +346,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -356,6 +393,15 @@ public CompletableFuture> revoke(String id, Requ 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 @@ -401,6 +447,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawStatsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawStatsClient.java index c1781c4a..7674453d 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawStatsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawStatsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -67,6 +68,15 @@ public CompletableFuture> getActiveUsersCount( 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 @@ -103,6 +113,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -168,6 +181,15 @@ public CompletableFuture>> getDaily( 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 @@ -211,6 +233,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java index 53dbc741..84eca523 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -112,6 +122,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -164,6 +177,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -208,6 +230,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawTicketsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawTicketsClient.java index 48fac7d3..88b2914e 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawTicketsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawTicketsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -79,6 +80,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -128,6 +138,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -199,6 +212,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -248,6 +270,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawTokenExchangeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawTokenExchangeProfilesClient.java index dadc0c7d..4e6df64a 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawTokenExchangeProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawTokenExchangeProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -130,6 +131,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -191,6 +201,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -245,6 +258,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -294,6 +316,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -340,6 +365,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -389,6 +423,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -434,6 +471,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -469,6 +515,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -540,6 +589,15 @@ public CompletableFuture> update( 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 @@ -590,6 +648,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java index 89f7363a..d2e345db 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -104,6 +105,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -167,6 +177,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -219,6 +232,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -268,6 +290,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -312,6 +337,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -351,6 +385,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -396,6 +433,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -440,6 +486,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -484,6 +533,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -528,6 +586,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -571,6 +632,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -606,6 +676,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -674,6 +747,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -723,6 +805,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawUserBlocksClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserBlocksClient.java index 0fe4b306..9cb228eb 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserBlocksClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawUserBlocksClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -79,6 +80,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -123,6 +133,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -170,6 +183,15 @@ public CompletableFuture> deleteByIdentifier( 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 @@ -210,6 +232,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -277,6 +302,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -325,6 +359,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -370,6 +407,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -415,6 +461,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawUserGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserGrantsClient.java index 0b1584e3..7c013bee 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawUserGrantsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -104,6 +105,15 @@ public CompletableFuture 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 @@ -160,6 +170,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -205,6 +218,15 @@ public CompletableFuture> deleteByUserId( 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 @@ -240,6 +262,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -283,6 +308,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -318,6 +352,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java index fdca458b..cc8f76f4 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -19,10 +20,12 @@ import com.auth0.client.mgmt.errors.ServiceUnavailableError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.ConsentSigningKey; import com.auth0.client.mgmt.types.CreateUserRequestContent; import com.auth0.client.mgmt.types.CreateUserResponseContent; import com.auth0.client.mgmt.types.GetUserRequestParameters; import com.auth0.client.mgmt.types.GetUserResponseContent; +import com.auth0.client.mgmt.types.ListUserConsentSigningKeysResponseContent; import com.auth0.client.mgmt.types.ListUsersByEmailRequestParameters; import com.auth0.client.mgmt.types.ListUsersOffsetPaginatedResponseContent; import com.auth0.client.mgmt.types.ListUsersRequestParameters; @@ -57,34 +60,42 @@ public AsyncRawUsersClient(ClientOptions clientOptions) { } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
    - *
  • Specify a search criteria for users
  • + *
  • Specify search criteria for users
  • *
  • Sort the users to be returned
  • *
  • Select the fields to be returned
  • *
  • Specify the number of users to retrieve per page and the page index
  • *
- *

The q query parameter can be used to get users that match the specified criteria using query string syntax.

- *

Learn more about searching for users.

- *

Read about best practices when working with the API endpoints for retrieving users.

- *

Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

+ *

This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

+ *
    + *
  • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
  • + *
  • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
  • + *
  • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
  • + *
+ *

Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

+ *

For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

*/ public CompletableFuture>> list() { return list(ListUsersRequestParameters.builder().build()); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
    - *
  • Specify a search criteria for users
  • + *
  • Specify search criteria for users
  • *
  • Sort the users to be returned
  • *
  • Select the fields to be returned
  • *
  • Specify the number of users to retrieve per page and the page index
  • *
- *

The q query parameter can be used to get users that match the specified criteria using query string syntax.

- *

Learn more about searching for users.

- *

Read about best practices when working with the API endpoints for retrieving users.

- *

Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

+ *

This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

+ *
    + *
  • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
  • + *
  • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
  • + *
  • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
  • + *
+ *

Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

+ *

For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

*/ public CompletableFuture>> list( RequestOptions requestOptions) { @@ -92,17 +103,21 @@ public CompletableFuture - *
  • Specify a search criteria for users
  • + *
  • Specify search criteria for users
  • *
  • Sort the users to be returned
  • *
  • Select the fields to be returned
  • *
  • Specify the number of users to retrieve per page and the page index
  • * - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public CompletableFuture>> list( ListUsersRequestParameters request) { @@ -110,17 +125,21 @@ public CompletableFuture - *
  • Specify a search criteria for users
  • + *
  • Specify search criteria for users
  • *
  • Sort the users to be returned
  • *
  • Select the fields to be returned
  • *
  • Specify the number of users to retrieve per page and the page index
  • * - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public CompletableFuture>> list( ListUsersRequestParameters request, RequestOptions requestOptions) { @@ -174,6 +193,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -241,6 +269,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -295,6 +326,15 @@ public CompletableFuture> c 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 @@ -343,6 +383,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -400,6 +443,15 @@ public CompletableFuture>> li 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 @@ -443,6 +495,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -511,6 +566,15 @@ public CompletableFuture> get( 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 @@ -558,6 +622,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -601,6 +668,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -641,6 +717,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -985,6 +1064,15 @@ public CompletableFuture> u 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 @@ -1033,6 +1121,314 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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 all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public CompletableFuture> + listConsentSigningKeys(String id) { + return listConsentSigningKeys(id, null); + } + + /** + * Retrieve all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public CompletableFuture> + listConsentSigningKeys(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("users") + .addPathSegment(id) + .addPathSegments("consent-signing-keys"); + 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, ListUserConsentSigningKeysResponseContent.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 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 single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public CompletableFuture> getConsentSigningKey(String id, String kid) { + return getConsentSigningKey(id, kid, null); + } + + /** + * Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public CompletableFuture> getConsentSigningKey( + String id, String kid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("users") + .addPathSegment(id) + .addPathSegments("consent-signing-keys") + .addPathSegment(kid); + 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, ConsentSigningKey.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; + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public CompletableFuture> deleteConsentSigningKey(String id, String kid) { + return deleteConsentSigningKey(id, kid, null); + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public CompletableFuture> deleteConsentSigningKey( + String id, String kid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("users") + .addPathSegment(id) + .addPathSegments("consent-signing-keys") + .addPathSegment(kid); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); } @@ -1079,6 +1475,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -1123,6 +1528,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1191,6 +1599,15 @@ public CompletableFuture> revokeAccess( 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 @@ -1231,6 +1648,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java index e8193c09..e3e7ce0f 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java @@ -12,6 +12,8 @@ import com.auth0.client.mgmt.types.GetResourceServerResponseContent; import com.auth0.client.mgmt.types.ListResourceServerRequestParameters; import com.auth0.client.mgmt.types.ResourceServer; +import com.auth0.client.mgmt.types.ResourceServerSearchResponse; +import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters; import com.auth0.client.mgmt.types.UpdateResourceServerRequestContent; import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; import java.util.concurrent.CompletableFuture; @@ -77,6 +79,44 @@ public CompletableFuture create( return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); } + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public CompletableFuture> search() { + return this.rawClient.search().thenApply(response -> response.body()); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public CompletableFuture> search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).thenApply(response -> response.body()); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public CompletableFuture> search( + SearchResourceServersRequestParameters request) { + return this.rawClient.search(request).thenApply(response -> response.body()); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public CompletableFuture> search( + SearchResourceServersRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve API details with the given ID. */ diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java index 945463dc..c929570c 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java @@ -47,7 +47,7 @@ public AsyncRawRolesClient withRawResponse() { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public CompletableFuture> list() { @@ -55,7 +55,7 @@ public CompletableFuture> list() { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public CompletableFuture> list(RequestOptions requestOptions) { @@ -63,7 +63,7 @@ public CompletableFuture> list(RequestOptions requestOp } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public CompletableFuture> list(ListRolesRequestParameters request) { @@ -71,7 +71,7 @@ public CompletableFuture> list(ListRolesRequestParamete } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public CompletableFuture> list( diff --git a/src/main/java/com/auth0/client/mgmt/AsyncUsersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncUsersClient.java index 76e96bd0..e71d6539 100644 --- a/src/main/java/com/auth0/client/mgmt/AsyncUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/AsyncUsersClient.java @@ -7,10 +7,12 @@ import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ConsentSigningKey; import com.auth0.client.mgmt.types.CreateUserRequestContent; import com.auth0.client.mgmt.types.CreateUserResponseContent; import com.auth0.client.mgmt.types.GetUserRequestParameters; import com.auth0.client.mgmt.types.GetUserResponseContent; +import com.auth0.client.mgmt.types.ListUserConsentSigningKeysResponseContent; import com.auth0.client.mgmt.types.ListUsersByEmailRequestParameters; import com.auth0.client.mgmt.types.ListUsersRequestParameters; import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; @@ -24,7 +26,6 @@ import com.auth0.client.mgmt.users.AsyncEffectivePermissionsClient; import com.auth0.client.mgmt.users.AsyncEffectiveRolesClient; import com.auth0.client.mgmt.users.AsyncEnrollmentsClient; -import com.auth0.client.mgmt.users.AsyncFederatedConnectionsTokensetsClient; import com.auth0.client.mgmt.users.AsyncGroupsClient; import com.auth0.client.mgmt.users.AsyncIdentitiesClient; import com.auth0.client.mgmt.users.AsyncLogsClient; @@ -56,8 +57,6 @@ public class AsyncUsersClient { protected final Supplier enrollmentsClient; - protected final Supplier federatedConnectionsTokensetsClient; - protected final Supplier groupsClient; protected final Supplier identitiesClient; @@ -87,8 +86,6 @@ public AsyncUsersClient(ClientOptions clientOptions) { this.effectivePermissionsClient = Suppliers.memoize(() -> new AsyncEffectivePermissionsClient(clientOptions)); this.effectiveRolesClient = Suppliers.memoize(() -> new AsyncEffectiveRolesClient(clientOptions)); this.enrollmentsClient = Suppliers.memoize(() -> new AsyncEnrollmentsClient(clientOptions)); - this.federatedConnectionsTokensetsClient = - Suppliers.memoize(() -> new AsyncFederatedConnectionsTokensetsClient(clientOptions)); this.groupsClient = Suppliers.memoize(() -> new AsyncGroupsClient(clientOptions)); this.identitiesClient = Suppliers.memoize(() -> new AsyncIdentitiesClient(clientOptions)); this.logsClient = Suppliers.memoize(() -> new AsyncLogsClient(clientOptions)); @@ -109,68 +106,84 @@ public AsyncRawUsersClient withRawResponse() { } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public CompletableFuture> list() { return this.rawClient.list().thenApply(response -> response.body()); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public CompletableFuture> list(RequestOptions requestOptions) { return this.rawClient.list(requestOptions).thenApply(response -> response.body()); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public CompletableFuture> list(ListUsersRequestParameters request) { return this.rawClient.list(request).thenApply(response -> response.body()); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public CompletableFuture> list( ListUsersRequestParameters request, RequestOptions requestOptions) { @@ -561,6 +574,50 @@ public CompletableFuture update( return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); } + /** + * Retrieve all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public CompletableFuture listConsentSigningKeys(String id) { + return this.rawClient.listConsentSigningKeys(id).thenApply(response -> response.body()); + } + + /** + * Retrieve all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public CompletableFuture listConsentSigningKeys( + String id, RequestOptions requestOptions) { + return this.rawClient.listConsentSigningKeys(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public CompletableFuture getConsentSigningKey(String id, String kid) { + return this.rawClient.getConsentSigningKey(id, kid).thenApply(response -> response.body()); + } + + /** + * Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public CompletableFuture getConsentSigningKey( + String id, String kid, RequestOptions requestOptions) { + return this.rawClient.getConsentSigningKey(id, kid, requestOptions).thenApply(response -> response.body()); + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public CompletableFuture deleteConsentSigningKey(String id, String kid) { + return this.rawClient.deleteConsentSigningKey(id, kid).thenApply(response -> response.body()); + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public CompletableFuture deleteConsentSigningKey(String id, String kid, RequestOptions requestOptions) { + return this.rawClient.deleteConsentSigningKey(id, kid, requestOptions).thenApply(response -> response.body()); + } + /** * Remove an existing multi-factor authentication (MFA) recovery code and generate a new one. If a user cannot access the original device or account used for MFA enrollment, they can use a recovery code to authenticate. */ @@ -629,10 +686,6 @@ public AsyncEnrollmentsClient enrollments() { return this.enrollmentsClient.get(); } - public AsyncFederatedConnectionsTokensetsClient federatedConnectionsTokensets() { - return this.federatedConnectionsTokensetsClient.get(); - } - public AsyncGroupsClient groups() { return this.groupsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java index 093806a1..c0927ae1 100644 --- a/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.types.CreateClientGrantResponseContent; import com.auth0.client.mgmt.types.GetClientGrantResponseContent; import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsRequestParameters; import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; import java.util.function.Supplier; @@ -81,6 +82,39 @@ public CreateClientGrantResponseContent create( return this.rawClient.create(request, requestOptions).body(); } + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public SyncPagingIterable search() { + return this.rawClient.search().body(); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public SyncPagingIterable search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).body(); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public SyncPagingIterable search(SearchClientGrantsRequestParameters request) { + return this.rawClient.search(request).body(); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public SyncPagingIterable search( + SearchClientGrantsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).body(); + } + /** * Retrieve a single client grant, including the * scopes associated with the application/API pair. diff --git a/src/main/java/com/auth0/client/mgmt/ClientProfilesClient.java b/src/main/java/com/auth0/client/mgmt/ClientProfilesClient.java new file mode 100644 index 00000000..739039dc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/ClientProfilesClient.java @@ -0,0 +1,129 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ClientProfile; +import com.auth0.client.mgmt.types.CreateClientProfileRequestContent; +import com.auth0.client.mgmt.types.ListClientProfilesRequestParameters; +import com.auth0.client.mgmt.types.UpdateClientProfileRequestContent; + +public class ClientProfilesClient { + protected final ClientOptions clientOptions; + + private final RawClientProfilesClient rawClient; + + public ClientProfilesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawClientProfilesClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawClientProfilesClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public SyncPagingIterable list() { + return this.rawClient.list().body(); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public SyncPagingIterable list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public SyncPagingIterable list(ListClientProfilesRequestParameters request) { + return this.rawClient.list(request).body(); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public SyncPagingIterable list( + ListClientProfilesRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).body(); + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public ClientProfile create(CreateClientProfileRequestContent request) { + return this.rawClient.create(request).body(); + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public ClientProfile create(CreateClientProfileRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + /** + * Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public ClientProfile get(String id) { + return this.rawClient.get(id).body(); + } + + /** + * Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public ClientProfile get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).body(); + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ClientProfile update(String id) { + return this.rawClient.update(id).body(); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ClientProfile update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).body(); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ClientProfile update(String id, UpdateClientProfileRequestContent request) { + return this.rawClient.update(id, request).body(); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ClientProfile update(String id, UpdateClientProfileRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/ClientsClient.java b/src/main/java/com/auth0/client/mgmt/ClientsClient.java index 2e5dc681..4b1f280b 100644 --- a/src/main/java/com/auth0/client/mgmt/ClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/ClientsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Client; +import com.auth0.client.mgmt.types.ClientSearchResponse; import com.auth0.client.mgmt.types.CreateClientRequestContent; import com.auth0.client.mgmt.types.CreateClientResponseContent; import com.auth0.client.mgmt.types.GetClientRequestParameters; @@ -20,6 +21,7 @@ import com.auth0.client.mgmt.types.RegisterCimdClientRequestContent; import com.auth0.client.mgmt.types.RegisterCimdClientResponseContent; import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; +import com.auth0.client.mgmt.types.SearchClientsRequestParameters; import com.auth0.client.mgmt.types.UpdateClientRequestContent; import com.auth0.client.mgmt.types.UpdateClientResponseContent; import java.util.function.Supplier; @@ -61,7 +63,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 +95,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 +127,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 +159,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, @@ -269,6 +271,95 @@ public RegisterCimdClientResponseContent registerCimdClient( return this.rawClient.registerCimdClient(request, requestOptions).body(); } + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public SyncPagingIterable search() { + return this.rawClient.search().body(); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public SyncPagingIterable search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).body(); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public SyncPagingIterable search(SearchClientsRequestParameters request) { + return this.rawClient.search(request).body(); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public SyncPagingIterable search( + SearchClientsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).body(); + } + /** * Retrieve client details by ID. Clients are SSO connections or Applications linked with your Auth0 tenant. A list of fields to include or exclude may also be specified. * For more information, read Applications in Auth0 and Single Sign-On. @@ -283,7 +374,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 +405,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 +436,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 +467,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 4e71232c..4cdae753 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/GuardianClient.java b/src/main/java/com/auth0/client/mgmt/GuardianClient.java new file mode 100644 index 00000000..e7db3d9a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/GuardianClient.java @@ -0,0 +1,83 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.Suppliers; +import com.auth0.client.mgmt.guardian.EnrollmentsClient; +import com.auth0.client.mgmt.guardian.FactorsClient; +import com.auth0.client.mgmt.guardian.PoliciesClient; +import com.auth0.client.mgmt.types.GetGuardianSettingsResponseContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsRequestContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsResponseContent; +import java.util.function.Supplier; + +public class GuardianClient { + protected final ClientOptions clientOptions; + + private final RawGuardianClient rawClient; + + protected final Supplier enrollmentsClient; + + protected final Supplier factorsClient; + + protected final Supplier policiesClient; + + public GuardianClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawGuardianClient(clientOptions); + this.enrollmentsClient = Suppliers.memoize(() -> new EnrollmentsClient(clientOptions)); + this.factorsClient = Suppliers.memoize(() -> new FactorsClient(clientOptions)); + this.policiesClient = Suppliers.memoize(() -> new PoliciesClient(clientOptions)); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawGuardianClient withRawResponse() { + return this.rawClient; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public GetGuardianSettingsResponseContent get() { + return this.rawClient.get().body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public GetGuardianSettingsResponseContent get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).body(); + } + + /** + * Update a tenant's guardian settings such as Remember Me + */ + public SetGuardianSettingsResponseContent set(SetGuardianSettingsRequestContent request) { + return this.rawClient.set(request).body(); + } + + /** + * Update a tenant's guardian settings such as Remember Me + */ + public SetGuardianSettingsResponseContent set( + SetGuardianSettingsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(request, requestOptions).body(); + } + + public EnrollmentsClient enrollments() { + return this.enrollmentsClient.get(); + } + + public FactorsClient factors() { + return this.factorsClient.get(); + } + + public PoliciesClient policies() { + return this.policiesClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/ManagementApi.java b/src/main/java/com/auth0/client/mgmt/ManagementApi.java index 7e28f9f7..a35dde43 100644 --- a/src/main/java/com/auth0/client/mgmt/ManagementApi.java +++ b/src/main/java/com/auth0/client/mgmt/ManagementApi.java @@ -8,7 +8,7 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.emails.EmailsClient; -import com.auth0.client.mgmt.guardian.GuardianClient; +import com.auth0.client.mgmt.experimentation.ExperimentationClient; import com.auth0.client.mgmt.keys.KeysClient; import com.auth0.client.mgmt.riskassessments.RiskAssessmentsClient; import com.auth0.client.mgmt.tenants.TenantsClient; @@ -20,10 +20,14 @@ public class ManagementApi { protected final Supplier actionsClient; + protected final Supplier agentsClient; + protected final Supplier brandingClient; protected final Supplier clientGrantsClient; + protected final Supplier clientProfilesClient; + protected final Supplier clientsClient; protected final Supplier connectionProfilesClient; @@ -48,6 +52,8 @@ public class ManagementApi { protected final Supplier groupsClient; + protected final Supplier guardianClient; + protected final Supplier hooksClient; protected final Supplier jobsClient; @@ -60,6 +66,8 @@ public class ManagementApi { protected final Supplier organizationsClient; + protected final Supplier portalsClient; + protected final Supplier promptsClient; protected final Supplier rateLimitPoliciesClient; @@ -98,7 +106,7 @@ public class ManagementApi { protected final Supplier emailsClient; - protected final Supplier guardianClient; + protected final Supplier experimentationClient; protected final Supplier keysClient; @@ -111,8 +119,10 @@ public class ManagementApi { public ManagementApi(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.actionsClient = Suppliers.memoize(() -> new ActionsClient(clientOptions)); + this.agentsClient = Suppliers.memoize(() -> new AgentsClient(clientOptions)); this.brandingClient = Suppliers.memoize(() -> new BrandingClient(clientOptions)); this.clientGrantsClient = Suppliers.memoize(() -> new ClientGrantsClient(clientOptions)); + this.clientProfilesClient = Suppliers.memoize(() -> new ClientProfilesClient(clientOptions)); this.clientsClient = Suppliers.memoize(() -> new ClientsClient(clientOptions)); this.connectionProfilesClient = Suppliers.memoize(() -> new ConnectionProfilesClient(clientOptions)); this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions)); @@ -125,12 +135,14 @@ public ManagementApi(ClientOptions clientOptions) { this.formsClient = Suppliers.memoize(() -> new FormsClient(clientOptions)); this.userGrantsClient = Suppliers.memoize(() -> new UserGrantsClient(clientOptions)); this.groupsClient = Suppliers.memoize(() -> new GroupsClient(clientOptions)); + this.guardianClient = Suppliers.memoize(() -> new GuardianClient(clientOptions)); this.hooksClient = Suppliers.memoize(() -> new HooksClient(clientOptions)); this.jobsClient = Suppliers.memoize(() -> new JobsClient(clientOptions)); this.logStreamsClient = Suppliers.memoize(() -> new LogStreamsClient(clientOptions)); this.logsClient = Suppliers.memoize(() -> new LogsClient(clientOptions)); this.networkAclsClient = Suppliers.memoize(() -> new NetworkAclsClient(clientOptions)); this.organizationsClient = Suppliers.memoize(() -> new OrganizationsClient(clientOptions)); + this.portalsClient = Suppliers.memoize(() -> new PortalsClient(clientOptions)); this.promptsClient = Suppliers.memoize(() -> new PromptsClient(clientOptions)); this.rateLimitPoliciesClient = Suppliers.memoize(() -> new RateLimitPoliciesClient(clientOptions)); this.refreshTokensClient = Suppliers.memoize(() -> new RefreshTokensClient(clientOptions)); @@ -150,7 +162,7 @@ public ManagementApi(ClientOptions clientOptions) { this.anomalyClient = Suppliers.memoize(() -> new AnomalyClient(clientOptions)); this.attackProtectionClient = Suppliers.memoize(() -> new AttackProtectionClient(clientOptions)); this.emailsClient = Suppliers.memoize(() -> new EmailsClient(clientOptions)); - this.guardianClient = Suppliers.memoize(() -> new GuardianClient(clientOptions)); + this.experimentationClient = Suppliers.memoize(() -> new ExperimentationClient(clientOptions)); this.keysClient = Suppliers.memoize(() -> new KeysClient(clientOptions)); this.riskAssessmentsClient = Suppliers.memoize(() -> new RiskAssessmentsClient(clientOptions)); this.tenantsClient = Suppliers.memoize(() -> new TenantsClient(clientOptions)); @@ -161,6 +173,10 @@ public ActionsClient actions() { return this.actionsClient.get(); } + public AgentsClient agents() { + return this.agentsClient.get(); + } + public BrandingClient branding() { return this.brandingClient.get(); } @@ -169,6 +185,10 @@ public ClientGrantsClient clientGrants() { return this.clientGrantsClient.get(); } + public ClientProfilesClient clientProfiles() { + return this.clientProfilesClient.get(); + } + public ClientsClient clients() { return this.clientsClient.get(); } @@ -217,6 +237,10 @@ public GroupsClient groups() { return this.groupsClient.get(); } + public GuardianClient guardian() { + return this.guardianClient.get(); + } + public HooksClient hooks() { return this.hooksClient.get(); } @@ -241,6 +265,10 @@ public OrganizationsClient organizations() { return this.organizationsClient.get(); } + public PortalsClient portals() { + return this.portalsClient.get(); + } + public PromptsClient prompts() { return this.promptsClient.get(); } @@ -317,8 +345,8 @@ public EmailsClient emails() { return this.emailsClient.get(); } - public GuardianClient guardian() { - return this.guardianClient.get(); + public ExperimentationClient experimentation() { + return this.experimentationClient.get(); } public KeysClient keys() { diff --git a/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java b/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java index 479fba5a..04262141 100644 --- a/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java +++ b/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java @@ -4,6 +4,8 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.*; +import com.auth0.net.Telemetry; +import com.auth0.utils.Asserts; import java.util.HashMap; import java.util.Map; import java.util.Optional; @@ -27,6 +29,8 @@ public class ManagementApiBuilder { private String customDomain = null; + private Telemetry telemetry = null; + // Domain-based initialization fields private String domain = null; private String clientId = null; @@ -188,6 +192,24 @@ public ManagementApiBuilder addHeader(String name, String value) { return this; } + /** + * Configure the telemetry sent to Auth0 on every request. Use this when building an SDK on top of + * auth0-java so that requests are attributed to the wrapping library, with auth0-java reported as the + * underlying library in the telemetry environment. + * + *

    If not set, telemetry defaults to identifying this library as {@code auth0-java}. + * + * @param name The name of the library sending the requests (e.g. the wrapping SDK's name) + * @param version The version of the library sending the requests + * @return This builder for method chaining + */ + public ManagementApiBuilder withTelemetry(String name, String version) { + Asserts.assertNotNull(name, "name"); + this.telemetry = + new Telemetry(name, version, Telemetry.class.getPackage().getImplementationVersion()); + return this; + } + protected ClientOptions buildClientOptions() { ClientOptions.Builder builder = ClientOptions.builder(); setEnvironment(builder); @@ -203,6 +225,9 @@ protected ClientOptions buildClientOptions() { builder.addHeader(CustomDomainInterceptor.HEADER_NAME, this.customDomain); builder.addInterceptor(new CustomDomainInterceptor()); } + if (this.telemetry != null) { + builder.telemetry(this.telemetry); + } setAdditional(builder); return builder.build(); } diff --git a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java index 21d5b75e..b758cd9c 100644 --- a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java @@ -8,18 +8,22 @@ import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.ClientGrantsClient; +import com.auth0.client.mgmt.organizations.ClientsClient; import com.auth0.client.mgmt.organizations.ConnectionsClient; import com.auth0.client.mgmt.organizations.DiscoveryDomainsClient; import com.auth0.client.mgmt.organizations.EnabledConnectionsClient; import com.auth0.client.mgmt.organizations.GroupsClient; import com.auth0.client.mgmt.organizations.InvitationsClient; import com.auth0.client.mgmt.organizations.MembersClient; +import com.auth0.client.mgmt.organizations.roles.RolesClient; import com.auth0.client.mgmt.types.CreateOrganizationRequestContent; import com.auth0.client.mgmt.types.CreateOrganizationResponseContent; import com.auth0.client.mgmt.types.GetOrganizationByNameResponseContent; import com.auth0.client.mgmt.types.GetOrganizationResponseContent; import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; import com.auth0.client.mgmt.types.Organization; +import com.auth0.client.mgmt.types.SearchOrganization; +import com.auth0.client.mgmt.types.SearchOrganizationsRequestParameters; import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; import java.util.function.Supplier; @@ -31,6 +35,8 @@ public class OrganizationsClient { protected final Supplier clientGrantsClient; + protected final Supplier clientsClient; + protected final Supplier connectionsClient; protected final Supplier discoveryDomainsClient; @@ -43,16 +49,20 @@ public class OrganizationsClient { protected final Supplier groupsClient; + protected final Supplier rolesClient; + public OrganizationsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new RawOrganizationsClient(clientOptions); this.clientGrantsClient = Suppliers.memoize(() -> new ClientGrantsClient(clientOptions)); + this.clientsClient = Suppliers.memoize(() -> new ClientsClient(clientOptions)); this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions)); this.discoveryDomainsClient = Suppliers.memoize(() -> new DiscoveryDomainsClient(clientOptions)); this.enabledConnectionsClient = Suppliers.memoize(() -> new EnabledConnectionsClient(clientOptions)); this.invitationsClient = Suppliers.memoize(() -> new InvitationsClient(clientOptions)); this.membersClient = Suppliers.memoize(() -> new MembersClient(clientOptions)); this.groupsClient = Suppliers.memoize(() -> new GroupsClient(clientOptions)); + this.rolesClient = Suppliers.memoize(() -> new RolesClient(clientOptions)); } /** @@ -172,6 +182,79 @@ public GetOrganizationByNameResponseContent getByName(String name, RequestOption return this.rawClient.getByName(name, requestOptions).body(); } + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *

      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public SyncPagingIterable search() { + return this.rawClient.search().body(); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public SyncPagingIterable search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).body(); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public SyncPagingIterable search(SearchOrganizationsRequestParameters request) { + return this.rawClient.search(request).body(); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public SyncPagingIterable search( + SearchOrganizationsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).body(); + } + /** * Retrieve details about a single Organization specified by ID. */ @@ -235,6 +318,10 @@ public ClientGrantsClient clientGrants() { return this.clientGrantsClient.get(); } + public ClientsClient clients() { + return this.clientsClient.get(); + } + public ConnectionsClient connections() { return this.connectionsClient.get(); } @@ -258,4 +345,8 @@ public MembersClient members() { public GroupsClient groups() { return this.groupsClient.get(); } + + public RolesClient roles() { + return this.rolesClient.get(); + } } diff --git a/src/main/java/com/auth0/client/mgmt/PortalsClient.java b/src/main/java/com/auth0/client/mgmt/PortalsClient.java new file mode 100644 index 00000000..878b2d3d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/PortalsClient.java @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.types.CreatePortalRequestContent; +import com.auth0.client.mgmt.types.ListPortalsResponseContent; +import com.auth0.client.mgmt.types.Portal; +import com.auth0.client.mgmt.types.UpdatePortalRequestContent; + +public class PortalsClient { + protected final ClientOptions clientOptions; + + private final RawPortalsClient rawClient; + + public PortalsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawPortalsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawPortalsClient withRawResponse() { + return this.rawClient; + } + + public ListPortalsResponseContent list() { + return this.rawClient.list().body(); + } + + public ListPortalsResponseContent list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + public Portal create(CreatePortalRequestContent request) { + return this.rawClient.create(request).body(); + } + + public Portal create(CreatePortalRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + public Portal get(String id) { + return this.rawClient.get(id).body(); + } + + public Portal get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).body(); + } + + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } + + public Portal update(String id) { + return this.rawClient.update(id).body(); + } + + public Portal update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).body(); + } + + public Portal update(String id, UpdatePortalRequestContent request) { + return this.rawClient.update(id, request).body(); + } + + public Portal update(String id, UpdatePortalRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/RawActionsClient.java b/src/main/java/com/auth0/client/mgmt/RawActionsClient.java index 129ef118..a3594fc5 100644 --- a/src/main/java/com/auth0/client/mgmt/RawActionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawActionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -111,6 +112,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -151,6 +161,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -194,6 +206,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -223,6 +244,8 @@ public ManagementApiHttpResponse create( 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); } @@ -258,6 +281,15 @@ public ManagementApiHttpResponse get(String id, Reques 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() : "{}"; @@ -290,6 +322,8 @@ public ManagementApiHttpResponse get(String id, Reques 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); } @@ -344,6 +378,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -374,6 +417,8 @@ public ManagementApiHttpResponse delete( 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); } @@ -433,6 +478,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -465,6 +519,8 @@ public ManagementApiHttpResponse update( 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); } @@ -501,6 +557,15 @@ public ManagementApiHttpResponse deploy(String id, 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() : "{}"; @@ -530,6 +595,8 @@ public ManagementApiHttpResponse deploy(String id, 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); } @@ -575,6 +642,15 @@ public ManagementApiHttpResponse test( 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() : "{}"; @@ -604,6 +680,8 @@ public ManagementApiHttpResponse test( 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/RawAgentsClient.java b/src/main/java/com/auth0/client/mgmt/RawAgentsClient.java new file mode 100644 index 00000000..f6db6d9a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/RawAgentsClient.java @@ -0,0 +1,483 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.AgentResponseContent; +import com.auth0.client.mgmt.types.CreateAgentRequestContent; +import com.auth0.client.mgmt.types.ListAgentsRequestParameters; +import com.auth0.client.mgmt.types.ListAgentsResponseContent; +import com.auth0.client.mgmt.types.PatchAgentRequestParameters; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawAgentsClient { + protected final ClientOptions clientOptions; + + public RawAgentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Get agents + */ + public ManagementApiHttpResponse> list() { + return list(ListAgentsRequestParameters.builder().build()); + } + + /** + * Get agents + */ + public ManagementApiHttpResponse> list(RequestOptions requestOptions) { + return list(ListAgentsRequestParameters.builder().build(), requestOptions); + } + + /** + * Get agents + */ + public ManagementApiHttpResponse> list( + ListAgentsRequestParameters request) { + return list(request, null); + } + + /** + * Get agents + */ + public ManagementApiHttpResponse> list( + ListAgentsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListAgentsResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListAgentsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListAgentsRequestParameters nextRequest = ListAgentsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getAgents(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Create an agent + */ + public ManagementApiHttpResponse create(CreateAgentRequestContent request) { + return create(request, null); + } + + /** + * Create an agent + */ + public ManagementApiHttpResponse create( + CreateAgentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents"); + 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, AgentResponseContent.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); + } + } + + /** + * Get an agent + */ + public ManagementApiHttpResponse read(String id) { + return read(id, null); + } + + /** + * Get an agent + */ + public ManagementApiHttpResponse read(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents") + .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, AgentResponseContent.class), response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Delete an agent + */ + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + /** + * Delete an agent + */ + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Update an agent + */ + public ManagementApiHttpResponse update(String id) { + return update(id, PatchAgentRequestParameters.builder().build()); + } + + /** + * Update an agent + */ + public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { + return update(id, PatchAgentRequestParameters.builder().build(), requestOptions); + } + + /** + * Update an agent + */ + public ManagementApiHttpResponse update(String id, PatchAgentRequestParameters request) { + return update(id, request, null); + } + + /** + * Update an agent + */ + public ManagementApiHttpResponse update( + String id, PatchAgentRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("agents") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentResponseContent.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/RawBrandingClient.java b/src/main/java/com/auth0/client/mgmt/RawBrandingClient.java index ecba10b1..e775ef15 100644 --- a/src/main/java/com/auth0/client/mgmt/RawBrandingClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawBrandingClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -63,6 +64,15 @@ public ManagementApiHttpResponse get(RequestOptions 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() : "{}"; @@ -89,6 +99,8 @@ public ManagementApiHttpResponse get(RequestOptions 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); } @@ -146,6 +158,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -175,6 +196,8 @@ public ManagementApiHttpResponse update( 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/RawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java index f49048a0..644bc85d 100644 --- a/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java @@ -11,10 +11,13 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; +import com.auth0.client.mgmt.errors.InternalServerError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -24,6 +27,8 @@ import com.auth0.client.mgmt.types.GetClientGrantResponseContent; import com.auth0.client.mgmt.types.ListClientGrantPaginatedResponseContent; import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsResponseContent; import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -77,6 +82,8 @@ public ManagementApiHttpResponse> HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("client-grants"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -120,6 +127,15 @@ public ManagementApiHttpResponse> 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() : "{}"; @@ -158,6 +174,8 @@ public ManagementApiHttpResponse> 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); } @@ -201,6 +219,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -236,6 +263,147 @@ public ManagementApiHttpResponse create( 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); + } + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public ManagementApiHttpResponse> search() { + return search(SearchClientGrantsRequestParameters.builder().build()); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public ManagementApiHttpResponse> search( + RequestOptions requestOptions) { + return search(SearchClientGrantsRequestParameters.builder().build(), requestOptions); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public ManagementApiHttpResponse> search( + SearchClientGrantsRequestParameters request) { + return search(request, null); + } + + /** + * Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + */ + public ManagementApiHttpResponse> search( + SearchClientGrantsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-grants/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + if (!request.getIncludeFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchClientGrantsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchClientGrantsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchClientGrantsRequestParameters nextRequest = SearchClientGrantsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClientGrants(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> search( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); + case 500: + throw new InternalServerError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 504: + throw new GatewayTimeoutError( + 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); } @@ -273,6 +441,15 @@ public ManagementApiHttpResponse get(String id, R 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() : "{}"; @@ -302,6 +479,8 @@ public ManagementApiHttpResponse get(String id, R 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); } @@ -337,6 +516,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -364,6 +552,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -424,6 +614,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -456,6 +655,8 @@ public ManagementApiHttpResponse update( 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/RawClientProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawClientProfilesClient.java new file mode 100644 index 00000000..fca37e57 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/RawClientProfilesClient.java @@ -0,0 +1,486 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.ClientProfile; +import com.auth0.client.mgmt.types.CreateClientProfileRequestContent; +import com.auth0.client.mgmt.types.ListClientProfilesPaginatedResponseContent; +import com.auth0.client.mgmt.types.ListClientProfilesRequestParameters; +import com.auth0.client.mgmt.types.UpdateClientProfileRequestContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawClientProfilesClient { + protected final ClientOptions clientOptions; + + public RawClientProfilesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public ManagementApiHttpResponse> list() { + return list(ListClientProfilesRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public ManagementApiHttpResponse> list(RequestOptions requestOptions) { + return list(ListClientProfilesRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public ManagementApiHttpResponse> list( + ListClientProfilesRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the next cursor from a previous response as the from query parameter to retrieve the following page. + */ + public ManagementApiHttpResponse> list( + ListClientProfilesRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListClientProfilesPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListClientProfilesPaginatedResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListClientProfilesRequestParameters nextRequest = ListClientProfilesRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClientProfiles(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public ManagementApiHttpResponse create(CreateClientProfileRequestContent request) { + return create(request, null); + } + + /** + * Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns 409 Conflict. The profile governs Dynamic CIMD clients matched by its apply_policy at runtime. + */ + public ManagementApiHttpResponse create( + CreateClientProfileRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles"); + 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, ClientProfile.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 single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public ManagementApiHttpResponse get(String id) { + return get(id, null); + } + + /** + * Retrieve a single client profile by its identifier. Returns 404 if no profile with the given ID exists for the tenant. + */ + public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles") + .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, ClientProfile.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); + } + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + /** + * Delete a client profile. Idempotent: returns 204 No Content whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately. + */ + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ManagementApiHttpResponse update(String id) { + return update(id, UpdateClientProfileRequestContent.builder().build()); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { + return update(id, UpdateClientProfileRequestContent.builder().build(), requestOptions); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ManagementApiHttpResponse update(String id, UpdateClientProfileRequestContent request) { + return update(id, request, null); + } + + /** + * Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as client_configuration must be supplied in full. + */ + public ManagementApiHttpResponse update( + String id, UpdateClientProfileRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("client-profiles") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ClientProfile.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/RawClientsClient.java b/src/main/java/com/auth0/client/mgmt/RawClientsClient.java index 57166ae3..322d539c 100644 --- a/src/main/java/com/auth0/client/mgmt/RawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawClientsClient.java @@ -11,15 +11,18 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; import com.auth0.client.mgmt.errors.InternalServerError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.types.Client; +import com.auth0.client.mgmt.types.ClientSearchResponse; import com.auth0.client.mgmt.types.CreateClientRequestContent; import com.auth0.client.mgmt.types.CreateClientResponseContent; import com.auth0.client.mgmt.types.GetClientRequestParameters; @@ -31,12 +34,15 @@ import com.auth0.client.mgmt.types.RegisterCimdClientRequestContent; import com.auth0.client.mgmt.types.RegisterCimdClientResponseContent; import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; +import com.auth0.client.mgmt.types.SearchClientsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientsResponseContent; import com.auth0.client.mgmt.types.UpdateClientRequestContent; import com.auth0.client.mgmt.types.UpdateClientResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -66,7 +72,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, @@ -98,7 +104,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, @@ -130,7 +136,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, @@ -162,7 +168,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, @@ -210,6 +216,10 @@ public ManagementApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "external_client_id", request.getExternalClientId().orElse(null), false); } + if (!request.getAgentId().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "agent_id", request.getAgentId().orElse(null), false); + } if (!request.getQ().isAbsent()) { QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); } @@ -228,6 +238,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -268,6 +287,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -337,6 +358,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -372,6 +402,8 @@ public ManagementApiHttpResponse create( 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); } @@ -420,6 +452,15 @@ public ManagementApiHttpResponse previewCimd 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() : "{}"; @@ -453,6 +494,8 @@ public ManagementApiHttpResponse previewCimd 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); } @@ -517,6 +560,15 @@ public ManagementApiHttpResponse registerCimd 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() : "{}"; @@ -537,12 +589,209 @@ public ManagementApiHttpResponse registerCimd 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); + case 500: + throw new InternalServerError( + 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); + } + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public ManagementApiHttpResponse> search() { + return search(SearchClientsRequestParameters.builder().build()); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public ManagementApiHttpResponse> search(RequestOptions requestOptions) { + return search(SearchClientsRequestParameters.builder().build(), requestOptions); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public ManagementApiHttpResponse> search( + SearchClientsRequestParameters request) { + return search(request, null); + } + + /** + * Search clients using SCIM or Lucene filter syntax with low-latency, eventually consistent results. + * Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). + * This endpoint provides an alternative to the standard GET /clients endpoint with better performance + * for complex queries. Results may not reflect recent updates immediately. + *
      + *
    • This endpoint only supports read:clients and read:client_summary scopes. The read:client_keys and read:client_credentials scopes are not supported.
    • + *
    • The following fields are never returned by this endpoint: + *
        + *
      • client_secret
      • + *
      • encryption_key
      • + *
      • signing_keys
      • + *
      • owners
      • + *
      • addons
      • + *
      + *
    • + *
    + */ + public ManagementApiHttpResponse> search( + SearchClientsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("clients/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + if (!request.getIncludeFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchClientsResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, SearchClientsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchClientsRequestParameters nextRequest = SearchClientsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClients(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> search( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); case 500: throw new InternalServerError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 504: + throw new GatewayTimeoutError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); } } catch (JsonProcessingException ignored) { // unable to map error response, throwing generic error @@ -550,6 +799,8 @@ public ManagementApiHttpResponse registerCimd 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); } @@ -569,7 +820,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, @@ -600,7 +851,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, @@ -631,7 +882,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, @@ -662,7 +913,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, @@ -704,6 +955,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -736,6 +996,8 @@ public ManagementApiHttpResponse get( 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); } @@ -771,6 +1033,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -798,6 +1069,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -893,6 +1166,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -925,6 +1207,8 @@ public ManagementApiHttpResponse update( 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); } @@ -966,6 +1250,15 @@ public ManagementApiHttpResponse rotateSecret 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() : "{}"; @@ -999,6 +1292,8 @@ public ManagementApiHttpResponse rotateSecret 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/RawConnectionProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawConnectionProfilesClient.java index ccc09694..a83cd770 100644 --- a/src/main/java/com/auth0/client/mgmt/RawConnectionProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawConnectionProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -98,6 +99,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -139,6 +149,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -183,6 +195,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -216,6 +237,8 @@ public ManagementApiHttpResponse create( 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); } @@ -251,6 +274,15 @@ public ManagementApiHttpResponse l 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() : "{}"; @@ -278,6 +310,8 @@ public ManagementApiHttpResponse l 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); } @@ -314,6 +348,15 @@ public ManagementApiHttpResponse ge 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() : "{}"; @@ -344,6 +387,8 @@ public ManagementApiHttpResponse ge 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); } @@ -380,6 +425,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -410,6 +464,8 @@ public ManagementApiHttpResponse get( 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); } @@ -445,6 +501,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -469,6 +534,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -529,6 +596,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -562,6 +638,8 @@ public ManagementApiHttpResponse update( 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/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java index 2b70a36d..c5ddbd6d 100644 --- a/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -18,6 +19,7 @@ import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.errors.UnprocessableEntityError; import com.auth0.client.mgmt.types.ConnectionForList; import com.auth0.client.mgmt.types.CreateConnectionRequestContent; import com.auth0.client.mgmt.types.CreateConnectionResponseContent; @@ -129,6 +131,8 @@ public ManagementApiHttpResponse> list( HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("connections"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -165,6 +169,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -205,6 +218,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -250,6 +265,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -272,6 +296,9 @@ public ManagementApiHttpResponse create( case 409: throw new ConflictError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 422: + throw new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -282,6 +309,8 @@ public ManagementApiHttpResponse create( 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); } @@ -341,6 +370,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -373,6 +411,8 @@ public ManagementApiHttpResponse get( 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); } @@ -410,6 +450,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -437,6 +486,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -444,7 +495,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()); @@ -452,7 +503,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); @@ -460,7 +511,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) { @@ -469,7 +520,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) { @@ -500,6 +551,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -525,6 +585,9 @@ public ManagementApiHttpResponse update( case 409: throw new ConflictError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 422: + throw new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 429: throw new TooManyRequestsError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -535,6 +598,8 @@ public ManagementApiHttpResponse update( 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); } @@ -571,6 +636,15 @@ public ManagementApiHttpResponse checkStatus(String id, RequestOptions req if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -601,6 +675,8 @@ public ManagementApiHttpResponse checkStatus(String id, RequestOptions req 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/RawCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java index d2da627b..cf8dbf88 100644 --- a/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -107,6 +108,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -134,6 +144,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -200,6 +212,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -233,6 +254,8 @@ public ManagementApiHttpResponse create( 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); } @@ -267,6 +290,15 @@ public ManagementApiHttpResponse getDefault(Req 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() : "{}"; @@ -293,6 +325,8 @@ public ManagementApiHttpResponse getDefault(Req 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); } @@ -337,6 +371,15 @@ public ManagementApiHttpResponse setDefault( 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() : "{}"; @@ -361,6 +404,8 @@ public ManagementApiHttpResponse setDefault( 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); } @@ -396,6 +441,15 @@ public ManagementApiHttpResponse get(String id, 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() : "{}"; @@ -428,6 +482,8 @@ public ManagementApiHttpResponse get(String id, 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); } @@ -463,6 +519,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -493,6 +558,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -645,6 +712,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -675,6 +751,8 @@ public ManagementApiHttpResponse update( 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); } @@ -711,6 +789,15 @@ public ManagementApiHttpResponse test(String id 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() : "{}"; @@ -743,6 +830,8 @@ public ManagementApiHttpResponse test(String id 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); } @@ -788,6 +877,15 @@ public ManagementApiHttpResponse verify( 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() : "{}"; @@ -821,6 +919,8 @@ public ManagementApiHttpResponse verify( 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/RawDeviceCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/RawDeviceCredentialsClient.java index 0c09b3c5..8c661033 100644 --- a/src/main/java/com/auth0/client/mgmt/RawDeviceCredentialsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawDeviceCredentialsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -111,6 +112,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -153,6 +163,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -199,6 +211,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -232,6 +253,8 @@ public ManagementApiHttpResponse 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); } @@ -267,6 +290,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -294,6 +326,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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/RawEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java index 28517957..4b0dead3 100644 --- a/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java @@ -10,6 +10,7 @@ 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; @@ -80,6 +81,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -113,6 +123,8 @@ public ManagementApiHttpResponse create( 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); } @@ -149,6 +161,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -178,6 +199,8 @@ public ManagementApiHttpResponse get( 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); } @@ -223,6 +246,15 @@ public ManagementApiHttpResponse set( 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() : "{}"; @@ -255,6 +287,8 @@ public ManagementApiHttpResponse set( 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); } @@ -317,6 +351,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -350,6 +393,8 @@ public ManagementApiHttpResponse update( 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/RawEventStreamsClient.java b/src/main/java/com/auth0/client/mgmt/RawEventStreamsClient.java index 2b3c0ddb..175b774b 100644 --- a/src/main/java/com/auth0/client/mgmt/RawEventStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawEventStreamsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -87,6 +88,15 @@ public ManagementApiHttpResponse> 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() : "{}"; @@ -128,6 +138,8 @@ public ManagementApiHttpResponse> 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); } @@ -165,6 +177,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -197,6 +218,8 @@ public ManagementApiHttpResponse create( 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); } @@ -226,6 +249,15 @@ public ManagementApiHttpResponse get(String id, R 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() : "{}"; @@ -255,6 +287,8 @@ public ManagementApiHttpResponse get(String id, R 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); } @@ -284,6 +318,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -311,6 +354,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -359,6 +404,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -388,6 +442,8 @@ public ManagementApiHttpResponse update( 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); } @@ -428,6 +484,15 @@ public ManagementApiHttpResponse test 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() : "{}"; @@ -455,6 +520,8 @@ public ManagementApiHttpResponse test 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/RawEventsClient.java b/src/main/java/com/auth0/client/mgmt/RawEventsClient.java index 63ec6d1d..f40a3dd0 100644 --- a/src/main/java/com/auth0/client/mgmt/RawEventsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawEventsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.ResponseBodyReader; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.Stream; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -94,14 +95,25 @@ public ManagementApiHttpResponse( - Stream.fromSse( - EventStreamSubscribeEventsResponseContent.class, new ResponseBodyReader(response)), + Stream.fromSseWithEventDiscrimination( + EventStreamSubscribeEventsResponseContent.class, + new ResponseBodyReader(response), + "type"), response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -132,6 +144,8 @@ EventStreamSubscribeEventsResponseContent.class, new ResponseBodyReader(response 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/RawFlowsClient.java b/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java index 4ec62d73..7c4c0671 100644 --- a/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java @@ -11,8 +11,10 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -90,6 +92,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -130,6 +141,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -167,6 +180,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -196,6 +218,8 @@ public ManagementApiHttpResponse create( 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); } @@ -238,6 +262,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -270,6 +303,8 @@ public ManagementApiHttpResponse get( 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); } @@ -299,6 +334,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -319,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); @@ -329,6 +376,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -375,6 +424,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -385,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); @@ -404,6 +465,8 @@ public ManagementApiHttpResponse update( 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/RawFormsClient.java b/src/main/java/com/auth0/client/mgmt/RawFormsClient.java index c3c05bbc..0ab1c454 100644 --- a/src/main/java/com/auth0/client/mgmt/RawFormsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawFormsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -86,6 +87,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -126,6 +136,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -163,6 +175,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -192,6 +213,8 @@ public ManagementApiHttpResponse create( 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); } @@ -234,6 +257,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -266,6 +298,8 @@ public ManagementApiHttpResponse get( 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); } @@ -295,6 +329,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -322,6 +365,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -368,6 +413,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -378,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); @@ -394,6 +454,8 @@ public ManagementApiHttpResponse update( 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/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java index ecaac54a..02566f9c 100644 --- a/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -91,6 +92,8 @@ public ManagementApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); } + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -111,6 +114,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -150,6 +162,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -185,6 +199,15 @@ public ManagementApiHttpResponse get(String id, Request 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() : "{}"; @@ -217,6 +240,8 @@ public ManagementApiHttpResponse get(String id, Request 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); } @@ -252,6 +277,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -279,6 +313,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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/users/RawFederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/RawGuardianClient.java similarity index 63% rename from src/main/java/com/auth0/client/mgmt/users/RawFederatedConnectionsTokensetsClient.java rename to src/main/java/com/auth0/client/mgmt/RawGuardianClient.java index b74867d4..264efdbb 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawFederatedConnectionsTokensetsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawGuardianClient.java @@ -1,54 +1,54 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.auth0.client.mgmt.users; +package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.ManagementApiException; import com.auth0.client.mgmt.core.ManagementApiHttpResponse; import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.FederatedConnectionTokenSet; +import com.auth0.client.mgmt.types.GetGuardianSettingsResponseContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsRequestContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; -import java.util.List; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; +import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; -public class RawFederatedConnectionsTokensetsClient { +public class RawGuardianClient { protected final ClientOptions clientOptions; - public RawFederatedConnectionsTokensetsClient(ClientOptions clientOptions) { + public RawGuardianClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } /** - * List active federated connections tokensets for a provided user + * TODO: Link this endpoint to relevant documentation when available. */ - public ManagementApiHttpResponse> list(String id) { - return list(id, null); + public ManagementApiHttpResponse get() { + return get(null); } /** - * List active federated connections tokensets for a provided user + * TODO: Link this endpoint to relevant documentation when available. */ - public ManagementApiHttpResponse> list(String id, RequestOptions requestOptions) { + public ManagementApiHttpResponse get(RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets"); + .addPathSegments("guardian/settings"); if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -64,13 +64,22 @@ public ManagementApiHttpResponse> list(String 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, new TypeReference>() {}), + responseBodyString, GetGuardianSettingsResponseContent.class), response); } try { @@ -81,9 +90,6 @@ public ManagementApiHttpResponse> list(String 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); @@ -94,43 +100,70 @@ public ManagementApiHttpResponse> list(String 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); } } - public ManagementApiHttpResponse delete(String id, String tokensetId) { - return delete(id, tokensetId, null); + /** + * Update a tenant's guardian settings such as Remember Me + */ + public ManagementApiHttpResponse set( + SetGuardianSettingsRequestContent request) { + return set(request, null); } - public ManagementApiHttpResponse delete(String id, String tokensetId, RequestOptions requestOptions) { + /** + * Update a tenant's guardian settings such as Remember Me + */ + public ManagementApiHttpResponse set( + SetGuardianSettingsRequestContent request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets") - .addPathSegment(tokensetId); + .addPathSegments("guardian/settings"); 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("DELETE", null) + .method("PUT", 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<>(null, response); + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SetGuardianSettingsResponseContent.class), + response); } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; try { switch (response.code()) { case 400: @@ -152,6 +185,8 @@ public ManagementApiHttpResponse delete(String id, String tokensetId, Requ 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/RawHooksClient.java b/src/main/java/com/auth0/client/mgmt/RawHooksClient.java index 72b6530a..1b7b517c 100644 --- a/src/main/java/com/auth0/client/mgmt/RawHooksClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawHooksClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -107,6 +108,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -150,6 +160,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -193,6 +205,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -225,6 +246,8 @@ public ManagementApiHttpResponse create( 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); } @@ -279,6 +302,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -311,6 +343,8 @@ public ManagementApiHttpResponse get( 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); } @@ -346,6 +380,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -373,6 +416,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -431,6 +476,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -466,6 +520,8 @@ public ManagementApiHttpResponse update( 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/RawJobsClient.java b/src/main/java/com/auth0/client/mgmt/RawJobsClient.java index cd2881e4..c6f8a2a6 100644 --- a/src/main/java/com/auth0/client/mgmt/RawJobsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawJobsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -61,6 +62,15 @@ public ManagementApiHttpResponse get(String id, RequestOp 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() : "{}"; @@ -92,6 +102,8 @@ public ManagementApiHttpResponse get(String id, RequestOp 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/RawLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java index 3f4e1e45..a9d57c81 100644 --- a/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java @@ -10,6 +10,7 @@ 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; @@ -204,6 +205,15 @@ public ManagementApiHttpResponse> list(RequestOpti 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() : "{}"; @@ -234,6 +244,8 @@ public ManagementApiHttpResponse> list(RequestOpti 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); } @@ -591,6 +603,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -623,6 +644,8 @@ public ManagementApiHttpResponse create( 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); } @@ -898,6 +921,15 @@ public ManagementApiHttpResponse get(String id, Req 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() : "{}"; @@ -927,6 +959,8 @@ public ManagementApiHttpResponse get(String id, Req 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); } @@ -962,6 +996,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -992,6 +1035,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -1263,6 +1308,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -1292,6 +1346,8 @@ public ManagementApiHttpResponse update( 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/RawLogsClient.java b/src/main/java/com/auth0/client/mgmt/RawLogsClient.java index 43bc0ee0..44a020ff 100644 --- a/src/main/java/com/auth0/client/mgmt/RawLogsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawLogsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -183,6 +184,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -223,6 +233,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -258,6 +270,15 @@ public ManagementApiHttpResponse get(String id, RequestOp 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() : "{}"; @@ -289,6 +310,8 @@ public ManagementApiHttpResponse get(String id, RequestOp 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/RawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/RawNetworkAclsClient.java index 92638f1d..c07135b1 100644 --- a/src/main/java/com/auth0/client/mgmt/RawNetworkAclsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawNetworkAclsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -98,6 +99,15 @@ public ManagementApiHttpResponse> 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() : "{}"; @@ -139,6 +149,8 @@ public ManagementApiHttpResponse> 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); } @@ -182,6 +194,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -215,6 +236,8 @@ public ManagementApiHttpResponse create( 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); } @@ -250,6 +273,15 @@ public ManagementApiHttpResponse get(String id, R 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() : "{}"; @@ -279,6 +311,8 @@ public ManagementApiHttpResponse get(String id, R 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); } @@ -324,6 +358,15 @@ public ManagementApiHttpResponse set( 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() : "{}"; @@ -356,6 +399,8 @@ public ManagementApiHttpResponse set( 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); } @@ -391,6 +436,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -421,6 +475,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -480,6 +536,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -512,6 +577,8 @@ public ManagementApiHttpResponse update( 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/RawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java index 89a83f9d..490b7087 100644 --- a/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java @@ -11,10 +11,12 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -25,6 +27,9 @@ import com.auth0.client.mgmt.types.ListOrganizationsPaginatedResponseContent; import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; import com.auth0.client.mgmt.types.Organization; +import com.auth0.client.mgmt.types.SearchOrganization; +import com.auth0.client.mgmt.types.SearchOrganizationsPaginatedResponseContent; +import com.auth0.client.mgmt.types.SearchOrganizationsRequestParameters; import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; @@ -129,6 +134,8 @@ public ManagementApiHttpResponse> list( HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("organizations"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -138,6 +145,13 @@ public ManagementApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "sort", request.getSort().orElse(null), false); } + if (!request.getIncludeClientAssociationFor().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_client_association_for", + request.getIncludeClientAssociationFor().orElse(null), + false); + } if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -153,6 +167,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -193,6 +216,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -237,6 +262,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -270,6 +304,8 @@ public ManagementApiHttpResponse create( 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); } @@ -306,6 +342,15 @@ public ManagementApiHttpResponse getByName 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() : "{}"; @@ -339,6 +384,172 @@ public ManagementApiHttpResponse getByName Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public ManagementApiHttpResponse> search() { + return search(SearchOrganizationsRequestParameters.builder().build()); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public ManagementApiHttpResponse> search(RequestOptions requestOptions) { + return search(SearchOrganizationsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public ManagementApiHttpResponse> search( + SearchOrganizationsRequestParameters request) { + return search(request, null); + } + + /** + * Retrieve details of organizations matching a search criteria. It is possible to: + *
      + *
    • Specify a search criteria for organizations
    • + *
    • Search via name
    • + *
    • Search via display_name
    • + *
    • Substring matching (contains and ends-with) requires at least 3 characters
    • + *
    • Use wildcards
    • + *
    + *

    The q query parameter can be used to get organizations that match the specified criteria on name OR display_name.

    + *

    This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene").

    + *

    Results are eventually consistent and may not reflect recent updates immediately.

    + *

    Sortable fields: name, display_name, created_at (ascending only). Defaults to insertion order (oldest first).

    + */ + public ManagementApiHttpResponse> search( + SearchOrganizationsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchOrganizationsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchOrganizationsPaginatedResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchOrganizationsRequestParameters nextRequest = SearchOrganizationsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getOrganizations(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> search( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 504: + throw new GatewayTimeoutError( + 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); } @@ -374,6 +585,15 @@ public ManagementApiHttpResponse get(String id, 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() : "{}"; @@ -406,6 +626,8 @@ public ManagementApiHttpResponse get(String id, 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); } @@ -443,6 +665,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -473,6 +704,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -533,6 +766,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -563,6 +805,8 @@ public ManagementApiHttpResponse update( 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/RawPortalsClient.java b/src/main/java/com/auth0/client/mgmt/RawPortalsClient.java new file mode 100644 index 00000000..6df62949 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/RawPortalsClient.java @@ -0,0 +1,437 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.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.InternalServerError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.CreatePortalRequestContent; +import com.auth0.client.mgmt.types.ListPortalsResponseContent; +import com.auth0.client.mgmt.types.Portal; +import com.auth0.client.mgmt.types.UpdatePortalRequestContent; +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 RawPortalsClient { + protected final ClientOptions clientOptions; + + public RawPortalsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public ManagementApiHttpResponse list() { + return list(null); + } + + public ManagementApiHttpResponse list(RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals"); + 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, ListPortalsResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 500: + throw new InternalServerError( + 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); + } + } + + public ManagementApiHttpResponse create(CreatePortalRequestContent request) { + return create(request, null); + } + + public ManagementApiHttpResponse create(CreatePortalRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals"); + 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, Portal.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 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); + case 500: + throw new InternalServerError( + 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); + } + } + + public ManagementApiHttpResponse get(String id) { + return get(id, null); + } + + public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals") + .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, Portal.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); + case 500: + throw new InternalServerError( + 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); + } + } + + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); + case 500: + throw new InternalServerError( + 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); + } + } + + public ManagementApiHttpResponse update(String id) { + return update(id, UpdatePortalRequestContent.builder().build()); + } + + public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { + return update(id, UpdatePortalRequestContent.builder().build(), requestOptions); + } + + public ManagementApiHttpResponse update(String id, UpdatePortalRequestContent request) { + return update(id, request, null); + } + + public ManagementApiHttpResponse update( + String id, UpdatePortalRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("portals") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Portal.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 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); + case 500: + throw new InternalServerError( + 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/RawPromptsClient.java b/src/main/java/com/auth0/client/mgmt/RawPromptsClient.java index 6313099a..d0ad4797 100644 --- a/src/main/java/com/auth0/client/mgmt/RawPromptsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawPromptsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -63,6 +64,15 @@ public ManagementApiHttpResponse getSettings(Request 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() : "{}"; @@ -89,6 +99,8 @@ public ManagementApiHttpResponse getSettings(Request 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); } @@ -147,6 +159,15 @@ public ManagementApiHttpResponse updateSettings( 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() : "{}"; @@ -176,6 +197,8 @@ public ManagementApiHttpResponse updateSettings( 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/RawRateLimitPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/RawRateLimitPoliciesClient.java index 0ba0552c..77e264c3 100644 --- a/src/main/java/com/auth0/client/mgmt/RawRateLimitPoliciesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawRateLimitPoliciesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -96,6 +97,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -137,6 +147,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -175,6 +187,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -208,6 +229,8 @@ public ManagementApiHttpResponse create( 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); } @@ -237,6 +260,15 @@ public ManagementApiHttpResponse get(String i 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() : "{}"; @@ -267,6 +299,8 @@ public ManagementApiHttpResponse get(String i 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); } @@ -296,6 +330,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -323,6 +366,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -362,6 +407,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -395,6 +449,8 @@ public ManagementApiHttpResponse update( 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/RawRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java index d0ce8164..826dc6f2 100644 --- a/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -93,6 +94,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -137,6 +147,8 @@ public ManagementApiHttpResponse 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); } @@ -194,6 +206,15 @@ public ManagementApiHttpResponse revoke( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -221,6 +242,8 @@ public ManagementApiHttpResponse revoke( 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); } @@ -256,6 +279,15 @@ public ManagementApiHttpResponse get(String id, 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() : "{}"; @@ -288,6 +320,8 @@ public ManagementApiHttpResponse get(String id, 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); } @@ -323,6 +357,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -350,6 +393,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -410,6 +455,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -443,6 +497,8 @@ public ManagementApiHttpResponse update( 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/RawResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/RawResourceServersClient.java index 2f53ba67..82bcdfa7 100644 --- a/src/main/java/com/auth0/client/mgmt/RawResourceServersClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawResourceServersClient.java @@ -11,10 +11,13 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.GatewayTimeoutError; +import com.auth0.client.mgmt.errors.InternalServerError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -25,12 +28,16 @@ import com.auth0.client.mgmt.types.ListResourceServerOffsetPaginatedResponseContent; import com.auth0.client.mgmt.types.ListResourceServerRequestParameters; import com.auth0.client.mgmt.types.ResourceServer; +import com.auth0.client.mgmt.types.ResourceServerSearchResponse; +import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters; +import com.auth0.client.mgmt.types.SearchResourceServersResponseContent; import com.auth0.client.mgmt.types.UpdateResourceServerRequestContent; import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -104,6 +111,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -145,6 +161,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -189,6 +207,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -222,6 +249,151 @@ public ManagementApiHttpResponse create( 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); + } + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public ManagementApiHttpResponse> search() { + return search(SearchResourceServersRequestParameters.builder().build()); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public ManagementApiHttpResponse> search( + RequestOptions requestOptions) { + return search(SearchResourceServersRequestParameters.builder().build(), requestOptions); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public ManagementApiHttpResponse> search( + SearchResourceServersRequestParameters request) { + return search(request, null); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public ManagementApiHttpResponse> search( + SearchResourceServersRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("resource-servers/search"); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } + if (!request.getParser().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "parser", request.getParser().orElse(null), false); + } + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + if (!request.getIncludeFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + if (!request.getSort().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "sort", request.getSort().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + SearchResourceServersResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, SearchResourceServersResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + SearchResourceServersRequestParameters nextRequest = SearchResourceServersRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getResourceServers(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> search( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); + case 500: + throw new InternalServerError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 504: + throw new GatewayTimeoutError( + 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); } @@ -277,6 +449,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -309,6 +490,8 @@ public ManagementApiHttpResponse get( 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); } @@ -344,6 +527,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -371,6 +563,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -431,6 +625,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -464,6 +667,8 @@ public ManagementApiHttpResponse update( 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/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/RawRolesClient.java index abd6e4d3..29c1990e 100644 --- a/src/main/java/com/auth0/client/mgmt/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -46,7 +47,7 @@ public RawRolesClient(ClientOptions clientOptions) { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public ManagementApiHttpResponse> list() { @@ -54,7 +55,7 @@ public ManagementApiHttpResponse> list() { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public ManagementApiHttpResponse> list(RequestOptions requestOptions) { @@ -62,7 +63,7 @@ public ManagementApiHttpResponse> list(RequestOptions r } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public ManagementApiHttpResponse> list(ListRolesRequestParameters request) { @@ -70,7 +71,7 @@ public ManagementApiHttpResponse> list(ListRolesRequest } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public ManagementApiHttpResponse> list( @@ -87,6 +88,14 @@ public ManagementApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "name_filter", request.getNameFilter().orElse(null), false); } + if (!request.getType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "type", request.getType().orElse(null), false); + } + if (!request.getOwnerId().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "owner_id", request.getOwnerId().orElse(null), false); + } if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -102,6 +111,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -142,6 +160,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -187,6 +207,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -219,6 +248,8 @@ public ManagementApiHttpResponse create( 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); } @@ -254,6 +285,15 @@ public ManagementApiHttpResponse get(String id, RequestO 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() : "{}"; @@ -286,6 +326,8 @@ public ManagementApiHttpResponse get(String id, RequestO 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); } @@ -321,6 +363,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -351,6 +402,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -409,6 +462,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -438,6 +500,8 @@ public ManagementApiHttpResponse update( 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/RawRulesClient.java b/src/main/java/com/auth0/client/mgmt/RawRulesClient.java index 94cf975d..014e1825 100644 --- a/src/main/java/com/auth0/client/mgmt/RawRulesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawRulesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -107,6 +108,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -150,6 +160,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -195,6 +207,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -227,6 +248,8 @@ public ManagementApiHttpResponse create( 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); } @@ -285,6 +308,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -317,6 +349,8 @@ public ManagementApiHttpResponse get( 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); } @@ -352,6 +386,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -379,6 +422,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -437,6 +482,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -472,6 +526,8 @@ public ManagementApiHttpResponse update( 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/RawRulesConfigsClient.java b/src/main/java/com/auth0/client/mgmt/RawRulesConfigsClient.java index 3796bcc5..43f22d65 100644 --- a/src/main/java/com/auth0/client/mgmt/RawRulesConfigsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawRulesConfigsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -68,6 +69,15 @@ public ManagementApiHttpResponse> list(RequestOptions requestO 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() : "{}"; @@ -95,6 +105,8 @@ public ManagementApiHttpResponse> list(RequestOptions requestO 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); } @@ -140,6 +152,15 @@ public ManagementApiHttpResponse set( 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() : "{}"; @@ -166,6 +187,8 @@ public ManagementApiHttpResponse set( 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); } @@ -201,6 +224,15 @@ public ManagementApiHttpResponse delete(String key, RequestOptions request if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -225,6 +257,8 @@ public ManagementApiHttpResponse delete(String key, RequestOptions request 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/RawSelfServiceProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawSelfServiceProfilesClient.java index 42f5cb52..13e517d1 100644 --- a/src/main/java/com/auth0/client/mgmt/RawSelfServiceProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawSelfServiceProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -96,6 +97,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -138,6 +148,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -182,6 +194,15 @@ public ManagementApiHttpResponse create 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() : "{}"; @@ -218,6 +239,8 @@ public ManagementApiHttpResponse create 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); } @@ -254,6 +277,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -290,6 +322,8 @@ public ManagementApiHttpResponse get( 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); } @@ -325,6 +359,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -355,6 +398,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -415,6 +460,15 @@ public ManagementApiHttpResponse update 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() : "{}"; @@ -451,6 +505,8 @@ public ManagementApiHttpResponse update 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/RawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/RawSessionsClient.java index 24d00366..20439bb5 100644 --- a/src/main/java/com/auth0/client/mgmt/RawSessionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawSessionsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -65,6 +66,15 @@ public ManagementApiHttpResponse get(String id, Reque 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() : "{}"; @@ -94,6 +104,8 @@ public ManagementApiHttpResponse get(String id, Reque 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); } @@ -129,6 +141,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -156,6 +177,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -215,6 +238,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -247,6 +279,8 @@ public ManagementApiHttpResponse update( 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); } @@ -283,6 +317,15 @@ public ManagementApiHttpResponse revoke(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -313,6 +356,8 @@ public ManagementApiHttpResponse revoke(String id, RequestOptions requestO 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/RawStatsClient.java b/src/main/java/com/auth0/client/mgmt/RawStatsClient.java index f218abd2..9c86a3d4 100644 --- a/src/main/java/com/auth0/client/mgmt/RawStatsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawStatsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -63,6 +64,15 @@ public ManagementApiHttpResponse getActiveUsersCount(RequestOptions requ 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() : "{}"; @@ -88,6 +98,8 @@ public ManagementApiHttpResponse getActiveUsersCount(RequestOptions requ 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); } @@ -144,6 +156,15 @@ public ManagementApiHttpResponse> getDaily( 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() : "{}"; @@ -174,6 +195,8 @@ public ManagementApiHttpResponse> getDaily( 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/RawSupplementalSignalsClient.java b/src/main/java/com/auth0/client/mgmt/RawSupplementalSignalsClient.java index 790db11a..2420a306 100644 --- a/src/main/java/com/auth0/client/mgmt/RawSupplementalSignalsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawSupplementalSignalsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -63,6 +64,15 @@ public ManagementApiHttpResponse get(Requ 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() : "{}"; @@ -93,6 +103,8 @@ public ManagementApiHttpResponse get(Requ 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); } @@ -137,6 +149,15 @@ public ManagementApiHttpResponse patch( 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() : "{}"; @@ -167,6 +188,8 @@ public ManagementApiHttpResponse patch( 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/RawTicketsClient.java b/src/main/java/com/auth0/client/mgmt/RawTicketsClient.java index c8455c63..98f953f8 100644 --- a/src/main/java/com/auth0/client/mgmt/RawTicketsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawTicketsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -75,6 +76,15 @@ public ManagementApiHttpResponse verifyEmail( 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() : "{}"; @@ -107,6 +117,8 @@ public ManagementApiHttpResponse verifyEmail( 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); } @@ -170,6 +182,15 @@ public ManagementApiHttpResponse changePass 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() : "{}"; @@ -203,6 +224,8 @@ public ManagementApiHttpResponse changePass 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/RawTokenExchangeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawTokenExchangeProfilesClient.java index d3cbd646..88165e29 100644 --- a/src/main/java/com/auth0/client/mgmt/RawTokenExchangeProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawTokenExchangeProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -124,6 +125,15 @@ public ManagementApiHttpResponse crea 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() : "{}"; @@ -244,6 +265,8 @@ public ManagementApiHttpResponse crea 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); } @@ -282,6 +305,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -315,6 +347,8 @@ public ManagementApiHttpResponse get( 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); } @@ -352,6 +386,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -376,6 +419,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -438,6 +483,15 @@ public ManagementApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -471,6 +525,8 @@ public ManagementApiHttpResponse update( 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/RawUserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java index 5a9848c8..20da040e 100644 --- a/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -98,6 +99,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -140,6 +150,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -184,6 +196,15 @@ public ManagementApiHttpResponse crea 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() : "{}"; @@ -217,6 +238,8 @@ public ManagementApiHttpResponse crea 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); } @@ -252,6 +275,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -345,6 +388,8 @@ public ManagementApiHttpResponse 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); } @@ -381,6 +426,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -411,6 +465,8 @@ public ManagementApiHttpResponse get( 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); } @@ -446,6 +502,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -470,6 +535,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -530,6 +597,15 @@ public ManagementApiHttpResponse upda 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() : "{}"; @@ -563,6 +639,8 @@ public ManagementApiHttpResponse upda 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/RawUserBlocksClient.java b/src/main/java/com/auth0/client/mgmt/RawUserBlocksClient.java index 51ede97e..7f57c7b5 100644 --- a/src/main/java/com/auth0/client/mgmt/RawUserBlocksClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawUserBlocksClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -75,6 +76,15 @@ public ManagementApiHttpResponse list 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() : "{}"; @@ -105,6 +115,8 @@ public ManagementApiHttpResponse list 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); } @@ -143,6 +155,15 @@ public ManagementApiHttpResponse deleteByIdentifier( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -170,6 +191,8 @@ public ManagementApiHttpResponse deleteByIdentifier( 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); } @@ -228,6 +251,15 @@ public ManagementApiHttpResponse list( 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() : "{}"; @@ -260,6 +292,8 @@ public ManagementApiHttpResponse list( 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); } @@ -297,6 +331,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -327,6 +370,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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/RawUserGrantsClient.java b/src/main/java/com/auth0/client/mgmt/RawUserGrantsClient.java index 9388cba8..a226a687 100644 --- a/src/main/java/com/auth0/client/mgmt/RawUserGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawUserGrantsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -97,6 +98,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -134,6 +144,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -170,6 +182,15 @@ public ManagementApiHttpResponse deleteByUserId( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -194,6 +215,8 @@ public ManagementApiHttpResponse deleteByUserId( 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); } @@ -229,6 +252,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -253,6 +285,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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/RawUsersClient.java b/src/main/java/com/auth0/client/mgmt/RawUsersClient.java index 7e986d6b..75394404 100644 --- a/src/main/java/com/auth0/client/mgmt/RawUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/RawUsersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -19,10 +20,12 @@ import com.auth0.client.mgmt.errors.ServiceUnavailableError; import com.auth0.client.mgmt.errors.TooManyRequestsError; import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.types.ConsentSigningKey; import com.auth0.client.mgmt.types.CreateUserRequestContent; import com.auth0.client.mgmt.types.CreateUserResponseContent; import com.auth0.client.mgmt.types.GetUserRequestParameters; import com.auth0.client.mgmt.types.GetUserResponseContent; +import com.auth0.client.mgmt.types.ListUserConsentSigningKeysResponseContent; import com.auth0.client.mgmt.types.ListUsersByEmailRequestParameters; import com.auth0.client.mgmt.types.ListUsersOffsetPaginatedResponseContent; import com.auth0.client.mgmt.types.ListUsersRequestParameters; @@ -52,68 +55,84 @@ public RawUsersClient(ClientOptions clientOptions) { } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public ManagementApiHttpResponse> list() { return list(ListUsersRequestParameters.builder().build()); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public ManagementApiHttpResponse> list(RequestOptions requestOptions) { return list(ListUsersRequestParameters.builder().build(), requestOptions); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public ManagementApiHttpResponse> list(ListUsersRequestParameters request) { return list(request, null); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public ManagementApiHttpResponse> list( ListUsersRequestParameters request, RequestOptions requestOptions) { @@ -167,6 +186,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -210,6 +238,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -255,6 +285,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -287,6 +326,8 @@ public ManagementApiHttpResponse create( 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); } @@ -336,6 +377,15 @@ public ManagementApiHttpResponse> listUsersByEmail( 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() : "{}"; @@ -366,6 +416,8 @@ public ManagementApiHttpResponse> listUsersByEmail( 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); } @@ -424,6 +476,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -456,6 +517,8 @@ public ManagementApiHttpResponse get( 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); } @@ -491,6 +554,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -518,6 +590,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -852,6 +926,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -884,6 +967,242 @@ public ManagementApiHttpResponse update( 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 all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public ManagementApiHttpResponse listConsentSigningKeys(String id) { + return listConsentSigningKeys(id, null); + } + + /** + * Retrieve all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public ManagementApiHttpResponse listConsentSigningKeys( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("users") + .addPathSegment(id) + .addPathSegments("consent-signing-keys"); + 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, ListUserConsentSigningKeysResponseContent.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 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 single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public ManagementApiHttpResponse getConsentSigningKey(String id, String kid) { + return getConsentSigningKey(id, kid, null); + } + + /** + * Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public ManagementApiHttpResponse getConsentSigningKey( + String id, String kid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("users") + .addPathSegment(id) + .addPathSegments("consent-signing-keys") + .addPathSegment(kid); + 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, ConsentSigningKey.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); + } + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public ManagementApiHttpResponse deleteConsentSigningKey(String id, String kid) { + return deleteConsentSigningKey(id, kid, null); + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public ManagementApiHttpResponse deleteConsentSigningKey( + String id, String kid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("users") + .addPathSegment(id) + .addPathSegments("consent-signing-keys") + .addPathSegment(kid); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } @@ -921,6 +1240,15 @@ public ManagementApiHttpResponse reg 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() : "{}"; @@ -951,6 +1279,8 @@ public ManagementApiHttpResponse reg 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); } @@ -1010,6 +1340,15 @@ public ManagementApiHttpResponse revokeAccess( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -1037,6 +1376,8 @@ public ManagementApiHttpResponse revokeAccess( 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/ResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/ResourceServersClient.java index 34716dcf..38b31ee1 100644 --- a/src/main/java/com/auth0/client/mgmt/ResourceServersClient.java +++ b/src/main/java/com/auth0/client/mgmt/ResourceServersClient.java @@ -12,6 +12,8 @@ import com.auth0.client.mgmt.types.GetResourceServerResponseContent; import com.auth0.client.mgmt.types.ListResourceServerRequestParameters; import com.auth0.client.mgmt.types.ResourceServer; +import com.auth0.client.mgmt.types.ResourceServerSearchResponse; +import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters; import com.auth0.client.mgmt.types.UpdateResourceServerRequestContent; import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; @@ -76,6 +78,43 @@ public CreateResourceServerResponseContent create( return this.rawClient.create(request, requestOptions).body(); } + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public SyncPagingIterable search() { + return this.rawClient.search().body(); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public SyncPagingIterable search(RequestOptions requestOptions) { + return this.rawClient.search(requestOptions).body(); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public SyncPagingIterable search(SearchResourceServersRequestParameters request) { + return this.rawClient.search(request).body(); + } + + /** + * Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + * Results may not reflect recent updates immediately. + *

    The signing_secret field is not supported by this endpoint.

    + */ + public SyncPagingIterable search( + SearchResourceServersRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.search(request, requestOptions).body(); + } + /** * Retrieve API details with the given ID. */ diff --git a/src/main/java/com/auth0/client/mgmt/RolesClient.java b/src/main/java/com/auth0/client/mgmt/RolesClient.java index 70625829..ba9557f1 100644 --- a/src/main/java/com/auth0/client/mgmt/RolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/RolesClient.java @@ -46,7 +46,7 @@ public RawRolesClient withRawResponse() { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public SyncPagingIterable list() { @@ -54,7 +54,7 @@ public SyncPagingIterable list() { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public SyncPagingIterable list(RequestOptions requestOptions) { @@ -62,7 +62,7 @@ public SyncPagingIterable list(RequestOptions requestOptions) { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public SyncPagingIterable list(ListRolesRequestParameters request) { @@ -70,7 +70,7 @@ public SyncPagingIterable list(ListRolesRequestParameters request) { } /** - * Retrieve detailed list of user roles created in your tenant. + * Retrieve a list of roles. Includes roles created in your tenant and, when owner_id=auth0 is supplied, Auth0-managed System Roles. *

    Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access.

    */ public SyncPagingIterable list(ListRolesRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/UsersClient.java b/src/main/java/com/auth0/client/mgmt/UsersClient.java index 9efeaaa6..739bdd14 100644 --- a/src/main/java/com/auth0/client/mgmt/UsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/UsersClient.java @@ -7,10 +7,12 @@ import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.Suppliers; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ConsentSigningKey; import com.auth0.client.mgmt.types.CreateUserRequestContent; import com.auth0.client.mgmt.types.CreateUserResponseContent; import com.auth0.client.mgmt.types.GetUserRequestParameters; import com.auth0.client.mgmt.types.GetUserResponseContent; +import com.auth0.client.mgmt.types.ListUserConsentSigningKeysResponseContent; import com.auth0.client.mgmt.types.ListUsersByEmailRequestParameters; import com.auth0.client.mgmt.types.ListUsersRequestParameters; import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; @@ -24,7 +26,6 @@ import com.auth0.client.mgmt.users.EffectivePermissionsClient; import com.auth0.client.mgmt.users.EffectiveRolesClient; import com.auth0.client.mgmt.users.EnrollmentsClient; -import com.auth0.client.mgmt.users.FederatedConnectionsTokensetsClient; import com.auth0.client.mgmt.users.GroupsClient; import com.auth0.client.mgmt.users.IdentitiesClient; import com.auth0.client.mgmt.users.LogsClient; @@ -55,8 +56,6 @@ public class UsersClient { protected final Supplier enrollmentsClient; - protected final Supplier federatedConnectionsTokensetsClient; - protected final Supplier groupsClient; protected final Supplier identitiesClient; @@ -86,8 +85,6 @@ public UsersClient(ClientOptions clientOptions) { this.effectivePermissionsClient = Suppliers.memoize(() -> new EffectivePermissionsClient(clientOptions)); this.effectiveRolesClient = Suppliers.memoize(() -> new EffectiveRolesClient(clientOptions)); this.enrollmentsClient = Suppliers.memoize(() -> new EnrollmentsClient(clientOptions)); - this.federatedConnectionsTokensetsClient = - Suppliers.memoize(() -> new FederatedConnectionsTokensetsClient(clientOptions)); this.groupsClient = Suppliers.memoize(() -> new GroupsClient(clientOptions)); this.identitiesClient = Suppliers.memoize(() -> new IdentitiesClient(clientOptions)); this.logsClient = Suppliers.memoize(() -> new LogsClient(clientOptions)); @@ -108,68 +105,84 @@ public RawUsersClient withRawResponse() { } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public SyncPagingIterable list() { return this.rawClient.list().body(); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public SyncPagingIterable list(RequestOptions requestOptions) { return this.rawClient.list(requestOptions).body(); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public SyncPagingIterable list(ListUsersRequestParameters request) { return this.rawClient.list(request).body(); } /** - * Retrieve details of users. It is possible to: + * This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can: *
      - *
    • Specify a search criteria for users
    • + *
    • Specify search criteria for users
    • *
    • Sort the users to be returned
    • *
    • Select the fields to be returned
    • *
    • Specify the number of users to retrieve per page and the page index
    • *
    - *

    The q query parameter can be used to get users that match the specified criteria using query string syntax.

    - *

    Learn more about searching for users.

    - *

    Read about best practices when working with the API endpoints for retrieving users.

    - *

    Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.

    + *

    This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.

    + *
      + *
    • Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
    • + *
    • Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
    • + *
    • Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
    • + *
    + *

    Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.

    + *

    For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.

    */ public SyncPagingIterable list( ListUsersRequestParameters request, RequestOptions requestOptions) { @@ -558,6 +571,48 @@ public UpdateUserResponseContent update( return this.rawClient.update(id, request, requestOptions).body(); } + /** + * Retrieve all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public ListUserConsentSigningKeysResponseContent listConsentSigningKeys(String id) { + return this.rawClient.listConsentSigningKeys(id).body(); + } + + /** + * Retrieve all consent signing keys registered for a user. Returns an empty keys array when the user has no keys registered. + */ + public ListUserConsentSigningKeysResponseContent listConsentSigningKeys(String id, RequestOptions requestOptions) { + return this.rawClient.listConsentSigningKeys(id, requestOptions).body(); + } + + /** + * Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public ConsentSigningKey getConsentSigningKey(String id, String kid) { + return this.rawClient.getConsentSigningKey(id, kid).body(); + } + + /** + * Retrieve a single consent signing key for a user by its key identifier (kid). Returns 404 if the key does not exist. + */ + public ConsentSigningKey getConsentSigningKey(String id, String kid, RequestOptions requestOptions) { + return this.rawClient.getConsentSigningKey(id, kid, requestOptions).body(); + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public void deleteConsentSigningKey(String id, String kid) { + this.rawClient.deleteConsentSigningKey(id, kid).body(); + } + + /** + * Remove a single consent signing key for a user by its key identifier (kid). The operation is idempotent and returns 204 whether or not the key existed. + */ + public void deleteConsentSigningKey(String id, String kid, RequestOptions requestOptions) { + this.rawClient.deleteConsentSigningKey(id, kid, requestOptions).body(); + } + /** * Remove an existing multi-factor authentication (MFA) recovery code and generate a new one. If a user cannot access the original device or account used for MFA enrollment, they can use a recovery code to authenticate. */ @@ -624,10 +679,6 @@ public EnrollmentsClient enrollments() { return this.enrollmentsClient.get(); } - public FederatedConnectionsTokensetsClient federatedConnectionsTokensets() { - return this.federatedConnectionsTokensetsClient.get(); - } - public GroupsClient groups() { return this.groupsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawExecutionsClient.java index a04c39b7..738bd030 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawExecutionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawExecutionsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -66,6 +67,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -115,6 +125,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawModulesClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawModulesClient.java index 1ef05d17..693349cf 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawModulesClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawModulesClient.java @@ -16,6 +16,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -105,6 +106,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -167,6 +177,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -219,6 +232,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -268,6 +290,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -312,6 +337,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -360,6 +394,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -403,6 +440,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -453,6 +499,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -521,6 +570,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -575,6 +633,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -639,6 +700,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -707,6 +777,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -761,6 +834,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -815,6 +897,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawTriggersClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawTriggersClient.java index ba19838e..1b9df86a 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawTriggersClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawTriggersClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -64,6 +65,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -108,6 +118,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawVersionsClient.java index 091fd31a..d4df7348 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawVersionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawVersionsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -99,6 +100,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -161,6 +171,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -208,6 +221,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -257,6 +279,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -335,6 +360,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -379,6 +413,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java index 33f89ebd..28f7430f 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -61,6 +62,15 @@ public ManagementApiHttpResponse get(String i 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() : "{}"; @@ -94,6 +104,8 @@ public ManagementApiHttpResponse get(String i 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/actions/RawModulesClient.java b/src/main/java/com/auth0/client/mgmt/actions/RawModulesClient.java index ec533552..bfc967ba 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/RawModulesClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/RawModulesClient.java @@ -16,6 +16,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -99,6 +100,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -139,6 +149,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -183,6 +195,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -216,6 +237,8 @@ public ManagementApiHttpResponse create( 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); } @@ -251,6 +274,15 @@ public ManagementApiHttpResponse get(String id, 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() : "{}"; @@ -283,6 +315,8 @@ public ManagementApiHttpResponse get(String id, 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); } @@ -318,6 +352,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -351,6 +394,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -411,6 +456,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -447,6 +501,8 @@ public ManagementApiHttpResponse update( 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); } @@ -503,6 +559,15 @@ public ManagementApiHttpResponse> listAct 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() : "{}"; @@ -546,6 +611,8 @@ public ManagementApiHttpResponse> listAct 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); } @@ -592,6 +659,15 @@ public ManagementApiHttpResponse rollback( 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() : "{}"; @@ -628,6 +704,8 @@ public ManagementApiHttpResponse rollback( 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/actions/RawTriggersClient.java b/src/main/java/com/auth0/client/mgmt/actions/RawTriggersClient.java index 2a673f3e..0ce7351c 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/RawTriggersClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/RawTriggersClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -59,6 +60,15 @@ public ManagementApiHttpResponse list(Request 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() : "{}"; @@ -89,6 +99,8 @@ public ManagementApiHttpResponse list(Request 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/actions/RawVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/RawVersionsClient.java index 21866d53..bfcc8862 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/RawVersionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/RawVersionsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -94,6 +95,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -134,6 +144,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -172,6 +184,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -204,6 +225,8 @@ public ManagementApiHttpResponse get( 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); } @@ -273,6 +296,15 @@ public ManagementApiHttpResponse deploy( 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() : "{}"; @@ -303,6 +335,8 @@ public ManagementApiHttpResponse deploy( 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/actions/modules/AsyncRawVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/modules/AsyncRawVersionsClient.java index b22e064a..cf6b71d8 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/AsyncRawVersionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/modules/AsyncRawVersionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -98,6 +99,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -166,6 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -211,6 +224,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -265,6 +287,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -312,6 +337,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -361,6 +395,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/modules/RawVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/modules/RawVersionsClient.java index 764b3014..d0201705 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/RawVersionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/modules/RawVersionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -93,6 +94,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -137,6 +147,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -174,6 +186,15 @@ public ManagementApiHttpResponse creat 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() : "{}"; @@ -210,6 +231,8 @@ public ManagementApiHttpResponse creat 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); } @@ -248,6 +271,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -281,6 +313,8 @@ public ManagementApiHttpResponse get( 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/actions/modules/types/GetActionModuleVersionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java index 4faeaf1b..5ccb8f20 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.actions.modules.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetActionModuleVersionsRequestParameters( /** * @return Use this field to request a specific page of the list results. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getPage() { /** * @return The maximum number of results to be returned by the server in a single response. 20 by default. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getPerPage() { return perPage; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncRawBindingsClient.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncRawBindingsClient.java index e1984a1d..00a1c5d4 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncRawBindingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncRawBindingsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -102,6 +103,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -165,6 +175,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -239,6 +252,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -283,6 +305,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/actions/triggers/RawBindingsClient.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/RawBindingsClient.java index 16b42598..974df02f 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/RawBindingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/actions/triggers/RawBindingsClient.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -96,6 +97,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -137,6 +147,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -202,6 +214,15 @@ public ManagementApiHttpResponse updateMany 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() : "{}"; @@ -232,6 +253,8 @@ public ManagementApiHttpResponse updateMany 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/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java index acd2c1d2..1aee9807 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.actions.triggers.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private ListActionTriggerBindingsRequestParameters( /** * @return Use this field to request a specific page of the list results. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getPage() { /** * @return The maximum number of results to be returned in a single request. 20 by default */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getPerPage() { return perPage; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/CreateActionModuleRequestContent.java b/src/main/java/com/auth0/client/mgmt/actions/types/CreateActionModuleRequestContent.java index 8a8359a2..10c659a2 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/CreateActionModuleRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/CreateActionModuleRequestContent.java @@ -220,7 +220,6 @@ public Builder from(CreateActionModuleRequestContent other) { } /** - *

    The name of the action module.

    *

    The name of the action module.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -232,7 +231,6 @@ public CodeStage name(@NotNull String name) { } /** - *

    The source code of the action module.

    *

    The source code of the action module.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java index d827711c..de37eaad 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.actions.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetActionModuleActionsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getPerPage() { return perPage; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java index c82de9ca..d63dc95c 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.actions.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetActionModulesRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Paging is disabled if parameter not sent. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getPerPage() { return perPage; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java index cf233fb5..3ce89343 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.actions.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private ListActionVersionsRequestParameters( /** * @return Use this field to request a specific page of the list results. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getPage() { /** * @return This field specify the maximum number of results to be returned by the server. 20 by default */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getPerPage() { return perPage; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/RollbackActionModuleRequestParameters.java b/src/main/java/com/auth0/client/mgmt/actions/types/RollbackActionModuleRequestParameters.java index 987bbffb..01a1e104 100644 --- a/src/main/java/com/auth0/client/mgmt/actions/types/RollbackActionModuleRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/actions/types/RollbackActionModuleRequestParameters.java @@ -99,7 +99,6 @@ public Builder from(RollbackActionModuleRequestParameters other) { } /** - *

    The unique ID of the module version to roll back to.

    *

    The unique ID of the module version to roll back to.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java index 81042106..9247048b 100644 --- a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java +++ b/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -64,6 +65,15 @@ public CompletableFuture> checkIp(String id, Req 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 @@ -109,6 +119,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -152,6 +165,15 @@ public CompletableFuture> unblockIp(String id, R 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 @@ -192,6 +214,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java index 4622565c..3c9e335c 100644 --- a/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java +++ b/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -60,6 +61,15 @@ public ManagementApiHttpResponse checkIp(String id, RequestOptions request if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -90,6 +100,8 @@ public ManagementApiHttpResponse checkIp(String id, RequestOptions request 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); } @@ -125,6 +137,15 @@ public ManagementApiHttpResponse unblockIp(String id, RequestOptions reque if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -152,6 +173,8 @@ public ManagementApiHttpResponse unblockIp(String id, RequestOptions reque 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/attackprotection/AsyncRawBotDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBotDetectionClient.java index f86083c2..cf8cf67d 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBotDetectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBotDetectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -180,6 +193,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -229,6 +251,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBreachedPasswordDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBreachedPasswordDetectionClient.java index 8ba08db8..4d184bdc 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBreachedPasswordDetectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBreachedPasswordDetectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -107,6 +117,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -177,6 +190,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -222,6 +244,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBruteForceProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBruteForceProtectionClient.java index 1ed0a082..f3a5723a 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBruteForceProtectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBruteForceProtectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -107,6 +117,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -174,6 +187,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -218,6 +240,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawCaptchaClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawCaptchaClient.java index 97ee3000..1701bc99 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawCaptchaClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawCaptchaClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -112,6 +122,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -179,6 +192,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -223,6 +245,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java index 97d18217..eb1ebd32 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawPhoneProviderProtectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -112,6 +122,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -164,6 +177,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -203,6 +225,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java index 22e6cad8..a6cf3e1c 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -68,6 +69,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -107,6 +117,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -176,6 +189,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -220,6 +242,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java index d098bc9f..3612203c 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse get(Req 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() : "{}"; @@ -94,6 +104,8 @@ public ManagementApiHttpResponse get(Req 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); } @@ -152,6 +164,15 @@ public ManagementApiHttpResponse upda 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() : "{}"; @@ -185,6 +206,8 @@ public ManagementApiHttpResponse upda 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/attackprotection/RawBreachedPasswordDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawBreachedPasswordDetectionClient.java index 07cca9b0..e1a72ece 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBreachedPasswordDetectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/RawBreachedPasswordDetectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse get(Reque 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() : "{}"; @@ -90,6 +100,8 @@ public ManagementApiHttpResponse get(Reque 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); } @@ -148,6 +160,15 @@ public ManagementApiHttpResponse update 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() : "{}"; @@ -178,6 +199,8 @@ public ManagementApiHttpResponse update 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/attackprotection/RawCaptchaClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawCaptchaClient.java index dcc0b062..88f364a7 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawCaptchaClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/RawCaptchaClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -63,6 +64,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -93,6 +103,8 @@ public ManagementApiHttpResponse get( 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); } @@ -152,6 +164,15 @@ public ManagementApiHttpResponse u 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() : "{}"; @@ -182,6 +203,8 @@ public ManagementApiHttpResponse u 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/attackprotection/RawPhoneProviderProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawPhoneProviderProtectionClient.java index 16f5329d..aef7020d 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawPhoneProviderProtectionClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/RawPhoneProviderProtectionClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -63,6 +64,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -93,6 +103,8 @@ public ManagementApiHttpResponse get( 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); } @@ -137,6 +149,15 @@ public ManagementApiHttpResponse pa 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() : "{}"; @@ -164,6 +185,8 @@ public ManagementApiHttpResponse pa 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/attackprotection/RawSuspiciousIpThrottlingClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawSuspiciousIpThrottlingClient.java index d4f349a6..9eb01b9f 100644 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawSuspiciousIpThrottlingClient.java +++ b/src/main/java/com/auth0/client/mgmt/attackprotection/RawSuspiciousIpThrottlingClient.java @@ -11,6 +11,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse mode; + private final Optional formSubmissionMode; + private final Optional maxAttempts; private final Map additionalProperties; @@ -40,12 +43,14 @@ private UpdateBruteForceSettingsRequestContent( Optional> shields, Optional> allowlist, Optional mode, + Optional formSubmissionMode, Optional maxAttempts, Map additionalProperties) { this.enabled = enabled; this.shields = shields; this.allowlist = allowlist; this.mode = mode; + this.formSubmissionMode = formSubmissionMode; this.maxAttempts = maxAttempts; this.additionalProperties = additionalProperties; } @@ -80,6 +85,11 @@ public Optional getMode() { return mode; } + @JsonProperty("form_submission_mode") + public Optional getFormSubmissionMode() { + return formSubmissionMode; + } + /** * @return Maximum number of unsuccessful attempts. */ @@ -105,12 +115,14 @@ private boolean equalTo(UpdateBruteForceSettingsRequestContent other) { && shields.equals(other.shields) && allowlist.equals(other.allowlist) && mode.equals(other.mode) + && formSubmissionMode.equals(other.formSubmissionMode) && maxAttempts.equals(other.maxAttempts); } @java.lang.Override public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.mode, this.maxAttempts); + return Objects.hash( + this.enabled, this.shields, this.allowlist, this.mode, this.formSubmissionMode, this.maxAttempts); } @java.lang.Override @@ -132,6 +144,8 @@ public static final class Builder { private Optional mode = Optional.empty(); + private Optional formSubmissionMode = Optional.empty(); + private Optional maxAttempts = Optional.empty(); @JsonAnySetter @@ -144,6 +158,7 @@ public Builder from(UpdateBruteForceSettingsRequestContent other) { shields(other.getShields()); allowlist(other.getAllowlist()); mode(other.getMode()); + formSubmissionMode(other.getFormSubmissionMode()); maxAttempts(other.getMaxAttempts()); return this; } @@ -202,6 +217,17 @@ public Builder mode(BruteForceProtectionModeEnum mode) { return this; } + @JsonSetter(value = "form_submission_mode", nulls = Nulls.SKIP) + public Builder formSubmissionMode(Optional formSubmissionMode) { + this.formSubmissionMode = formSubmissionMode; + return this; + } + + public Builder formSubmissionMode(BruteForceProtectionFormSubmissionModeEnum formSubmissionMode) { + this.formSubmissionMode = Optional.ofNullable(formSubmissionMode); + return this; + } + /** *

    Maximum number of unsuccessful attempts.

    */ @@ -218,7 +244,7 @@ public Builder maxAttempts(Integer maxAttempts) { public UpdateBruteForceSettingsRequestContent build() { return new UpdateBruteForceSettingsRequestContent( - enabled, shields, allowlist, mode, maxAttempts, additionalProperties); + enabled, shields, allowlist, mode, formSubmissionMode, maxAttempts, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java index 5135447c..5f4d39a6 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java @@ -10,6 +10,7 @@ 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; @@ -64,6 +65,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -199,6 +212,15 @@ public CompletableFuture> updateUniversalLogin( 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 @@ -249,6 +271,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -285,6 +310,15 @@ public CompletableFuture> deleteUniversalLogin(R 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 @@ -325,6 +359,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java b/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java index 405a64b2..2a007542 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java @@ -12,6 +12,7 @@ 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; @@ -82,6 +83,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -131,6 +141,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -174,6 +187,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -218,6 +240,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -262,6 +287,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -306,6 +340,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -349,6 +386,15 @@ public CompletableFuture> delete(String themeId, 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 @@ -389,6 +435,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -442,6 +491,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -491,6 +549,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java index 7e1502ef..2fcb7f8e 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java @@ -10,6 +10,7 @@ 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; @@ -60,6 +61,15 @@ public ManagementApiHttpResponse getUn 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() : "{}"; @@ -93,6 +103,8 @@ public ManagementApiHttpResponse getUn 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); } @@ -170,6 +182,15 @@ public ManagementApiHttpResponse updateUniversalLogin( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -203,6 +224,8 @@ public ManagementApiHttpResponse updateUniversalLogin( 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); } @@ -231,6 +254,15 @@ public ManagementApiHttpResponse deleteUniversalLogin(RequestOptions reque if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -258,6 +290,8 @@ public ManagementApiHttpResponse deleteUniversalLogin(RequestOptions reque 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/branding/RawThemesClient.java b/src/main/java/com/auth0/client/mgmt/branding/RawThemesClient.java index 8b9de65b..a98bba13 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/RawThemesClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/RawThemesClient.java @@ -12,6 +12,7 @@ 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; @@ -78,6 +79,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -111,6 +121,8 @@ public ManagementApiHttpResponse create( 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); } @@ -145,6 +157,15 @@ public ManagementApiHttpResponse getDefa 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() : "{}"; @@ -175,6 +196,8 @@ public ManagementApiHttpResponse getDefa 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); } @@ -211,6 +234,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -240,6 +272,8 @@ public ManagementApiHttpResponse get( 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); } @@ -275,6 +309,15 @@ public ManagementApiHttpResponse delete(String themeId, RequestOptions req if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -302,6 +345,8 @@ public ManagementApiHttpResponse delete(String themeId, RequestOptions req 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); } @@ -347,6 +392,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -380,6 +434,8 @@ public ManagementApiHttpResponse update( 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/branding/phone/AsyncRawProvidersClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawProvidersClient.java index 820cee52..65d4a6f6 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawProvidersClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawProvidersClient.java @@ -15,6 +15,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -97,6 +98,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -141,6 +151,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -195,6 +208,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -244,6 +266,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -288,6 +313,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -337,6 +371,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -380,6 +417,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -420,6 +466,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -492,6 +541,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -546,6 +604,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -594,6 +655,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -648,6 +718,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawTemplatesClient.java index ed944f78..2b3b6654 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawTemplatesClient.java @@ -15,6 +15,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -87,6 +88,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -131,6 +141,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -186,6 +199,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -235,6 +257,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -273,6 +298,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -322,6 +356,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -359,6 +396,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -404,6 +450,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -460,6 +509,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -509,6 +567,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -557,6 +618,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -601,6 +671,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -649,6 +722,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -698,6 +780,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/RawProvidersClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/RawProvidersClient.java index a057218b..4590a0ea 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/RawProvidersClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/RawProvidersClient.java @@ -15,6 +15,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -92,6 +93,15 @@ public ManagementApiHttpResponse list 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() : "{}"; @@ -122,6 +132,8 @@ public ManagementApiHttpResponse list 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); } @@ -168,6 +180,15 @@ public ManagementApiHttpResponse cre 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() : "{}"; @@ -201,6 +222,8 @@ public ManagementApiHttpResponse cre 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); } @@ -237,6 +260,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -270,6 +302,8 @@ public ManagementApiHttpResponse get( 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); } @@ -305,6 +339,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -332,6 +375,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -396,6 +441,15 @@ public ManagementApiHttpResponse upd 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() : "{}"; @@ -432,6 +486,8 @@ public ManagementApiHttpResponse upd 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); } @@ -472,6 +528,15 @@ public ManagementApiHttpResponse tes 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() : "{}"; @@ -508,6 +573,8 @@ public ManagementApiHttpResponse tes 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/branding/phone/RawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/RawTemplatesClient.java index 97658358..4c9b5467 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/RawTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/RawTemplatesClient.java @@ -15,6 +15,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -82,6 +83,15 @@ public ManagementApiHttpResponse list( 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() : "{}"; @@ -112,6 +122,8 @@ public ManagementApiHttpResponse list( 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); } @@ -158,6 +170,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -191,6 +212,8 @@ public ManagementApiHttpResponse create( 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); } @@ -220,6 +243,15 @@ public ManagementApiHttpResponse get(String id, 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() : "{}"; @@ -252,6 +284,8 @@ public ManagementApiHttpResponse get(String id, 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); } @@ -281,6 +315,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -311,6 +354,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -359,6 +404,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -392,6 +446,8 @@ public ManagementApiHttpResponse update( 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); } @@ -432,6 +488,15 @@ public ManagementApiHttpResponse reset( 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() : "{}"; @@ -462,6 +527,8 @@ public ManagementApiHttpResponse reset( 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); } @@ -502,6 +569,15 @@ public ManagementApiHttpResponseThe recipient phone number to receive a given notification.

    *

    The recipient phone number to receive a given notification.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateTestNotificationRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateTestNotificationRequestContent.java index fc07009b..33850148 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateTestNotificationRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateTestNotificationRequestContent.java @@ -126,7 +126,6 @@ public Builder from(CreatePhoneTemplateTestNotificationRequestContent other) { } /** - *

    Destination of the testing phone notification

    *

    Destination of the testing phone notification

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListBrandingPhoneProvidersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListBrandingPhoneProvidersRequestParameters.java index 2d1dfa6d..0ecc30f2 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListBrandingPhoneProvidersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListBrandingPhoneProvidersRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.branding.phone.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.JsonIgnore; 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; @@ -35,7 +36,8 @@ private ListBrandingPhoneProvidersRequestParameters( /** * @return Whether the provider is enabled (false) or disabled (true). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("disabled") public OptionalNullable getDisabled() { if (disabled == null) { return OptionalNullable.absent(); @@ -43,6 +45,12 @@ public OptionalNullable getDisabled() { return disabled; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("disabled") + private OptionalNullable _getDisabled() { + return disabled; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListPhoneTemplatesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListPhoneTemplatesRequestParameters.java index 30200d25..93eabbfa 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListPhoneTemplatesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListPhoneTemplatesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.branding.phone.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.JsonIgnore; 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; @@ -35,7 +36,8 @@ private ListPhoneTemplatesRequestParameters( /** * @return Whether the template is enabled (false) or disabled (true). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("disabled") public OptionalNullable getDisabled() { if (disabled == null) { return OptionalNullable.absent(); @@ -43,6 +45,12 @@ public OptionalNullable getDisabled() { return disabled; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("disabled") + private OptionalNullable _getDisabled() { + return disabled; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/branding/types/CreateBrandingThemeRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/types/CreateBrandingThemeRequestContent.java index 4016a847..710a805f 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/types/CreateBrandingThemeRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/branding/types/CreateBrandingThemeRequestContent.java @@ -7,6 +7,7 @@ import com.auth0.client.mgmt.types.BrandingThemeBorders; import com.auth0.client.mgmt.types.BrandingThemeColors; import com.auth0.client.mgmt.types.BrandingThemeFonts; +import com.auth0.client.mgmt.types.BrandingThemeIdentifiers; import com.auth0.client.mgmt.types.BrandingThemePageBackground; import com.auth0.client.mgmt.types.BrandingThemeWidget; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -34,6 +35,8 @@ public final class CreateBrandingThemeRequestContent { private final BrandingThemeFonts fonts; + private final Optional identifiers; + private final BrandingThemePageBackground pageBackground; private final BrandingThemeWidget widget; @@ -45,6 +48,7 @@ private CreateBrandingThemeRequestContent( BrandingThemeColors colors, Optional displayName, BrandingThemeFonts fonts, + Optional identifiers, BrandingThemePageBackground pageBackground, BrandingThemeWidget widget, Map additionalProperties) { @@ -52,6 +56,7 @@ private CreateBrandingThemeRequestContent( this.colors = colors; this.displayName = displayName; this.fonts = fonts; + this.identifiers = identifiers; this.pageBackground = pageBackground; this.widget = widget; this.additionalProperties = additionalProperties; @@ -80,6 +85,11 @@ public BrandingThemeFonts getFonts() { return fonts; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("page_background") public BrandingThemePageBackground getPageBackground() { return pageBackground; @@ -106,13 +116,21 @@ private boolean equalTo(CreateBrandingThemeRequestContent other) { && colors.equals(other.colors) && displayName.equals(other.displayName) && fonts.equals(other.fonts) + && identifiers.equals(other.identifiers) && pageBackground.equals(other.pageBackground) && widget.equals(other.widget); } @java.lang.Override public int hashCode() { - return Objects.hash(this.borders, this.colors, this.displayName, this.fonts, this.pageBackground, this.widget); + return Objects.hash( + this.borders, + this.colors, + this.displayName, + this.fonts, + this.identifiers, + this.pageBackground, + this.widget); } @java.lang.Override @@ -159,6 +177,10 @@ public interface _FinalStage { _FinalStage displayName(Optional displayName); _FinalStage displayName(String displayName); + + _FinalStage identifiers(Optional identifiers); + + _FinalStage identifiers(BrandingThemeIdentifiers identifiers); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -174,6 +196,8 @@ public static final class Builder private BrandingThemeWidget widget; + private Optional identifiers = Optional.empty(); + private Optional displayName = Optional.empty(); @JsonAnySetter @@ -187,6 +211,7 @@ public Builder from(CreateBrandingThemeRequestContent other) { colors(other.getColors()); displayName(other.getDisplayName()); fonts(other.getFonts()); + identifiers(other.getIdentifiers()); pageBackground(other.getPageBackground()); widget(other.getWidget()); return this; @@ -227,6 +252,19 @@ public _FinalStage widget(@NotNull BrandingThemeWidget widget) { return this; } + @java.lang.Override + public _FinalStage identifiers(BrandingThemeIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public _FinalStage identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + /** *

    Display Name

    * @return Reference to {@code this} so that method calls can be chained together. @@ -250,7 +288,7 @@ public _FinalStage displayName(Optional displayName) { @java.lang.Override public CreateBrandingThemeRequestContent build() { return new CreateBrandingThemeRequestContent( - borders, colors, displayName, fonts, pageBackground, widget, additionalProperties); + borders, colors, displayName, fonts, identifiers, pageBackground, widget, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/branding/types/UpdateBrandingThemeRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/types/UpdateBrandingThemeRequestContent.java index 80369901..7d70f1fa 100644 --- a/src/main/java/com/auth0/client/mgmt/branding/types/UpdateBrandingThemeRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/branding/types/UpdateBrandingThemeRequestContent.java @@ -7,6 +7,7 @@ import com.auth0.client.mgmt.types.BrandingThemeBorders; import com.auth0.client.mgmt.types.BrandingThemeColors; import com.auth0.client.mgmt.types.BrandingThemeFonts; +import com.auth0.client.mgmt.types.BrandingThemeIdentifiers; import com.auth0.client.mgmt.types.BrandingThemePageBackground; import com.auth0.client.mgmt.types.BrandingThemeWidget; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -34,6 +35,8 @@ public final class UpdateBrandingThemeRequestContent { private final BrandingThemeFonts fonts; + private final Optional identifiers; + private final BrandingThemePageBackground pageBackground; private final BrandingThemeWidget widget; @@ -45,6 +48,7 @@ private UpdateBrandingThemeRequestContent( BrandingThemeColors colors, Optional displayName, BrandingThemeFonts fonts, + Optional identifiers, BrandingThemePageBackground pageBackground, BrandingThemeWidget widget, Map additionalProperties) { @@ -52,6 +56,7 @@ private UpdateBrandingThemeRequestContent( this.colors = colors; this.displayName = displayName; this.fonts = fonts; + this.identifiers = identifiers; this.pageBackground = pageBackground; this.widget = widget; this.additionalProperties = additionalProperties; @@ -80,6 +85,11 @@ public BrandingThemeFonts getFonts() { return fonts; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("page_background") public BrandingThemePageBackground getPageBackground() { return pageBackground; @@ -106,13 +116,21 @@ private boolean equalTo(UpdateBrandingThemeRequestContent other) { && colors.equals(other.colors) && displayName.equals(other.displayName) && fonts.equals(other.fonts) + && identifiers.equals(other.identifiers) && pageBackground.equals(other.pageBackground) && widget.equals(other.widget); } @java.lang.Override public int hashCode() { - return Objects.hash(this.borders, this.colors, this.displayName, this.fonts, this.pageBackground, this.widget); + return Objects.hash( + this.borders, + this.colors, + this.displayName, + this.fonts, + this.identifiers, + this.pageBackground, + this.widget); } @java.lang.Override @@ -159,6 +177,10 @@ public interface _FinalStage { _FinalStage displayName(Optional displayName); _FinalStage displayName(String displayName); + + _FinalStage identifiers(Optional identifiers); + + _FinalStage identifiers(BrandingThemeIdentifiers identifiers); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -174,6 +196,8 @@ public static final class Builder private BrandingThemeWidget widget; + private Optional identifiers = Optional.empty(); + private Optional displayName = Optional.empty(); @JsonAnySetter @@ -187,6 +211,7 @@ public Builder from(UpdateBrandingThemeRequestContent other) { colors(other.getColors()); displayName(other.getDisplayName()); fonts(other.getFonts()); + identifiers(other.getIdentifiers()); pageBackground(other.getPageBackground()); widget(other.getWidget()); return this; @@ -227,6 +252,19 @@ public _FinalStage widget(@NotNull BrandingThemeWidget widget) { return this; } + @java.lang.Override + public _FinalStage identifiers(BrandingThemeIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public _FinalStage identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + /** *

    Display Name

    * @return Reference to {@code this} so that method calls can be chained together. @@ -250,7 +288,7 @@ public _FinalStage displayName(Optional displayName) { @java.lang.Override public UpdateBrandingThemeRequestContent build() { return new UpdateBrandingThemeRequestContent( - borders, colors, displayName, fonts, pageBackground, widget, additionalProperties); + borders, colors, displayName, fonts, identifiers, pageBackground, widget, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java index 7e3cc9b3..f838836e 100644 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -64,6 +65,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -152,6 +164,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java index c7a26bd4..affba07b 100644 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -58,6 +59,8 @@ public ManagementApiHttpResponse> list( .addPathSegments("client-grants") .addPathSegment(id) .addPathSegments("organizations"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -78,6 +81,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -123,6 +135,8 @@ public ManagementApiHttpResponse> list( 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/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java index 62f321ec..9de18ba9 100644 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.clientgrants.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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListClientGrantOrganizationsRequestParameters.Builder.class) public final class ListClientGrantOrganizationsRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -29,16 +32,33 @@ public final class ListClientGrantOrganizationsRequestParameters { private final Map additionalProperties; private ListClientGrantOrganizationsRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { + OptionalNullable includeTotals, + OptionalNullable from, + OptionalNullable take, + Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +69,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +78,24 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -70,12 +109,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListClientGrantOrganizationsRequestParameters other) { - return from.equals(other.from) && take.equals(other.take); + return includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take); + return Objects.hash(this.includeTotals, this.from, this.take); } @java.lang.Override @@ -89,6 +128,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -99,11 +140,46 @@ public static final class Builder { private Builder() {} public Builder from(ListClientGrantOrganizationsRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; } + /** + *

    Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

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

    Optional Id from which to start selection.

    */ @@ -173,7 +249,7 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { } public ListClientGrantOrganizationsRequestParameters build() { - return new ListClientGrantOrganizationsRequestParameters(from, take, additionalProperties); + return new ListClientGrantOrganizationsRequestParameters(includeTotals, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java index 9c7bf326..e8083c47 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -123,6 +124,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -188,6 +198,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/clients/AsyncRawCredentialsClient.java index 2db33b12..1a445153 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawCredentialsClient.java +++ b/src/main/java/com/auth0/client/mgmt/clients/AsyncRawCredentialsClient.java @@ -12,6 +12,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -78,6 +79,15 @@ public CompletableFuture>> list 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 @@ -121,6 +131,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -255,6 +268,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -304,6 +326,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -353,6 +378,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -397,6 +431,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -443,6 +480,15 @@ public CompletableFuture> delete( 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 @@ -483,6 +529,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -564,6 +613,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -613,6 +671,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java index 09cce963..2f02e497 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -118,6 +119,15 @@ public ManagementApiHttpResponse> get( 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() : "{}"; @@ -161,6 +171,8 @@ public ManagementApiHttpResponse> get( 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/clients/RawCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/clients/RawCredentialsClient.java index ce2d0262..dfdc846d 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/RawCredentialsClient.java +++ b/src/main/java/com/auth0/client/mgmt/clients/RawCredentialsClient.java @@ -12,6 +12,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -73,6 +74,15 @@ public ManagementApiHttpResponse> list(String clientId, R 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() : "{}"; @@ -103,6 +113,8 @@ public ManagementApiHttpResponse> list(String clientId, R 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); } @@ -229,6 +241,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -262,6 +283,8 @@ public ManagementApiHttpResponse create( 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); } @@ -302,6 +325,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -332,6 +364,8 @@ public ManagementApiHttpResponse get( 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); } @@ -369,6 +403,15 @@ public ManagementApiHttpResponse delete(String clientId, String credential if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -396,6 +439,8 @@ public ManagementApiHttpResponse delete(String clientId, String credential 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); } @@ -469,6 +514,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -502,6 +556,8 @@ public ManagementApiHttpResponse update( 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/clients/types/ConnectionsGetRequest.java b/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java index e668020d..6364a588 100644 --- a/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java +++ b/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.clients.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.ConnectionStrategyEnum; @@ -11,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -66,7 +68,8 @@ public Optional> getStrategy() { /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -77,7 +80,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -88,7 +92,8 @@ public OptionalNullable getTake() { /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -99,7 +104,8 @@ public OptionalNullable getFields() { /** * @return true if the fields specified are to be included in the result, false otherwise (defaults to true) */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -107,6 +113,36 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("strategy") + private Optional> _getStrategy() { + return strategy; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java index 94cf3256..a7526405 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java @@ -4,6 +4,8 @@ package com.auth0.client.mgmt.connections; import com.auth0.client.mgmt.connections.directoryprovisioning.AsyncSynchronizationsClient; +import com.auth0.client.mgmt.connections.types.AddSynchronizedGroupsRequestContent; +import com.auth0.client.mgmt.connections.types.DeleteSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; @@ -215,6 +217,24 @@ public CompletableFuture> listSynch .thenApply(response -> response.body()); } + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public CompletableFuture addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request) { + return this.rawClient.addSynchronizedGroupSelections(id, request).thenApply(response -> response.body()); + } + + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public CompletableFuture addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + return this.rawClient + .addSynchronizedGroupSelections(id, request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Create or replace the selected groups for a connection directory provisioning configuration. */ @@ -230,6 +250,24 @@ public CompletableFuture set( return this.rawClient.set(id, request, requestOptions).thenApply(response -> response.body()); } + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public CompletableFuture deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request) { + return this.rawClient.deleteSynchronizedGroupSelections(id, request).thenApply(response -> response.body()); + } + + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public CompletableFuture deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + return this.rawClient + .deleteSynchronizedGroupSelections(id, request, requestOptions) + .thenApply(response -> response.body()); + } + public AsyncSynchronizationsClient synchronizations() { return this.synchronizationsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncKeysClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncKeysClient.java index 598c653f..59ad1265 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncKeysClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncKeysClient.java @@ -32,28 +32,30 @@ public AsyncRawKeysClient withRawResponse() { } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public CompletableFuture> get(String id) { return this.rawClient.get(id).thenApply(response -> response.body()); } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public CompletableFuture> get(String id, RequestOptions requestOptions) { return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture> create(String id) { return this.rawClient.create(id).thenApply(response -> response.body()); } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture> create( String id, RequestOptions requestOptions) { @@ -61,7 +63,8 @@ public CompletableFuture> create( } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture> create( String id, OptionalNullable request) { @@ -69,7 +72,8 @@ public CompletableFuture> create( } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture> create( String id, OptionalNullable request, RequestOptions requestOptions) { @@ -77,21 +81,24 @@ public CompletableFuture> create( } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture rotate(String id) { return this.rawClient.rotate(id).thenApply(response -> response.body()); } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture rotate(String id, RequestOptions requestOptions) { return this.rawClient.rotate(id, requestOptions).thenApply(response -> response.body()); } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture rotate( String id, OptionalNullable request) { @@ -99,7 +106,8 @@ public CompletableFuture rotate( } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture rotate( String id, OptionalNullable request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java index b703a6e3..a6eb60d6 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java @@ -12,6 +12,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -102,6 +103,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -168,6 +178,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -216,6 +229,15 @@ public CompletableFuture> update( 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 @@ -261,6 +283,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java index 5cc77c53..e12a95bf 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java @@ -3,6 +3,8 @@ */ package com.auth0.client.mgmt.connections; +import com.auth0.client.mgmt.connections.types.AddSynchronizedGroupsRequestContent; +import com.auth0.client.mgmt.connections.types.DeleteSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; @@ -15,6 +17,7 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -107,6 +110,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -168,6 +180,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -213,6 +228,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -262,6 +286,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -336,6 +363,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -390,6 +426,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -434,6 +473,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -479,6 +527,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -553,6 +604,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -602,6 +662,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -649,6 +712,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -699,6 +771,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -755,6 +830,9 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { httpUrl, "from", request.getFrom().orElse(null), false); } QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -770,6 +848,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -836,6 +923,121 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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; + } + + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public CompletableFuture> addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request) { + return addSynchronizedGroupSelections(id, request, null); + } + + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public CompletableFuture> addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + 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()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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)); } @@ -891,6 +1093,15 @@ public CompletableFuture> set( 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 @@ -941,6 +1152,121 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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; + } + + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public CompletableFuture> deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request) { + return deleteSynchronizedGroupSelections(id, request, null); + } + + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public CompletableFuture> deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + 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("DELETE", 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()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java index a779cf9d..f16fefa1 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; 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; @@ -46,14 +47,14 @@ public AsyncRawKeysClient(ClientOptions clientOptions) { } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public CompletableFuture>> get(String id) { return get(id, null); } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public CompletableFuture>> get( String id, RequestOptions requestOptions) { @@ -77,6 +78,15 @@ public CompletableFuture>> get( 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 @@ -125,6 +135,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -139,7 +152,8 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture>> create( String id) { @@ -147,7 +161,8 @@ public CompletableFutureSet key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture>> create( String id, RequestOptions requestOptions) { @@ -155,7 +170,8 @@ public CompletableFutureSet key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture>> create( String id, OptionalNullable request) { @@ -163,7 +179,8 @@ public CompletableFutureSet key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public CompletableFuture>> create( String id, OptionalNullable request, RequestOptions requestOptions) { @@ -198,6 +215,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -253,6 +279,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -267,14 +296,16 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture> rotate(String id) { return rotate(id, OptionalNullable.absent()); } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture> rotate( String id, RequestOptions requestOptions) { @@ -282,7 +313,8 @@ public CompletableFutureSet key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture> rotate( String id, OptionalNullable request) { @@ -290,7 +322,8 @@ public CompletableFutureSet key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public CompletableFuture> rotate( String id, OptionalNullable request, RequestOptions requestOptions) { @@ -326,6 +359,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -375,6 +417,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java index f67aa36f..21a854f4 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java @@ -14,8 +14,10 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -102,6 +104,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -163,6 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -208,6 +222,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -242,6 +265,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -314,6 +340,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -340,6 +375,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; } } catch (JsonProcessingException ignored) { // unable to map error response, throwing generic error @@ -348,6 +388,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -392,6 +435,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -422,6 +474,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -476,6 +531,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -510,6 +574,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -557,6 +624,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -591,6 +667,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java index 3e6a44b9..0f7fec1f 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -70,6 +71,15 @@ public CompletableFuture> deleteByEmail( 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 @@ -115,6 +125,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java index 53333a62..f28bcc9d 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java @@ -4,6 +4,8 @@ package com.auth0.client.mgmt.connections; import com.auth0.client.mgmt.connections.directoryprovisioning.SynchronizationsClient; +import com.auth0.client.mgmt.connections.types.AddSynchronizedGroupsRequestContent; +import com.auth0.client.mgmt.connections.types.DeleteSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; @@ -211,6 +213,23 @@ public SyncPagingIterable listSynchronizedGroups( .body(); } + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public void addSynchronizedGroupSelections(String id, AddSynchronizedGroupsRequestContent request) { + this.rawClient.addSynchronizedGroupSelections(id, request).body(); + } + + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public void addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + this.rawClient + .addSynchronizedGroupSelections(id, request, requestOptions) + .body(); + } + /** * Create or replace the selected groups for a connection directory provisioning configuration. */ @@ -225,6 +244,23 @@ public void set(String id, ReplaceSynchronizedGroupsRequestContent request, Requ this.rawClient.set(id, request, requestOptions).body(); } + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public void deleteSynchronizedGroupSelections(String id, DeleteSynchronizedGroupsRequestContent request) { + this.rawClient.deleteSynchronizedGroupSelections(id, request).body(); + } + + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public void deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + this.rawClient + .deleteSynchronizedGroupSelections(id, request, requestOptions) + .body(); + } + public SynchronizationsClient synchronizations() { return this.synchronizationsClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/KeysClient.java b/src/main/java/com/auth0/client/mgmt/connections/KeysClient.java index ae24514f..defe86e7 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/KeysClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/KeysClient.java @@ -31,35 +31,38 @@ public RawKeysClient withRawResponse() { } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public List get(String id) { return this.rawClient.get(id).body(); } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public List get(String id, RequestOptions requestOptions) { return this.rawClient.get(id, requestOptions).body(); } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public List create(String id) { return this.rawClient.create(id).body(); } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public List create(String id, RequestOptions requestOptions) { return this.rawClient.create(id, requestOptions).body(); } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public List create( String id, OptionalNullable request) { @@ -67,7 +70,8 @@ public List create( } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public List create( String id, OptionalNullable request, RequestOptions requestOptions) { @@ -75,21 +79,24 @@ public List create( } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public RotateConnectionsKeysResponseContent rotate(String id) { return this.rawClient.rotate(id).body(); } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public RotateConnectionsKeysResponseContent rotate(String id, RequestOptions requestOptions) { return this.rawClient.rotate(id, requestOptions).body(); } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public RotateConnectionsKeysResponseContent rotate( String id, OptionalNullable request) { @@ -97,7 +104,8 @@ public RotateConnectionsKeysResponseContent rotate( } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public RotateConnectionsKeysResponseContent rotate( String id, OptionalNullable request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java index 20433e63..2ba7bf91 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java @@ -12,6 +12,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -97,6 +98,15 @@ public ManagementApiHttpResponse> ge 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() : "{}"; @@ -141,6 +151,8 @@ public ManagementApiHttpResponse> ge 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); } @@ -181,6 +193,15 @@ public ManagementApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -211,6 +232,8 @@ public ManagementApiHttpResponse update( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java index f91bcb49..4350c901 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java @@ -3,6 +3,8 @@ */ package com.auth0.client.mgmt.connections; +import com.auth0.client.mgmt.connections.types.AddSynchronizedGroupsRequestContent; +import com.auth0.client.mgmt.connections.types.DeleteSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; @@ -15,6 +17,7 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -101,6 +104,15 @@ public ManagementApiHttpResponse> list 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() : "{}"; @@ -142,6 +154,8 @@ public ManagementApiHttpResponse> list 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); } @@ -179,6 +193,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -212,6 +235,8 @@ public ManagementApiHttpResponse get( 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); } @@ -278,6 +303,15 @@ public ManagementApiHttpResponse cre 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() : "{}"; @@ -314,6 +348,8 @@ public ManagementApiHttpResponse cre 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); } @@ -350,6 +386,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -380,6 +425,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -446,6 +493,15 @@ public ManagementApiHttpResponse upd 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() : "{}"; @@ -479,6 +535,8 @@ public ManagementApiHttpResponse upd 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); } @@ -518,6 +576,15 @@ public ManagementApiHttpResponse> l httpUrl, "from", request.getFrom().orElse(null), false); } QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getQ().isAbsent()) { + QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); + } if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); @@ -612,6 +684,15 @@ public ManagementApiHttpResponse> l 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() : "{}"; @@ -655,6 +736,96 @@ public ManagementApiHttpResponse> l 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); + } + } + + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public ManagementApiHttpResponse addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request) { + return addSynchronizedGroupSelections(id, request, null); + } + + /** + * Add synchronized group selections to a directory provisioning configuration. + */ + public ManagementApiHttpResponse addSynchronizedGroupSelections( + String id, AddSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + 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(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); } @@ -701,6 +872,15 @@ public ManagementApiHttpResponse set( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -734,6 +914,96 @@ public ManagementApiHttpResponse set( 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); + } + } + + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public ManagementApiHttpResponse deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request) { + return deleteSynchronizedGroupSelections(id, request, null); + } + + /** + * Delete synchronized group selections for a directory provisioning configuration + */ + public ManagementApiHttpResponse deleteSynchronizedGroupSelections( + String id, DeleteSynchronizedGroupsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("connections") + .addPathSegment(id) + .addPathSegments("directory-provisioning") + .addPathSegments("synchronized-groups"); + 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("DELETE", 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(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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/connections/RawKeysClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawKeysClient.java index bc12dcb9..75c8089e 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/RawKeysClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/RawKeysClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; 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; @@ -42,14 +43,14 @@ public RawKeysClient(ClientOptions clientOptions) { } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public ManagementApiHttpResponse> get(String id) { return get(id, null); } /** - * Gets the connection keys for the Okta or OIDC connection strategy. + * Gets the connection keys for the Okta, OIDC, or SAML (samlp) connection strategy. The response includes both signing keys and encryption keys, told apart by key_use. Encryption keys apply only to OIDC and Okta connections. */ public ManagementApiHttpResponse> get(String id, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) @@ -72,6 +73,15 @@ public ManagementApiHttpResponse> get(String id, RequestOpti 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() : "{}"; @@ -105,20 +115,24 @@ public ManagementApiHttpResponse> get(String id, RequestOpti 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); } } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public ManagementApiHttpResponse> create(String id) { return create(id, OptionalNullable.absent()); } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public ManagementApiHttpResponse> create( String id, RequestOptions requestOptions) { @@ -126,7 +140,8 @@ public ManagementApiHttpResponse> c } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public ManagementApiHttpResponse> create( String id, OptionalNullable request) { @@ -134,7 +149,8 @@ public ManagementApiHttpResponse> c } /** - * Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions. + * Provision initial connection keys for Okta, OIDC, or SAML (samlp) connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication or encrypted ID tokens, enabling zero-downtime transitions. + *

    Set key_use to signing (default) to provision signing keys, optionally choosing signing_alg, or to encryption to provision encryption keys, optionally choosing encryption_alg. signing_alg and encryption_alg each apply only to their own key use. Encryption keys and encrypted ID tokens apply only to OIDC and Okta connections. The response lists all of the connection's keys.

    */ public ManagementApiHttpResponse> create( String id, OptionalNullable request, RequestOptions requestOptions) { @@ -169,6 +185,15 @@ public ManagementApiHttpResponse> c 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() : "{}"; @@ -206,20 +231,24 @@ public ManagementApiHttpResponse> c 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); } } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public ManagementApiHttpResponse rotate(String id) { return rotate(id, OptionalNullable.absent()); } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public ManagementApiHttpResponse rotate( String id, RequestOptions requestOptions) { @@ -227,7 +256,8 @@ public ManagementApiHttpResponse rotate( } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public ManagementApiHttpResponse rotate( String id, OptionalNullable request) { @@ -235,7 +265,8 @@ public ManagementApiHttpResponse rotate( } /** - * Rotates the connection keys for the Okta or OIDC connection strategies. + * Rotates the connection keys for the Okta, OIDC, or SAML (samlp) connection strategies. + *

    Set key_use to signing (default) to rotate the signing key, optionally choosing signing_alg, or to encryption to rotate the encryption key, optionally choosing encryption_alg. Rotating signing keys requires the connection to be configured to use JWT Client Authentication. Rotating encryption keys requires the connection to be configured to use encrypted ID tokens (id_token_encrypted_response_alg set), which applies only to OIDC and Okta connections. When encryption_alg is omitted, the new encryption key uses id_token_encrypted_response_alg.

    */ public ManagementApiHttpResponse rotate( String id, OptionalNullable request, RequestOptions requestOptions) { @@ -271,6 +302,15 @@ public ManagementApiHttpResponse rotate( 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() : "{}"; @@ -304,6 +344,8 @@ public ManagementApiHttpResponse rotate( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java index 7836a867..f1bd3c16 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java @@ -14,8 +14,10 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -96,6 +98,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -136,6 +147,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -173,6 +186,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -197,6 +219,8 @@ public ManagementApiHttpResponse get( 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); } @@ -261,6 +285,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -278,6 +311,9 @@ public ManagementApiHttpResponse create( case 404: throw new NotFoundError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); } } catch (JsonProcessingException ignored) { // unable to map error response, throwing generic error @@ -285,6 +321,8 @@ public ManagementApiHttpResponse create( 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); } @@ -321,6 +359,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -342,6 +389,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -388,6 +437,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -412,6 +470,8 @@ public ManagementApiHttpResponse update( 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); } @@ -450,6 +510,15 @@ public ManagementApiHttpResponse deleteByEmail( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -96,6 +106,8 @@ public ManagementApiHttpResponse deleteByEmail( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncRawSynchronizationsClient.java b/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncRawSynchronizationsClient.java index 12284e19..813982e9 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncRawSynchronizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncRawSynchronizationsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -71,6 +72,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -125,6 +135,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/RawSynchronizationsClient.java b/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/RawSynchronizationsClient.java index 966d64c9..fb6e5986 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/RawSynchronizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/RawSynchronizationsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -66,6 +67,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -102,6 +112,8 @@ public ManagementApiHttpResponse Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncRawTokensClient.java b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncRawTokensClient.java index aa380258..a23a5872 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncRawTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncRawTokensClient.java @@ -11,6 +11,7 @@ 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.NotFoundError; @@ -72,6 +73,15 @@ public CompletableFuture>> get( 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 @@ -105,6 +115,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -175,6 +188,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -213,6 +235,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -259,6 +284,15 @@ public CompletableFuture> delete( 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 @@ -289,6 +323,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/RawTokensClient.java b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/RawTokensClient.java index 2d587423..e52946ba 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/RawTokensClient.java +++ b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/RawTokensClient.java @@ -11,6 +11,7 @@ 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.NotFoundError; @@ -67,6 +68,15 @@ public ManagementApiHttpResponse> get(String id, RequestOpti 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() : "{}"; @@ -91,6 +101,8 @@ public ManagementApiHttpResponse> get(String id, RequestOpti 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); } @@ -152,6 +164,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -178,6 +199,8 @@ public ManagementApiHttpResponse create( 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); } @@ -215,6 +238,15 @@ public ManagementApiHttpResponse delete(String id, String tokenId, Request if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -236,6 +268,8 @@ public ManagementApiHttpResponse delete(String id, String tokenId, Request Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/AddSynchronizedGroupsRequestContent.java b/src/main/java/com/auth0/client/mgmt/connections/types/AddSynchronizedGroupsRequestContent.java new file mode 100644 index 00000000..14325a61 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/connections/types/AddSynchronizedGroupsRequestContent.java @@ -0,0 +1,125 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.connections.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.SynchronizedGroupPayload; +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 = AddSynchronizedGroupsRequestContent.Builder.class) +public final class AddSynchronizedGroupsRequestContent { + private final List groups; + + private final Map additionalProperties; + + private AddSynchronizedGroupsRequestContent( + List groups, Map additionalProperties) { + this.groups = groups; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of Google Workspace Directory group objects to synchronize. + */ + @JsonProperty("groups") + public List getGroups() { + return groups; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddSynchronizedGroupsRequestContent + && equalTo((AddSynchronizedGroupsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AddSynchronizedGroupsRequestContent other) { + return groups.equals(other.groups); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.groups); + } + + @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 groups = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(AddSynchronizedGroupsRequestContent other) { + groups(other.getGroups()); + return this; + } + + /** + *

    Array of Google Workspace Directory group objects to synchronize.

    + */ + @JsonSetter(value = "groups", nulls = Nulls.SKIP) + public Builder groups(List groups) { + this.groups.clear(); + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public Builder addGroups(SynchronizedGroupPayload groups) { + this.groups.add(groups); + return this; + } + + public Builder addAllGroups(List groups) { + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public AddSynchronizedGroupsRequestContent build() { + return new AddSynchronizedGroupsRequestContent(groups, 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/connections/types/DeleteConnectionUsersByEmailQueryParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/DeleteConnectionUsersByEmailQueryParameters.java index fdb8d043..ab7fb72c 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/DeleteConnectionUsersByEmailQueryParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/DeleteConnectionUsersByEmailQueryParameters.java @@ -6,9 +6,9 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -31,7 +31,7 @@ private DeleteConnectionUsersByEmailQueryParameters(String email, MapThe email of the user to delete

    *

    The email of the user to delete

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/DeleteSynchronizedGroupsRequestContent.java b/src/main/java/com/auth0/client/mgmt/connections/types/DeleteSynchronizedGroupsRequestContent.java new file mode 100644 index 00000000..5d5a7e1c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/connections/types/DeleteSynchronizedGroupsRequestContent.java @@ -0,0 +1,125 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.connections.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.SynchronizedGroupSelectionId; +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 = DeleteSynchronizedGroupsRequestContent.Builder.class) +public final class DeleteSynchronizedGroupsRequestContent { + private final List groups; + + private final Map additionalProperties; + + private DeleteSynchronizedGroupsRequestContent( + List groups, Map additionalProperties) { + this.groups = groups; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of groups to remove from the selection set. + */ + @JsonProperty("groups") + public List getGroups() { + return groups; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DeleteSynchronizedGroupsRequestContent + && equalTo((DeleteSynchronizedGroupsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(DeleteSynchronizedGroupsRequestContent other) { + return groups.equals(other.groups); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.groups); + } + + @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 groups = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(DeleteSynchronizedGroupsRequestContent other) { + groups(other.getGroups()); + return this; + } + + /** + *

    Array of groups to remove from the selection set.

    + */ + @JsonSetter(value = "groups", nulls = Nulls.SKIP) + public Builder groups(List groups) { + this.groups.clear(); + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public Builder addGroups(SynchronizedGroupSelectionId groups) { + this.groups.add(groups); + return this; + } + + public Builder addAllGroups(List groups) { + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public DeleteSynchronizedGroupsRequestContent build() { + return new DeleteSynchronizedGroupsRequestContent(groups, 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/connections/types/GetConnectionEnabledClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java index 8dd7953d..2622e4a2 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.connections.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private GetConnectionEnabledClientsRequestParameters( /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getTake() { /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getFrom() { return from; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java index 839553d4..675a4cd0 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.connections.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListDirectoryProvisioningsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java index b881a833..30dc3c04 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListScimConfigurationsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.connections.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListScimConfigurationsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java index e25018ab..24870862 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/ListSynchronizedGroupsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.connections.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.JsonIgnore; 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; @@ -26,19 +27,26 @@ public final class ListSynchronizedGroupsRequestParameters { private final OptionalNullable take; + private final OptionalNullable q; + private final Map additionalProperties; private ListSynchronizedGroupsRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { + OptionalNullable from, + OptionalNullable take, + OptionalNullable q, + Map additionalProperties) { this.from = from; this.take = take; + this.q = q; this.additionalProperties = additionalProperties; } /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +57,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +66,36 @@ public OptionalNullable getTake() { return take; } + /** + * @return Query in Lucene query string syntax. Only prefix search on "name" or "email" fields are allowed, with a single wildcard suffix. Operators, modifiers, and groupings are not allowed. Terms are treated as case-insensitive. Example query: "name:engineering*". + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + public OptionalNullable getQ() { + if (q == null) { + return OptionalNullable.absent(); + } + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -70,12 +109,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListSynchronizedGroupsRequestParameters other) { - return from.equals(other.from) && take.equals(other.take); + return from.equals(other.from) && take.equals(other.take) && q.equals(other.q); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take); + return Objects.hash(this.from, this.take, this.q); } @java.lang.Override @@ -93,6 +132,8 @@ public static final class Builder { private OptionalNullable take = OptionalNullable.absent(); + private OptionalNullable q = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -101,6 +142,7 @@ private Builder() {} public Builder from(ListSynchronizedGroupsRequestParameters other) { from(other.getFrom()); take(other.getTake()); + q(other.getQ()); return this; } @@ -172,8 +214,42 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { return this; } + /** + *

    Query in Lucene query string syntax. Only prefix search on "name" or "email" fields are allowed, with a single wildcard suffix. Operators, modifiers, and groupings are not allowed. Terms are treated as case-insensitive. Example query: "name:engineering*".

    + */ + @JsonSetter(value = "q", nulls = Nulls.SKIP) + public Builder q(@Nullable OptionalNullable q) { + this.q = q; + return this; + } + + public Builder q(String q) { + this.q = OptionalNullable.of(q); + return this; + } + + public Builder q(Optional q) { + if (q.isPresent()) { + this.q = OptionalNullable.of(q.get()); + } else { + this.q = OptionalNullable.absent(); + } + return this; + } + + public Builder q(com.auth0.client.mgmt.core.Nullable q) { + if (q.isNull()) { + this.q = OptionalNullable.ofNull(); + } else if (q.isEmpty()) { + this.q = OptionalNullable.absent(); + } else { + this.q = OptionalNullable.of(q.get()); + } + return this; + } + public ListSynchronizedGroupsRequestParameters build() { - return new ListSynchronizedGroupsRequestParameters(from, take, additionalProperties); + return new ListSynchronizedGroupsRequestParameters(from, take, q, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/connections/types/UpdateScimConfigurationRequestContent.java b/src/main/java/com/auth0/client/mgmt/connections/types/UpdateScimConfigurationRequestContent.java index a7dfe6aa..a941db60 100644 --- a/src/main/java/com/auth0/client/mgmt/connections/types/UpdateScimConfigurationRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/connections/types/UpdateScimConfigurationRequestContent.java @@ -127,7 +127,6 @@ public Builder from(UpdateScimConfigurationRequestContent other) { } /** - *

    User ID attribute for generating unique user ids

    *

    User ID attribute for generating unique user ids

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java b/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java index 82886a4b..a8d1357a 100644 --- a/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java +++ b/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java @@ -27,26 +27,31 @@ public final class ClientOptions { private final int maxRetries; + private final Telemetry telemetry; + private ClientOptions( Environment environment, Map headers, Map> headerSuppliers, OkHttpClient httpClient, int timeout, - int maxRetries) { + int maxRetries, + Telemetry telemetry) { this.environment = environment; this.headers = new HashMap<>(); this.headers.putAll(headers); - Telemetry telemetry = - new Telemetry("auth0-java", Telemetry.class.getPackage().getImplementationVersion()); - if (telemetry.getValue() != null) { - this.headers.put("Auth0-Client", telemetry.getValue()); + Telemetry resolvedTelemetry = telemetry != null + ? telemetry + : new Telemetry("auth0-java", Telemetry.class.getPackage().getImplementationVersion()); + if (resolvedTelemetry.getValue() != null) { + this.headers.put("Auth0-Client", resolvedTelemetry.getValue()); } this.headerSuppliers = headerSuppliers; this.httpClient = httpClient; this.timeout = timeout; this.maxRetries = maxRetries; + this.telemetry = telemetry; } public Environment environment() { @@ -92,6 +97,32 @@ public int maxRetries() { return this.maxRetries; } + /** + * The telemetry explicitly configured on this instance, or {@code null} if it was left to + * default to {@code auth0-java}. Package-private so {@link Builder#from(ClientOptions)} can + * carry it over; not part of the public API. + */ + Telemetry telemetry() { + return this.telemetry; + } + + /** + * The static headers configured on this instance, including the resolved {@code Auth0-Client} + * header. Package-private so {@link Builder#from(ClientOptions)} can carry them over; not part + * of the public API. + */ + Map headers() { + return this.headers; + } + + /** + * The dynamic header suppliers configured on this instance. Package-private so + * {@link Builder#from(ClientOptions)} can carry them over; not part of the public API. + */ + Map> headerSuppliers() { + return this.headerSuppliers; + } + public static Builder builder() { return new Builder(); } @@ -113,6 +144,8 @@ public static class Builder { private LogConfig logging = null; + private Telemetry telemetry = null; + public Builder environment(Environment environment) { this.environment = environment; return this; @@ -173,6 +206,17 @@ public Builder addInterceptor(Interceptor interceptor) { return this; } + /** + * Internal plumbing. Sets the pre-built {@link Telemetry} used for the {@code Auth0-Client} + * header. Prefer {@link com.auth0.client.mgmt.ManagementApiBuilder#withTelemetry(String, String)}, + * which constructs the telemetry with the correct auth0-java version. Passing a hand-built + * {@link Telemetry} here bypasses that and is not a supported way to identify a wrapping SDK. + */ + public Builder telemetry(Telemetry telemetry) { + this.telemetry = telemetry; + return this; + } + public ClientOptions build() { OkHttpClient.Builder httpClientBuilder = this.httpClient != null ? this.httpClient.newBuilder() : new OkHttpClient.Builder(); @@ -205,17 +249,32 @@ public ClientOptions build() { this.timeout = Optional.of(httpClient.callTimeoutMillis() / 1000); return new ClientOptions( - environment, headers, headerSuppliers, httpClient, this.timeout.get(), this.maxRetries); + environment, + headers, + headerSuppliers, + httpClient, + this.timeout.get(), + this.maxRetries, + this.telemetry); } /** - * Create a new Builder initialized with values from an existing ClientOptions + * Create a new Builder initialized with values from an existing ClientOptions. + * + *

    Interceptors and logging are not copied explicitly: they are already baked into the + * {@link OkHttpClient} carried over here, and {@link #build()} preserves them via + * {@code newBuilder()}. Copying them would attach them a second time. The same applies to + * the retry interceptor, hence {@code maxRetries} is carried over for reporting only. */ public static Builder from(ClientOptions clientOptions) { Builder builder = new Builder(); builder.environment = clientOptions.environment(); builder.timeout = Optional.of(clientOptions.timeout(null)); builder.httpClient = clientOptions.httpClient(); + builder.maxRetries = clientOptions.maxRetries(); + builder.telemetry = clientOptions.telemetry(); + builder.headers.putAll(clientOptions.headers()); + builder.headerSuppliers.putAll(clientOptions.headerSuppliers()); return builder; } } diff --git a/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java b/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java index bee37368..ee204b30 100644 --- a/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java +++ b/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java @@ -14,11 +14,13 @@ import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalQueries; /** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. + * Custom deserializer that handles converting date-time strings into {@link OffsetDateTime} objects. + * Supports ISO 8601 format, space-separated variants, and RFC 1123 (RFC 2822) format. */ class DateTimeDeserializer extends JsonDeserializer { private static final SimpleModule MODULE; @@ -42,8 +44,21 @@ public OffsetDateTime deserialize(JsonParser parser, DeserializationContext cont if (token == JsonToken.VALUE_NUMBER_INT) { return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); } else { - TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); + String value = parser.getValueAsString(); + TemporalAccessor temporal; + try { + temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(value, OffsetDateTime::from, LocalDateTime::from); + } catch (DateTimeParseException e) { + try { + // Fall back to space-separated format (e.g. "2025-02-15 10:30:00+00:00"). + temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( + value.replace(' ', 'T'), OffsetDateTime::from, LocalDateTime::from); + } catch (DateTimeParseException e2) { + // Fall back to RFC 1123 format (e.g. "Thu, 07 May 2026 14:23:38 +0000"). + temporal = DateTimeFormatter.RFC_1123_DATE_TIME.parseBest( + value, OffsetDateTime::from, LocalDateTime::from); + } + } if (temporal.query(TemporalQueries.offset()) == null) { return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); diff --git a/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java b/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java index f83ded99..5a2e2d42 100644 --- a/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java +++ b/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java @@ -19,6 +19,8 @@ public final class RequestOptions { private final TimeUnit timeoutTimeUnit; + private final Optional maxRetries; + private final Map headers; private final Map> headerSuppliers; @@ -43,6 +45,7 @@ private RequestOptions( String token, Optional timeout, TimeUnit timeoutTimeUnit, + Optional maxRetries, Map headers, Map> headerSuppliers, Map queryParameters, @@ -54,6 +57,7 @@ private RequestOptions( this.token = token; this.timeout = timeout; this.timeoutTimeUnit = timeoutTimeUnit; + this.maxRetries = maxRetries; this.headers = headers; this.headerSuppliers = headerSuppliers; this.queryParameters = queryParameters; @@ -72,6 +76,10 @@ public TimeUnit getTimeoutTimeUnit() { return timeoutTimeUnit; } + public Optional getMaxRetries() { + return maxRetries; + } + /** * Returns the client ID for per-request OAuth credentials, if set. */ @@ -158,6 +166,8 @@ public static class Builder { private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; + private Optional maxRetries = Optional.empty(); + private final Map headers = new HashMap<>(); private final Map> headerSuppliers = new HashMap<>(); @@ -238,6 +248,11 @@ public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { return this; } + public Builder maxRetries(Integer maxRetries) { + this.maxRetries = Optional.of(maxRetries); + return this; + } + public Builder addHeader(String key, String value) { this.headers.put(key, value); return this; @@ -263,6 +278,7 @@ public RequestOptions build() { token, timeout, timeoutTimeUnit, + maxRetries, headers, headerSuppliers, queryParameters, diff --git a/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java b/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java index 6e198cff..aa5a7413 100644 --- a/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java +++ b/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java @@ -11,6 +11,7 @@ import java.util.Optional; import java.util.Random; import okhttp3.Interceptor; +import okhttp3.Request; import okhttp3.Response; public class RetryInterceptor implements Interceptor { @@ -28,17 +29,24 @@ public RetryInterceptor(int maxRetries) { @Override public Response intercept(Chain chain) throws IOException { - Response response = chain.proceed(chain.request()); + Request request = chain.request(); + int effectiveMaxRetries = resolveMaxRetries(request); + Response response = chain.proceed(request); if (shouldRetry(response.code())) { - return retryChain(response, chain); + return retryChain(response, chain, effectiveMaxRetries); } return response; } - private Response retryChain(Response response, Chain chain) throws IOException { - ExponentialBackoff backoff = new ExponentialBackoff(this.maxRetries); + private int resolveMaxRetries(Request request) { + MaxRetriesOverride override = request.tag(MaxRetriesOverride.class); + return override != null ? override.getValue() : this.maxRetries; + } + + private Response retryChain(Response response, Chain chain, int maxRetries) throws IOException { + ExponentialBackoff backoff = new ExponentialBackoff(maxRetries); Optional nextBackoff = backoff.nextBackoff(response); while (nextBackoff.isPresent()) { try { @@ -158,6 +166,23 @@ private static boolean shouldRetry(int statusCode) { return statusCode == 408 || statusCode == 429 || statusCode >= 500; } + /** + * Per-request override carried on the OkHttp {@link Request} as a tag. + * When present, the interceptor uses this value instead of the client-wide + * {@code maxRetries} configured at construction time. + */ + public static final class MaxRetriesOverride { + private final int value; + + public MaxRetriesOverride(int value) { + this.value = value; + } + + public int getValue() { + return value; + } + } + private final class ExponentialBackoff { private final int maxNumRetries; diff --git a/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java b/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java index 88c650c8..ed22deb6 100644 --- a/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java +++ b/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.emails.types.CreateEmailProviderRequestContent; import com.auth0.client.mgmt.emails.types.GetEmailProviderRequestParameters; import com.auth0.client.mgmt.emails.types.UpdateEmailProviderRequestContent; @@ -98,6 +99,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -147,6 +157,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -255,6 +268,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -304,6 +326,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -346,6 +371,15 @@ public CompletableFuture> delete(RequestOptions 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 @@ -391,6 +425,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -574,6 +611,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -628,6 +674,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java b/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java index bc05ce56..73d40acd 100644 --- a/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java +++ b/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.emails.types.CreateEmailProviderRequestContent; import com.auth0.client.mgmt.emails.types.GetEmailProviderRequestParameters; import com.auth0.client.mgmt.emails.types.UpdateEmailProviderRequestContent; @@ -92,6 +93,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -124,6 +134,8 @@ public ManagementApiHttpResponse get( 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); } @@ -224,6 +236,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -257,6 +278,8 @@ public ManagementApiHttpResponse create( 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); } @@ -291,6 +314,15 @@ public ManagementApiHttpResponse delete(RequestOptions requestOptions) { if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -321,6 +353,8 @@ public ManagementApiHttpResponse delete(RequestOptions requestOptions) { 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); } @@ -495,6 +529,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -531,6 +574,8 @@ public ManagementApiHttpResponse update( 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/emails/types/CreateEmailProviderRequestContent.java b/src/main/java/com/auth0/client/mgmt/emails/types/CreateEmailProviderRequestContent.java index a85a6a9e..703d4fc3 100644 --- a/src/main/java/com/auth0/client/mgmt/emails/types/CreateEmailProviderRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/emails/types/CreateEmailProviderRequestContent.java @@ -32,7 +32,7 @@ public final class CreateEmailProviderRequestContent { private final Optional defaultFromAddress; - private final EmailProviderCredentialsSchema credentials; + private final Optional credentials; private final OptionalNullable> settings; @@ -42,7 +42,7 @@ private CreateEmailProviderRequestContent( EmailProviderNameEnum name, Optional enabled, Optional defaultFromAddress, - EmailProviderCredentialsSchema credentials, + Optional credentials, OptionalNullable> settings, Map additionalProperties) { this.name = name; @@ -75,7 +75,7 @@ public Optional getDefaultFromAddress() { } @JsonProperty("credentials") - public EmailProviderCredentialsSchema getCredentials() { + public Optional getCredentials() { return credentials; } @@ -128,15 +128,11 @@ public static NameStage builder() { } public interface NameStage { - CredentialsStage name(@NotNull EmailProviderNameEnum name); + _FinalStage name(@NotNull EmailProviderNameEnum name); Builder from(CreateEmailProviderRequestContent other); } - public interface CredentialsStage { - _FinalStage credentials(@NotNull EmailProviderCredentialsSchema credentials); - } - public interface _FinalStage { CreateEmailProviderRequestContent build(); @@ -158,6 +154,10 @@ public interface _FinalStage { _FinalStage defaultFromAddress(String defaultFromAddress); + _FinalStage credentials(Optional credentials); + + _FinalStage credentials(EmailProviderCredentialsSchema credentials); + _FinalStage settings(@Nullable OptionalNullable> settings); _FinalStage settings(Map settings); @@ -168,13 +168,13 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, CredentialsStage, _FinalStage { + public static final class Builder implements NameStage, _FinalStage { private EmailProviderNameEnum name; - private EmailProviderCredentialsSchema credentials; - private OptionalNullable> settings = OptionalNullable.absent(); + private Optional credentials = Optional.empty(); + private Optional defaultFromAddress = Optional.empty(); private Optional enabled = Optional.empty(); @@ -196,18 +196,11 @@ public Builder from(CreateEmailProviderRequestContent other) { @java.lang.Override @JsonSetter("name") - public CredentialsStage name(@NotNull EmailProviderNameEnum name) { + public _FinalStage name(@NotNull EmailProviderNameEnum name) { this.name = Objects.requireNonNull(name, "name must not be null"); return this; } - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials(@NotNull EmailProviderCredentialsSchema credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - @java.lang.Override public _FinalStage settings(com.auth0.client.mgmt.core.Nullable> settings) { if (settings.isNull()) { @@ -243,6 +236,19 @@ public _FinalStage settings(@Nullable OptionalNullable> sett return this; } + @java.lang.Override + public _FinalStage credentials(EmailProviderCredentialsSchema credentials) { + this.credentials = Optional.ofNullable(credentials); + return this; + } + + @java.lang.Override + @JsonSetter(value = "credentials", nulls = Nulls.SKIP) + public _FinalStage credentials(Optional credentials) { + this.credentials = credentials; + return this; + } + /** *

    Email address to use as "from" when no other address specified.

    * @return Reference to {@code this} so that method calls can be chained together. diff --git a/src/main/java/com/auth0/client/mgmt/emails/types/GetEmailProviderRequestParameters.java b/src/main/java/com/auth0/client/mgmt/emails/types/GetEmailProviderRequestParameters.java index 3c81c4d5..35eec142 100644 --- a/src/main/java/com/auth0/client/mgmt/emails/types/GetEmailProviderRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/emails/types/GetEmailProviderRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.emails.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetEmailProviderRequestParameters( /** * @return Comma-separated list of fields to include or exclude (dependent upon include_fields) from the result. Leave empty to retrieve name and enabled. Additional fields available include credentials, default_from_address, and settings. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/errors/GatewayTimeoutError.java b/src/main/java/com/auth0/client/mgmt/errors/GatewayTimeoutError.java new file mode 100644 index 00000000..3cdcca81 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/errors/GatewayTimeoutError.java @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.errors; + +import com.auth0.client.mgmt.core.ManagementApiException; +import okhttp3.Response; + +public final class GatewayTimeoutError extends ManagementApiException { + /** + * The body of the response that triggered the exception. + */ + private final Object body; + + public GatewayTimeoutError(Object body) { + super("GatewayTimeoutError", 504, body); + this.body = body; + } + + public GatewayTimeoutError(Object body, Response rawResponse) { + super("GatewayTimeoutError", 504, body, rawResponse); + this.body = body; + } + + /** + * @return the body + */ + @java.lang.Override + public Object body() { + return this.body; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/errors/UnprocessableEntityError.java b/src/main/java/com/auth0/client/mgmt/errors/UnprocessableEntityError.java new file mode 100644 index 00000000..9491be2e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/errors/UnprocessableEntityError.java @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.errors; + +import com.auth0.client.mgmt.core.ManagementApiException; +import okhttp3.Response; + +public final class UnprocessableEntityError extends ManagementApiException { + /** + * The body of the response that triggered the exception. + */ + private final Object body; + + public UnprocessableEntityError(Object body) { + super("UnprocessableEntityError", 422, body); + this.body = body; + } + + public UnprocessableEntityError(Object body, Response rawResponse) { + super("UnprocessableEntityError", 422, body, rawResponse); + this.body = body; + } + + /** + * @return the body + */ + @java.lang.Override + public Object body() { + return this.body; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncDeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncDeliveriesClient.java index a90f8678..cc355810 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncDeliveriesClient.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncDeliveriesClient.java @@ -5,10 +5,10 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.eventstreams.types.ListEventStreamDeliveriesRequestParameters; import com.auth0.client.mgmt.types.EventStreamDelivery; import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; -import java.util.List; import java.util.concurrent.CompletableFuture; public class AsyncDeliveriesClient { @@ -28,20 +28,20 @@ public AsyncRawDeliveriesClient withRawResponse() { return this.rawClient; } - public CompletableFuture> list(String id) { + public CompletableFuture> list(String id) { return this.rawClient.list(id).thenApply(response -> response.body()); } - public CompletableFuture> list(String id, RequestOptions requestOptions) { + public CompletableFuture> list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture> list( + public CompletableFuture> list( String id, ListEventStreamDeliveriesRequestParameters request) { return this.rawClient.list(id, request).thenApply(response -> response.body()); } - public CompletableFuture> list( + public CompletableFuture> list( String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); } diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawDeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawDeliveriesClient.java index 3a8ce9ff..4ccb8016 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawDeliveriesClient.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawDeliveriesClient.java @@ -10,6 +10,8 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -18,11 +20,13 @@ import com.auth0.client.mgmt.eventstreams.types.ListEventStreamDeliveriesRequestParameters; import com.auth0.client.mgmt.types.EventStreamDelivery; import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; +import com.auth0.client.mgmt.types.ListEventStreamDeliveriesResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Headers; @@ -40,21 +44,21 @@ public AsyncRawDeliveriesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public CompletableFuture>> list(String id) { + public CompletableFuture>> list(String id) { return list(id, ListEventStreamDeliveriesRequestParameters.builder().build()); } - public CompletableFuture>> list( + public CompletableFuture>> list( String id, RequestOptions requestOptions) { return list(id, ListEventStreamDeliveriesRequestParameters.builder().build(), requestOptions); } - public CompletableFuture>> list( + public CompletableFuture>> list( String id, ListEventStreamDeliveriesRequestParameters request) { return list(id, request, null); } - public CompletableFuture>> list( + public CompletableFuture>> list( String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -97,16 +101,43 @@ public CompletableFuture>> l if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - CompletableFuture>> future = new CompletableFuture<>(); + 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()) { + ListEventStreamDeliveriesResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListEventStreamDeliveriesResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListEventStreamDeliveriesRequestParameters nextRequest = + ListEventStreamDeliveriesRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getDeliveries(); future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(id, nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), response)); return; } @@ -145,6 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -186,6 +220,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -230,6 +273,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawRedeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawRedeliveriesClient.java index a4c20b19..23d3c175 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawRedeliveriesClient.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawRedeliveriesClient.java @@ -10,6 +10,7 @@ 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.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -82,6 +83,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -131,6 +141,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -171,6 +184,15 @@ public CompletableFuture> createById( 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 @@ -216,6 +238,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java index 0d9b4e87..fa05c66a 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java @@ -5,10 +5,10 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.eventstreams.types.ListEventStreamDeliveriesRequestParameters; import com.auth0.client.mgmt.types.EventStreamDelivery; import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; -import java.util.List; public class DeliveriesClient { protected final ClientOptions clientOptions; @@ -27,19 +27,19 @@ public RawDeliveriesClient withRawResponse() { return this.rawClient; } - public List list(String id) { + public SyncPagingIterable list(String id) { return this.rawClient.list(id).body(); } - public List list(String id, RequestOptions requestOptions) { + public SyncPagingIterable list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).body(); } - public List list(String id, ListEventStreamDeliveriesRequestParameters request) { + public SyncPagingIterable list(String id, ListEventStreamDeliveriesRequestParameters request) { return this.rawClient.list(id, request).body(); } - public List list( + public SyncPagingIterable list( String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { return this.rawClient.list(id, request, requestOptions).body(); } diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/RawDeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/RawDeliveriesClient.java index e897dad0..9276a536 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/RawDeliveriesClient.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/RawDeliveriesClient.java @@ -10,6 +10,8 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -18,10 +20,11 @@ import com.auth0.client.mgmt.eventstreams.types.ListEventStreamDeliveriesRequestParameters; import com.auth0.client.mgmt.types.EventStreamDelivery; import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; +import com.auth0.client.mgmt.types.ListEventStreamDeliveriesResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.List; +import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -36,20 +39,21 @@ public RawDeliveriesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public ManagementApiHttpResponse> list(String id) { + public ManagementApiHttpResponse> list(String id) { return list(id, ListEventStreamDeliveriesRequestParameters.builder().build()); } - public ManagementApiHttpResponse> list(String id, RequestOptions requestOptions) { + public ManagementApiHttpResponse> list( + String id, RequestOptions requestOptions) { return list(id, ListEventStreamDeliveriesRequestParameters.builder().build(), requestOptions); } - public ManagementApiHttpResponse> list( + public ManagementApiHttpResponse> list( String id, ListEventStreamDeliveriesRequestParameters request) { return list(id, request, null); } - public ManagementApiHttpResponse> list( + public ManagementApiHttpResponse> list( String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -92,13 +96,33 @@ public ManagementApiHttpResponse> list( 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()) { + ListEventStreamDeliveriesResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListEventStreamDeliveriesResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListEventStreamDeliveriesRequestParameters nextRequest = + ListEventStreamDeliveriesRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getDeliveries(); return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + id, nextRequest, requestOptions) + .body()), response); } try { @@ -125,6 +149,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -158,6 +184,15 @@ public ManagementApiHttpResponse g 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() : "{}"; @@ -188,6 +223,8 @@ public ManagementApiHttpResponse g 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/eventstreams/RawRedeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/RawRedeliveriesClient.java index a26608a9..146d0d6b 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/RawRedeliveriesClient.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/RawRedeliveriesClient.java @@ -10,6 +10,7 @@ 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.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -78,6 +79,15 @@ public ManagementApiHttpResponse cre 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() : "{}"; @@ -111,6 +121,8 @@ public ManagementApiHttpResponse cre 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); } @@ -142,6 +154,15 @@ public ManagementApiHttpResponse createById(String id, String eventId, Req if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -172,6 +193,8 @@ public ManagementApiHttpResponse createById(String id, String eventId, Req 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/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java index b34bbe28..149afec5 100644 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.eventstreams.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.JsonIgnore; 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; @@ -56,7 +57,8 @@ private ListEventStreamDeliveriesRequestParameters( /** * @return Comma-separated list of statuses by which to filter */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("statuses") public OptionalNullable getStatuses() { if (statuses == null) { return OptionalNullable.absent(); @@ -67,7 +69,8 @@ public OptionalNullable getStatuses() { /** * @return Comma-separated list of event types by which to filter */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("event_types") public OptionalNullable getEventTypes() { if (eventTypes == null) { return OptionalNullable.absent(); @@ -78,7 +81,8 @@ public OptionalNullable getEventTypes() { /** * @return An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("date_from") public OptionalNullable getDateFrom() { if (dateFrom == null) { return OptionalNullable.absent(); @@ -89,7 +93,8 @@ public OptionalNullable getDateFrom() { /** * @return An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("date_to") public OptionalNullable getDateTo() { if (dateTo == null) { return OptionalNullable.absent(); @@ -100,7 +105,8 @@ public OptionalNullable getDateTo() { /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -111,7 +117,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -119,6 +126,42 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("statuses") + private OptionalNullable _getStatuses() { + return statuses; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("event_types") + private OptionalNullable _getEventTypes() { + return eventTypes; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("date_from") + private OptionalNullable _getDateFrom() { + return dateFrom; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("date_to") + private OptionalNullable _getDateTo() { + return dateTo; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/AsyncExperimentationClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncExperimentationClient.java new file mode 100644 index 00000000..82bad5c1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncExperimentationClient.java @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.Suppliers; +import java.util.function.Supplier; + +public class AsyncExperimentationClient { + protected final ClientOptions clientOptions; + + protected final Supplier experimentsClient; + + protected final Supplier featureFlagsClient; + + protected final Supplier segmentsClient; + + public AsyncExperimentationClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.experimentsClient = Suppliers.memoize(() -> new AsyncExperimentsClient(clientOptions)); + this.featureFlagsClient = Suppliers.memoize(() -> new AsyncFeatureFlagsClient(clientOptions)); + this.segmentsClient = Suppliers.memoize(() -> new AsyncSegmentsClient(clientOptions)); + } + + public AsyncExperimentsClient experiments() { + return this.experimentsClient.get(); + } + + public AsyncFeatureFlagsClient featureFlags() { + return this.featureFlagsClient.get(); + } + + public AsyncSegmentsClient segments() { + return this.segmentsClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/AsyncExperimentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncExperimentsClient.java new file mode 100644 index 00000000..bcd4fc34 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncExperimentsClient.java @@ -0,0 +1,168 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.AdvanceRampRequestContent; +import com.auth0.client.mgmt.experimentation.types.CreateExperimentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListExperimentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters; +import com.auth0.client.mgmt.types.AdvanceRampResponseContent; +import com.auth0.client.mgmt.types.CreateExperimentResponseContent; +import com.auth0.client.mgmt.types.ExperimentListItem; +import com.auth0.client.mgmt.types.GetExperimentResponseContent; +import com.auth0.client.mgmt.types.UpdateExperimentResponseContent; +import com.auth0.client.mgmt.types.ValidateExperimentResponseContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncExperimentsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawExperimentsClient rawClient; + + public AsyncExperimentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawExperimentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawExperimentsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture> list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture> list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture> list(ListExperimentsRequestParameters request) { + return this.rawClient.list(request).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture> list( + ListExperimentsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Create a new experiment for A/B testing. + */ + public CompletableFuture create(CreateExperimentRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Create a new experiment for A/B testing. + */ + public CompletableFuture create( + CreateExperimentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a single experiment with its allocations by ID. + */ + public CompletableFuture get(String id) { + return this.rawClient.get(id).thenApply(response -> response.body()); + } + + /** + * Retrieve a single experiment with its allocations by ID. + */ + public CompletableFuture get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture update(String id) { + return this.rawClient.update(id).thenApply(response -> response.body()); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture update( + String id, UpdateExperimentRequestParameters request) { + return this.rawClient.update(id, request).thenApply(response -> response.body()); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture update( + String id, UpdateExperimentRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public CompletableFuture advanceRamp(String id, AdvanceRampRequestContent request) { + return this.rawClient.advanceRamp(id, request).thenApply(response -> response.body()); + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public CompletableFuture advanceRamp( + String id, AdvanceRampRequestContent request, RequestOptions requestOptions) { + return this.rawClient.advanceRamp(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public CompletableFuture validate(String id) { + return this.rawClient.validate(id).thenApply(response -> response.body()); + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public CompletableFuture validate(String id, RequestOptions requestOptions) { + return this.rawClient.validate(id, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/AsyncFeatureFlagsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncFeatureFlagsClient.java new file mode 100644 index 00000000..c5a2c324 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncFeatureFlagsClient.java @@ -0,0 +1,146 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.Suppliers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.featureflags.AsyncVariationsClient; +import com.auth0.client.mgmt.experimentation.types.CreateFeatureFlagRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListFeatureFlagsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateFeatureFlagRequestContent; +import com.auth0.client.mgmt.types.CreateFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.FeatureFlag; +import com.auth0.client.mgmt.types.GetFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.UpdateFeatureFlagResponseContent; +import java.util.concurrent.CompletableFuture; +import java.util.function.Supplier; + +public class AsyncFeatureFlagsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawFeatureFlagsClient rawClient; + + protected final Supplier variationsClient; + + public AsyncFeatureFlagsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawFeatureFlagsClient(clientOptions); + this.variationsClient = Suppliers.memoize(() -> new AsyncVariationsClient(clientOptions)); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawFeatureFlagsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture> list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture> list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture> list(ListFeatureFlagsRequestParameters request) { + return this.rawClient.list(request).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture> list( + ListFeatureFlagsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public CompletableFuture create(CreateFeatureFlagRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public CompletableFuture create( + CreateFeatureFlagRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a single feature flag by its ID. + */ + public CompletableFuture get(String id) { + return this.rawClient.get(id).thenApply(response -> response.body()); + } + + /** + * Retrieve a single feature flag by its ID. + */ + public CompletableFuture get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture update(String id) { + return this.rawClient.update(id).thenApply(response -> response.body()); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture update( + String id, UpdateFeatureFlagRequestContent request) { + return this.rawClient.update(id, request).thenApply(response -> response.body()); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture update( + String id, UpdateFeatureFlagRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); + } + + public AsyncVariationsClient variations() { + return this.variationsClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawExperimentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawExperimentsClient.java new file mode 100644 index 00000000..6a29349a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawExperimentsClient.java @@ -0,0 +1,879 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.errors.UnprocessableEntityError; +import com.auth0.client.mgmt.experimentation.types.AdvanceRampRequestContent; +import com.auth0.client.mgmt.experimentation.types.CreateExperimentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListExperimentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters; +import com.auth0.client.mgmt.types.AdvanceRampResponseContent; +import com.auth0.client.mgmt.types.CreateExperimentResponseContent; +import com.auth0.client.mgmt.types.ExperimentListItem; +import com.auth0.client.mgmt.types.GetExperimentResponseContent; +import com.auth0.client.mgmt.types.ListExperimentsResponseContent; +import com.auth0.client.mgmt.types.UpdateExperimentResponseContent; +import com.auth0.client.mgmt.types.ValidateExperimentResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawExperimentsClient { + protected final ClientOptions clientOptions; + + public AsyncRawExperimentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture>> list() { + return list(ListExperimentsRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture>> list( + RequestOptions requestOptions) { + return list(ListExperimentsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture>> list( + ListExperimentsRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public CompletableFuture>> list( + ListExperimentsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getStatus().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "status", request.getStatus().orElse(null), false); + } + if (!request.getAuthenticationFlow().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "authentication_flow", + request.getAuthenticationFlow().orElse(null), + false); + } + if (!request.getFeatureFlagId().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "feature_flag_id", request.getFeatureFlagId().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListExperimentsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListExperimentsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListExperimentsRequestParameters nextRequest = ListExperimentsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getExperiments(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Create a new experiment for A/B testing. + */ + public CompletableFuture> create( + CreateExperimentRequestContent request) { + return create(request, null); + } + + /** + * Create a new experiment for A/B testing. + */ + public CompletableFuture> create( + CreateExperimentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments"); + 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, CreateExperimentResponseContent.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 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 422: + future.completeExceptionally(new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + 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 single experiment with its allocations by ID. + */ + public CompletableFuture> get(String id) { + return get(id, null); + } + + /** + * Retrieve a single experiment with its allocations by ID. + */ + public CompletableFuture> get( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .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, GetExperimentResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture> update(String id) { + return update(id, UpdateExperimentRequestParameters.builder().build()); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture> update( + String id, RequestOptions requestOptions) { + return update(id, UpdateExperimentRequestParameters.builder().build(), requestOptions); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture> update( + String id, UpdateExperimentRequestParameters request) { + return update(id, request, null); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public CompletableFuture> update( + String id, UpdateExperimentRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateExperimentResponseContent.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 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 422: + future.completeExceptionally(new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + 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; + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public CompletableFuture> advanceRamp( + String id, AdvanceRampRequestContent request) { + return advanceRamp(id, request, null); + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public CompletableFuture> advanceRamp( + String id, AdvanceRampRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id) + .addPathSegments("advance-ramp"); + 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, AdvanceRampResponseContent.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 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; + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public CompletableFuture> validate(String id) { + return validate(id, null); + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public CompletableFuture> validate( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id) + .addPathSegments("validate"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", RequestBody.create("", null)) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ValidateExperimentResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawFeatureFlagsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawFeatureFlagsClient.java new file mode 100644 index 00000000..b81e3fc5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawFeatureFlagsClient.java @@ -0,0 +1,633 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.experimentation.types.CreateFeatureFlagRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListFeatureFlagsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateFeatureFlagRequestContent; +import com.auth0.client.mgmt.types.CreateFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.FeatureFlag; +import com.auth0.client.mgmt.types.GetFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.ListFeatureFlagsResponseContent; +import com.auth0.client.mgmt.types.UpdateFeatureFlagResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawFeatureFlagsClient { + protected final ClientOptions clientOptions; + + public AsyncRawFeatureFlagsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture>> list() { + return list(ListFeatureFlagsRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture>> list( + RequestOptions requestOptions) { + return list(ListFeatureFlagsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture>> list( + ListFeatureFlagsRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public CompletableFuture>> list( + ListFeatureFlagsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "type", request.getType().orElse(null), false); + } + if (!request.getStatus().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "status", request.getStatus().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListFeatureFlagsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListFeatureFlagsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListFeatureFlagsRequestParameters nextRequest = ListFeatureFlagsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getFeatureFlags(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public CompletableFuture> create( + CreateFeatureFlagRequestContent request) { + return create(request, null); + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public CompletableFuture> create( + CreateFeatureFlagRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags"); + 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, CreateFeatureFlagResponseContent.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 single feature flag by its ID. + */ + public CompletableFuture> get(String id) { + return get(id, null); + } + + /** + * Retrieve a single feature flag by its ID. + */ + public CompletableFuture> get( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .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, GetFeatureFlagResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 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; + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture> update(String id) { + return update(id, UpdateFeatureFlagRequestContent.builder().build()); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture> update( + String id, RequestOptions requestOptions) { + return update(id, UpdateFeatureFlagRequestContent.builder().build(), requestOptions); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture> update( + String id, UpdateFeatureFlagRequestContent request) { + return update(id, request, null); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public CompletableFuture> update( + String id, UpdateFeatureFlagRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateFeatureFlagResponseContent.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 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawSegmentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawSegmentsClient.java new file mode 100644 index 00000000..8eadc0c5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncRawSegmentsClient.java @@ -0,0 +1,641 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.errors.UnprocessableEntityError; +import com.auth0.client.mgmt.experimentation.types.CreateSegmentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateSegmentRequestContent; +import com.auth0.client.mgmt.types.CreateSegmentResponseContent; +import com.auth0.client.mgmt.types.GetSegmentResponseContent; +import com.auth0.client.mgmt.types.ListSegmentsResponseContent; +import com.auth0.client.mgmt.types.Segment; +import com.auth0.client.mgmt.types.UpdateSegmentResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawSegmentsClient { + protected final ClientOptions clientOptions; + + public AsyncRawSegmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture>> list() { + return list(ListSegmentsRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture>> list( + RequestOptions requestOptions) { + return list(ListSegmentsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture>> list( + ListSegmentsRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture>> list( + ListSegmentsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "type", request.getType().orElse(null), false); + } + if (!request.getStatus().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "status", request.getStatus().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListSegmentsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListSegmentsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListSegmentsRequestParameters nextRequest = ListSegmentsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getSegments(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public CompletableFuture> create( + CreateSegmentRequestContent request) { + return create(request, null); + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public CompletableFuture> create( + CreateSegmentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments"); + 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, CreateSegmentResponseContent.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 422: + future.completeExceptionally(new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + 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 single segment by its ID. + */ + public CompletableFuture> get(String id) { + return get(id, null); + } + + /** + * Retrieve a single segment by its ID. + */ + public CompletableFuture> get( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments") + .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, GetSegmentResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 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; + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture> update(String id) { + return update(id, UpdateSegmentRequestContent.builder().build()); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture> update( + String id, RequestOptions requestOptions) { + return update(id, UpdateSegmentRequestContent.builder().build(), requestOptions); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture> update( + String id, UpdateSegmentRequestContent request) { + return update(id, request, null); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture> update( + String id, UpdateSegmentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateSegmentResponseContent.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 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 422: + future.completeExceptionally(new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + 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/experimentation/AsyncSegmentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncSegmentsClient.java new file mode 100644 index 00000000..498ca308 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/AsyncSegmentsClient.java @@ -0,0 +1,135 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.CreateSegmentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateSegmentRequestContent; +import com.auth0.client.mgmt.types.CreateSegmentResponseContent; +import com.auth0.client.mgmt.types.GetSegmentResponseContent; +import com.auth0.client.mgmt.types.Segment; +import com.auth0.client.mgmt.types.UpdateSegmentResponseContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncSegmentsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawSegmentsClient rawClient; + + public AsyncSegmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawSegmentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawSegmentsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture> list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture> list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture> list(ListSegmentsRequestParameters request) { + return this.rawClient.list(request).thenApply(response -> response.body()); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public CompletableFuture> list( + ListSegmentsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public CompletableFuture create(CreateSegmentRequestContent request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public CompletableFuture create( + CreateSegmentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a single segment by its ID. + */ + public CompletableFuture get(String id) { + return this.rawClient.get(id).thenApply(response -> response.body()); + } + + /** + * Retrieve a single segment by its ID. + */ + public CompletableFuture get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture update(String id) { + return this.rawClient.update(id).thenApply(response -> response.body()); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture update(String id, UpdateSegmentRequestContent request) { + return this.rawClient.update(id, request).thenApply(response -> response.body()); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public CompletableFuture update( + String id, UpdateSegmentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/ExperimentationClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/ExperimentationClient.java new file mode 100644 index 00000000..c4f69062 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/ExperimentationClient.java @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.Suppliers; +import java.util.function.Supplier; + +public class ExperimentationClient { + protected final ClientOptions clientOptions; + + protected final Supplier experimentsClient; + + protected final Supplier featureFlagsClient; + + protected final Supplier segmentsClient; + + public ExperimentationClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.experimentsClient = Suppliers.memoize(() -> new ExperimentsClient(clientOptions)); + this.featureFlagsClient = Suppliers.memoize(() -> new FeatureFlagsClient(clientOptions)); + this.segmentsClient = Suppliers.memoize(() -> new SegmentsClient(clientOptions)); + } + + public ExperimentsClient experiments() { + return this.experimentsClient.get(); + } + + public FeatureFlagsClient featureFlags() { + return this.featureFlagsClient.get(); + } + + public SegmentsClient segments() { + return this.segmentsClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/ExperimentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/ExperimentsClient.java new file mode 100644 index 00000000..7fd9b028 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/ExperimentsClient.java @@ -0,0 +1,166 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.AdvanceRampRequestContent; +import com.auth0.client.mgmt.experimentation.types.CreateExperimentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListExperimentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters; +import com.auth0.client.mgmt.types.AdvanceRampResponseContent; +import com.auth0.client.mgmt.types.CreateExperimentResponseContent; +import com.auth0.client.mgmt.types.ExperimentListItem; +import com.auth0.client.mgmt.types.GetExperimentResponseContent; +import com.auth0.client.mgmt.types.UpdateExperimentResponseContent; +import com.auth0.client.mgmt.types.ValidateExperimentResponseContent; + +public class ExperimentsClient { + protected final ClientOptions clientOptions; + + private final RawExperimentsClient rawClient; + + public ExperimentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawExperimentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawExperimentsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public SyncPagingIterable list() { + return this.rawClient.list().body(); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public SyncPagingIterable list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public SyncPagingIterable list(ListExperimentsRequestParameters request) { + return this.rawClient.list(request).body(); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public SyncPagingIterable list( + ListExperimentsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).body(); + } + + /** + * Create a new experiment for A/B testing. + */ + public CreateExperimentResponseContent create(CreateExperimentRequestContent request) { + return this.rawClient.create(request).body(); + } + + /** + * Create a new experiment for A/B testing. + */ + public CreateExperimentResponseContent create( + CreateExperimentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + /** + * Retrieve a single experiment with its allocations by ID. + */ + public GetExperimentResponseContent get(String id) { + return this.rawClient.get(id).body(); + } + + /** + * Retrieve a single experiment with its allocations by ID. + */ + public GetExperimentResponseContent get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).body(); + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public UpdateExperimentResponseContent update(String id) { + return this.rawClient.update(id).body(); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public UpdateExperimentResponseContent update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).body(); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public UpdateExperimentResponseContent update(String id, UpdateExperimentRequestParameters request) { + return this.rawClient.update(id, request).body(); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public UpdateExperimentResponseContent update( + String id, UpdateExperimentRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).body(); + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public AdvanceRampResponseContent advanceRamp(String id, AdvanceRampRequestContent request) { + return this.rawClient.advanceRamp(id, request).body(); + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public AdvanceRampResponseContent advanceRamp( + String id, AdvanceRampRequestContent request, RequestOptions requestOptions) { + return this.rawClient.advanceRamp(id, request, requestOptions).body(); + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public ValidateExperimentResponseContent validate(String id) { + return this.rawClient.validate(id).body(); + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public ValidateExperimentResponseContent validate(String id, RequestOptions requestOptions) { + return this.rawClient.validate(id, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/FeatureFlagsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/FeatureFlagsClient.java new file mode 100644 index 00000000..02f447d4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/FeatureFlagsClient.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.Suppliers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.featureflags.VariationsClient; +import com.auth0.client.mgmt.experimentation.types.CreateFeatureFlagRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListFeatureFlagsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateFeatureFlagRequestContent; +import com.auth0.client.mgmt.types.CreateFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.FeatureFlag; +import com.auth0.client.mgmt.types.GetFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.UpdateFeatureFlagResponseContent; +import java.util.function.Supplier; + +public class FeatureFlagsClient { + protected final ClientOptions clientOptions; + + private final RawFeatureFlagsClient rawClient; + + protected final Supplier variationsClient; + + public FeatureFlagsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawFeatureFlagsClient(clientOptions); + this.variationsClient = Suppliers.memoize(() -> new VariationsClient(clientOptions)); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawFeatureFlagsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public SyncPagingIterable list() { + return this.rawClient.list().body(); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public SyncPagingIterable list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public SyncPagingIterable list(ListFeatureFlagsRequestParameters request) { + return this.rawClient.list(request).body(); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public SyncPagingIterable list( + ListFeatureFlagsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).body(); + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public CreateFeatureFlagResponseContent create(CreateFeatureFlagRequestContent request) { + return this.rawClient.create(request).body(); + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public CreateFeatureFlagResponseContent create( + CreateFeatureFlagRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + /** + * Retrieve a single feature flag by its ID. + */ + public GetFeatureFlagResponseContent get(String id) { + return this.rawClient.get(id).body(); + } + + /** + * Retrieve a single feature flag by its ID. + */ + public GetFeatureFlagResponseContent get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).body(); + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public UpdateFeatureFlagResponseContent update(String id) { + return this.rawClient.update(id).body(); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public UpdateFeatureFlagResponseContent update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).body(); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public UpdateFeatureFlagResponseContent update(String id, UpdateFeatureFlagRequestContent request) { + return this.rawClient.update(id, request).body(); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public UpdateFeatureFlagResponseContent update( + String id, UpdateFeatureFlagRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).body(); + } + + public VariationsClient variations() { + return this.variationsClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/RawExperimentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/RawExperimentsClient.java new file mode 100644 index 00000000..386d3d67 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/RawExperimentsClient.java @@ -0,0 +1,688 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.errors.UnprocessableEntityError; +import com.auth0.client.mgmt.experimentation.types.AdvanceRampRequestContent; +import com.auth0.client.mgmt.experimentation.types.CreateExperimentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListExperimentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters; +import com.auth0.client.mgmt.types.AdvanceRampResponseContent; +import com.auth0.client.mgmt.types.CreateExperimentResponseContent; +import com.auth0.client.mgmt.types.ExperimentListItem; +import com.auth0.client.mgmt.types.GetExperimentResponseContent; +import com.auth0.client.mgmt.types.ListExperimentsResponseContent; +import com.auth0.client.mgmt.types.UpdateExperimentResponseContent; +import com.auth0.client.mgmt.types.ValidateExperimentResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawExperimentsClient { + protected final ClientOptions clientOptions; + + public RawExperimentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public ManagementApiHttpResponse> list() { + return list(ListExperimentsRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public ManagementApiHttpResponse> list(RequestOptions requestOptions) { + return list(ListExperimentsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public ManagementApiHttpResponse> list( + ListExperimentsRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of experiments for the tenant, with optional filters. + */ + public ManagementApiHttpResponse> list( + ListExperimentsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getStatus().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "status", request.getStatus().orElse(null), false); + } + if (!request.getAuthenticationFlow().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "authentication_flow", + request.getAuthenticationFlow().orElse(null), + false); + } + if (!request.getFeatureFlagId().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "feature_flag_id", request.getFeatureFlagId().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListExperimentsResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListExperimentsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListExperimentsRequestParameters nextRequest = ListExperimentsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getExperiments(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Create a new experiment for A/B testing. + */ + public ManagementApiHttpResponse create(CreateExperimentRequestContent request) { + return create(request, null); + } + + /** + * Create a new experiment for A/B testing. + */ + public ManagementApiHttpResponse create( + CreateExperimentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments"); + 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, CreateExperimentResponseContent.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 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 422: + throw new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } 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 single experiment with its allocations by ID. + */ + public ManagementApiHttpResponse get(String id) { + return get(id, null); + } + + /** + * Retrieve a single experiment with its allocations by ID. + */ + public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .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, GetExperimentResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + /** + * Permanently delete an experiment and its allocations by ID. Active experiments cannot be deleted; pause or complete first. Idempotent: returns 204 even if the experiment does not exist. + */ + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public ManagementApiHttpResponse update(String id) { + return update(id, UpdateExperimentRequestParameters.builder().build()); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { + return update(id, UpdateExperimentRequestParameters.builder().build(), requestOptions); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public ManagementApiHttpResponse update( + String id, UpdateExperimentRequestParameters request) { + return update(id, request, null); + } + + /** + * Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set. + */ + public ManagementApiHttpResponse update( + String id, UpdateExperimentRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateExperimentResponseContent.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 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 422: + throw new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } 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); + } + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public ManagementApiHttpResponse advanceRamp( + String id, AdvanceRampRequestContent request) { + return advanceRamp(id, request, null); + } + + /** + * Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything. + */ + public ManagementApiHttpResponse advanceRamp( + String id, AdvanceRampRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id) + .addPathSegments("advance-ramp"); + 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, AdvanceRampResponseContent.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 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); + } + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public ManagementApiHttpResponse validate(String id) { + return validate(id, null); + } + + /** + * Checks whether an experiment is ready to be activated. Returns is_valid boolean and an errors array describing any blockers. Read-only; no state is modified. + */ + public ManagementApiHttpResponse validate( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/experiments") + .addPathSegment(id) + .addPathSegments("validate"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", RequestBody.create("", null)) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ValidateExperimentResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/RawFeatureFlagsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/RawFeatureFlagsClient.java new file mode 100644 index 00000000..0aae0b60 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/RawFeatureFlagsClient.java @@ -0,0 +1,498 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.experimentation.types.CreateFeatureFlagRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListFeatureFlagsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateFeatureFlagRequestContent; +import com.auth0.client.mgmt.types.CreateFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.FeatureFlag; +import com.auth0.client.mgmt.types.GetFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.ListFeatureFlagsResponseContent; +import com.auth0.client.mgmt.types.UpdateFeatureFlagResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawFeatureFlagsClient { + protected final ClientOptions clientOptions; + + public RawFeatureFlagsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public ManagementApiHttpResponse> list() { + return list(ListFeatureFlagsRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public ManagementApiHttpResponse> list(RequestOptions requestOptions) { + return list(ListFeatureFlagsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public ManagementApiHttpResponse> list(ListFeatureFlagsRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of feature flags for the tenant. + */ + public ManagementApiHttpResponse> list( + ListFeatureFlagsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "type", request.getType().orElse(null), false); + } + if (!request.getStatus().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "status", request.getStatus().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListFeatureFlagsResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListFeatureFlagsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListFeatureFlagsRequestParameters nextRequest = ListFeatureFlagsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getFeatureFlags(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public ManagementApiHttpResponse create(CreateFeatureFlagRequestContent request) { + return create(request, null); + } + + /** + * Create a new feature flag with parameters for use in experiments. + */ + public ManagementApiHttpResponse create( + CreateFeatureFlagRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags"); + 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, CreateFeatureFlagResponseContent.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 single feature flag by its ID. + */ + public ManagementApiHttpResponse get(String id) { + return get(id, null); + } + + /** + * Retrieve a single feature flag by its ID. + */ + public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .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, GetFeatureFlagResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + /** + * Delete a feature flag by ID. Idempotent: returns 204 even if flag does not exist. + */ + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 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); + } + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update(String id) { + return update(id, UpdateFeatureFlagRequestContent.builder().build()); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update( + String id, RequestOptions requestOptions) { + return update(id, UpdateFeatureFlagRequestContent.builder().build(), requestOptions); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update( + String id, UpdateFeatureFlagRequestContent request) { + return update(id, request, null); + } + + /** + * Partially update a feature flag by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update( + String id, UpdateFeatureFlagRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateFeatureFlagResponseContent.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 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/RawSegmentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/RawSegmentsClient.java new file mode 100644 index 00000000..5fbf826d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/RawSegmentsClient.java @@ -0,0 +1,503 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.errors.UnprocessableEntityError; +import com.auth0.client.mgmt.experimentation.types.CreateSegmentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateSegmentRequestContent; +import com.auth0.client.mgmt.types.CreateSegmentResponseContent; +import com.auth0.client.mgmt.types.GetSegmentResponseContent; +import com.auth0.client.mgmt.types.ListSegmentsResponseContent; +import com.auth0.client.mgmt.types.Segment; +import com.auth0.client.mgmt.types.UpdateSegmentResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawSegmentsClient { + protected final ClientOptions clientOptions; + + public RawSegmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public ManagementApiHttpResponse> list() { + return list(ListSegmentsRequestParameters.builder().build()); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public ManagementApiHttpResponse> list(RequestOptions requestOptions) { + return list(ListSegmentsRequestParameters.builder().build(), requestOptions); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public ManagementApiHttpResponse> list(ListSegmentsRequestParameters request) { + return list(request, null); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public ManagementApiHttpResponse> list( + ListSegmentsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getType().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "type", request.getType().orElse(null), false); + } + if (!request.getStatus().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "status", request.getStatus().orElse(null), false); + } + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListSegmentsResponseContent parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListSegmentsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListSegmentsRequestParameters nextRequest = ListSegmentsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getSegments(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable(startingAfter.isPresent(), result, parsedResponse, () -> list( + nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public ManagementApiHttpResponse create(CreateSegmentRequestContent request) { + return create(request, null); + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public ManagementApiHttpResponse create( + CreateSegmentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments"); + 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, CreateSegmentResponseContent.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 422: + throw new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } 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 single segment by its ID. + */ + public ManagementApiHttpResponse get(String id) { + return get(id, null); + } + + /** + * Retrieve a single segment by its ID. + */ + public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments") + .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, GetSegmentResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 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); + } + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public ManagementApiHttpResponse update(String id) { + return update(id, UpdateSegmentRequestContent.builder().build()); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public ManagementApiHttpResponse update(String id, RequestOptions requestOptions) { + return update(id, UpdateSegmentRequestContent.builder().build(), requestOptions); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public ManagementApiHttpResponse update( + String id, UpdateSegmentRequestContent request) { + return update(id, request, null); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public ManagementApiHttpResponse update( + String id, UpdateSegmentRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/segments") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateSegmentResponseContent.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 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 422: + throw new UnprocessableEntityError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } 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/experimentation/SegmentsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/SegmentsClient.java new file mode 100644 index 00000000..70f6c8b3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/SegmentsClient.java @@ -0,0 +1,132 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.CreateSegmentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateSegmentRequestContent; +import com.auth0.client.mgmt.types.CreateSegmentResponseContent; +import com.auth0.client.mgmt.types.GetSegmentResponseContent; +import com.auth0.client.mgmt.types.Segment; +import com.auth0.client.mgmt.types.UpdateSegmentResponseContent; + +public class SegmentsClient { + protected final ClientOptions clientOptions; + + private final RawSegmentsClient rawClient; + + public SegmentsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawSegmentsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawSegmentsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public SyncPagingIterable list() { + return this.rawClient.list().body(); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public SyncPagingIterable list(RequestOptions requestOptions) { + return this.rawClient.list(requestOptions).body(); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public SyncPagingIterable list(ListSegmentsRequestParameters request) { + return this.rawClient.list(request).body(); + } + + /** + * Retrieve a paginated list of segments for the tenant. + */ + public SyncPagingIterable list(ListSegmentsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).body(); + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public CreateSegmentResponseContent create(CreateSegmentRequestContent request) { + return this.rawClient.create(request).body(); + } + + /** + * Create a new segment with rule-based membership criteria for use in experiments. + */ + public CreateSegmentResponseContent create(CreateSegmentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + + /** + * Retrieve a single segment by its ID. + */ + public GetSegmentResponseContent get(String id) { + return this.rawClient.get(id).body(); + } + + /** + * Retrieve a single segment by its ID. + */ + public GetSegmentResponseContent get(String id, RequestOptions requestOptions) { + return this.rawClient.get(id, requestOptions).body(); + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + /** + * Delete a segment by ID. Idempotent: returns 204 even if segment does not exist. + */ + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public UpdateSegmentResponseContent update(String id) { + return this.rawClient.update(id).body(); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public UpdateSegmentResponseContent update(String id, RequestOptions requestOptions) { + return this.rawClient.update(id, requestOptions).body(); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public UpdateSegmentResponseContent update(String id, UpdateSegmentRequestContent request) { + return this.rawClient.update(id, request).body(); + } + + /** + * Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array. + */ + public UpdateSegmentResponseContent update( + String id, UpdateSegmentRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/AsyncRawVariationsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/AsyncRawVariationsClient.java new file mode 100644 index 00000000..95c38e1a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/AsyncRawVariationsClient.java @@ -0,0 +1,604 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.featureflags; + +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.experimentation.featureflags.types.CreateVariationRequestContent; +import com.auth0.client.mgmt.experimentation.featureflags.types.UpdateVariationRequestContent; +import com.auth0.client.mgmt.types.CreateVariationResponseContent; +import com.auth0.client.mgmt.types.GetVariationResponseContent; +import com.auth0.client.mgmt.types.ListVariationsResponseContent; +import com.auth0.client.mgmt.types.UpdateVariationResponseContent; +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 AsyncRawVariationsClient { + protected final ClientOptions clientOptions; + + public AsyncRawVariationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public CompletableFuture> list(String id) { + return list(id, null); + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public CompletableFuture> list( + String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations"); + 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, ListVariationsResponseContent.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 variation with parameter overrides for a specific feature flag. + */ + public CompletableFuture> create( + String id, CreateVariationRequestContent request) { + return create(id, request, null); + } + + /** + * Create a new variation with parameter overrides for a specific feature flag. + */ + public CompletableFuture> create( + String id, CreateVariationRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations"); + 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, CreateVariationResponseContent.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 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 single variation by its ID. + */ + public CompletableFuture> get(String id, String vid) { + return get(id, vid, null); + } + + /** + * Retrieve a single variation by its ID. + */ + public CompletableFuture> get( + String id, String vid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations") + .addPathSegment(vid); + 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, GetVariationResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 404: + future.completeExceptionally(new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public CompletableFuture> delete(String id, String vid) { + return delete(id, vid, null); + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public CompletableFuture> delete( + String id, String vid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations") + .addPathSegment(vid); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 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 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; + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture> update(String id, String vid) { + return update(id, vid, UpdateVariationRequestContent.builder().build()); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture> update( + String id, String vid, RequestOptions requestOptions) { + return update(id, vid, UpdateVariationRequestContent.builder().build(), requestOptions); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture> update( + String id, String vid, UpdateVariationRequestContent request) { + return update(id, vid, request, null); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture> update( + String id, String vid, UpdateVariationRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations") + .addPathSegment(vid); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateVariationResponseContent.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 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/AsyncVariationsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/AsyncVariationsClient.java new file mode 100644 index 00000000..ea6f57ec --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/AsyncVariationsClient.java @@ -0,0 +1,120 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.featureflags; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.experimentation.featureflags.types.CreateVariationRequestContent; +import com.auth0.client.mgmt.experimentation.featureflags.types.UpdateVariationRequestContent; +import com.auth0.client.mgmt.types.CreateVariationResponseContent; +import com.auth0.client.mgmt.types.GetVariationResponseContent; +import com.auth0.client.mgmt.types.ListVariationsResponseContent; +import com.auth0.client.mgmt.types.UpdateVariationResponseContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncVariationsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawVariationsClient rawClient; + + public AsyncVariationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawVariationsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawVariationsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public CompletableFuture list(String id) { + return this.rawClient.list(id).thenApply(response -> response.body()); + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public CompletableFuture list(String id, RequestOptions requestOptions) { + return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Create a new variation with parameter overrides for a specific feature flag. + */ + public CompletableFuture create(String id, CreateVariationRequestContent request) { + return this.rawClient.create(id, request).thenApply(response -> response.body()); + } + + /** + * Create a new variation with parameter overrides for a specific feature flag. + */ + public CompletableFuture create( + String id, CreateVariationRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve a single variation by its ID. + */ + public CompletableFuture get(String id, String vid) { + return this.rawClient.get(id, vid).thenApply(response -> response.body()); + } + + /** + * Retrieve a single variation by its ID. + */ + public CompletableFuture get(String id, String vid, RequestOptions requestOptions) { + return this.rawClient.get(id, vid, requestOptions).thenApply(response -> response.body()); + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public CompletableFuture delete(String id, String vid) { + return this.rawClient.delete(id, vid).thenApply(response -> response.body()); + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public CompletableFuture delete(String id, String vid, RequestOptions requestOptions) { + return this.rawClient.delete(id, vid, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture update(String id, String vid) { + return this.rawClient.update(id, vid).thenApply(response -> response.body()); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture update( + String id, String vid, RequestOptions requestOptions) { + return this.rawClient.update(id, vid, requestOptions).thenApply(response -> response.body()); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture update( + String id, String vid, UpdateVariationRequestContent request) { + return this.rawClient.update(id, vid, request).thenApply(response -> response.body()); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public CompletableFuture update( + String id, String vid, UpdateVariationRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, vid, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/RawVariationsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/RawVariationsClient.java new file mode 100644 index 00000000..2379eba1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/RawVariationsClient.java @@ -0,0 +1,474 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.featureflags; + +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.experimentation.featureflags.types.CreateVariationRequestContent; +import com.auth0.client.mgmt.experimentation.featureflags.types.UpdateVariationRequestContent; +import com.auth0.client.mgmt.types.CreateVariationResponseContent; +import com.auth0.client.mgmt.types.GetVariationResponseContent; +import com.auth0.client.mgmt.types.ListVariationsResponseContent; +import com.auth0.client.mgmt.types.UpdateVariationResponseContent; +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 RawVariationsClient { + protected final ClientOptions clientOptions; + + public RawVariationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public ManagementApiHttpResponse list(String id) { + return list(id, null); + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public ManagementApiHttpResponse list(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations"); + 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, ListVariationsResponseContent.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 variation with parameter overrides for a specific feature flag. + */ + public ManagementApiHttpResponse create( + String id, CreateVariationRequestContent request) { + return create(id, request, null); + } + + /** + * Create a new variation with parameter overrides for a specific feature flag. + */ + public ManagementApiHttpResponse create( + String id, CreateVariationRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations"); + 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, CreateVariationResponseContent.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 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 single variation by its ID. + */ + public ManagementApiHttpResponse get(String id, String vid) { + return get(id, vid, null); + } + + /** + * Retrieve a single variation by its ID. + */ + public ManagementApiHttpResponse get( + String id, String vid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations") + .addPathSegment(vid); + 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, GetVariationResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 404: + throw new NotFoundError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public ManagementApiHttpResponse delete(String id, String vid) { + return delete(id, vid, null); + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public ManagementApiHttpResponse delete(String id, String vid, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations") + .addPathSegment(vid); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 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 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); + } + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update(String id, String vid) { + return update(id, vid, UpdateVariationRequestContent.builder().build()); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update( + String id, String vid, RequestOptions requestOptions) { + return update(id, vid, UpdateVariationRequestContent.builder().build(), requestOptions); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update( + String id, String vid, UpdateVariationRequestContent request) { + return update(id, vid, request, null); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public ManagementApiHttpResponse update( + String id, String vid, UpdateVariationRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("experimentation/feature-flags") + .addPathSegment(id) + .addPathSegments("variations") + .addPathSegment(vid); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateVariationResponseContent.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 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/VariationsClient.java b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/VariationsClient.java new file mode 100644 index 00000000..807539cb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/VariationsClient.java @@ -0,0 +1,117 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.featureflags; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.experimentation.featureflags.types.CreateVariationRequestContent; +import com.auth0.client.mgmt.experimentation.featureflags.types.UpdateVariationRequestContent; +import com.auth0.client.mgmt.types.CreateVariationResponseContent; +import com.auth0.client.mgmt.types.GetVariationResponseContent; +import com.auth0.client.mgmt.types.ListVariationsResponseContent; +import com.auth0.client.mgmt.types.UpdateVariationResponseContent; + +public class VariationsClient { + protected final ClientOptions clientOptions; + + private final RawVariationsClient rawClient; + + public VariationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawVariationsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawVariationsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public ListVariationsResponseContent list(String id) { + return this.rawClient.list(id).body(); + } + + /** + * Retrieve all variations defined for a specific feature flag. + */ + public ListVariationsResponseContent list(String id, RequestOptions requestOptions) { + return this.rawClient.list(id, requestOptions).body(); + } + + /** + * Create a new variation with parameter overrides for a specific feature flag. + */ + public CreateVariationResponseContent create(String id, CreateVariationRequestContent request) { + return this.rawClient.create(id, request).body(); + } + + /** + * Create a new variation with parameter overrides for a specific feature flag. + */ + public CreateVariationResponseContent create( + String id, CreateVariationRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(id, request, requestOptions).body(); + } + + /** + * Retrieve a single variation by its ID. + */ + public GetVariationResponseContent get(String id, String vid) { + return this.rawClient.get(id, vid).body(); + } + + /** + * Retrieve a single variation by its ID. + */ + public GetVariationResponseContent get(String id, String vid, RequestOptions requestOptions) { + return this.rawClient.get(id, vid, requestOptions).body(); + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public void delete(String id, String vid) { + this.rawClient.delete(id, vid).body(); + } + + /** + * Delete a variation by ID. Returns 204 if the variation does not exist. Returns 404 if the parent feature flag does not exist. + */ + public void delete(String id, String vid, RequestOptions requestOptions) { + this.rawClient.delete(id, vid, requestOptions).body(); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public UpdateVariationResponseContent update(String id, String vid) { + return this.rawClient.update(id, vid).body(); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public UpdateVariationResponseContent update(String id, String vid, RequestOptions requestOptions) { + return this.rawClient.update(id, vid, requestOptions).body(); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public UpdateVariationResponseContent update(String id, String vid, UpdateVariationRequestContent request) { + return this.rawClient.update(id, vid, request).body(); + } + + /** + * Partially update a variation by ID. Only provided fields are updated. + */ + public UpdateVariationResponseContent update( + String id, String vid, UpdateVariationRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, vid, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/types/CreateVariationRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/types/CreateVariationRequestContent.java new file mode 100644 index 00000000..ad5adaaf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/types/CreateVariationRequestContent.java @@ -0,0 +1,234 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.featureflags.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.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateVariationRequestContent.Builder.class) +public final class CreateVariationRequestContent { + private final String name; + + private final Optional description; + + private final Map overrides; + + private final Map additionalProperties; + + private CreateVariationRequestContent( + String name, + Optional description, + Map overrides, + Map additionalProperties) { + this.name = name; + this.description = description; + this.overrides = overrides; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the variation + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return A description of what this variation controls + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return Configuration overrides for this variation; keys must exist in the parent flag parameters. Empty {} is the baseline (control) variation that overrides nothing. + */ + @JsonProperty("overrides") + public Map getOverrides() { + return overrides; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateVariationRequestContent && equalTo((CreateVariationRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateVariationRequestContent other) { + return name.equals(other.name) && description.equals(other.description) && overrides.equals(other.overrides); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.overrides); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

    A human-readable name for the variation

    + */ + _FinalStage name(@NotNull String name); + + Builder from(CreateVariationRequestContent other); + } + + public interface _FinalStage { + CreateVariationRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

    A description of what this variation controls

    + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + + /** + *

    Configuration overrides for this variation; keys must exist in the parent flag parameters. Empty {} is the baseline (control) variation that overrides nothing.

    + */ + _FinalStage overrides(Map overrides); + + _FinalStage putAllOverrides(Map overrides); + + _FinalStage overrides(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Map overrides = new LinkedHashMap<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateVariationRequestContent other) { + name(other.getName()); + description(other.getDescription()); + overrides(other.getOverrides()); + return this; + } + + /** + *

    A human-readable name for the variation

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

    Configuration overrides for this variation; keys must exist in the parent flag parameters. Empty {} is the baseline (control) variation that overrides nothing.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage overrides(String key, Object value) { + this.overrides.put(key, value); + return this; + } + + /** + *

    Configuration overrides for this variation; keys must exist in the parent flag parameters. Empty {} is the baseline (control) variation that overrides nothing.

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

    Configuration overrides for this variation; keys must exist in the parent flag parameters. Empty {} is the baseline (control) variation that overrides nothing.

    + */ + @java.lang.Override + @JsonSetter(value = "overrides", nulls = Nulls.SKIP) + public _FinalStage overrides(Map overrides) { + this.overrides.clear(); + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + /** + *

    A description of what this variation controls

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

    A description of what this variation controls

    + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateVariationRequestContent build() { + return new CreateVariationRequestContent(name, description, overrides, 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/experimentation/featureflags/types/UpdateVariationRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/types/UpdateVariationRequestContent.java new file mode 100644 index 00000000..c7b48a5b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/featureflags/types/UpdateVariationRequestContent.java @@ -0,0 +1,228 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.featureflags.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateVariationRequestContent.Builder.class) +public final class UpdateVariationRequestContent { + private final Optional name; + + private final OptionalNullable description; + + private final OptionalNullable> overrides; + + private final Map additionalProperties; + + private UpdateVariationRequestContent( + Optional name, + OptionalNullable description, + OptionalNullable> overrides, + Map additionalProperties) { + this.name = name; + this.description = description; + this.overrides = overrides; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the variation + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return A description of what this variation controls + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("overrides") + public OptionalNullable> getOverrides() { + if (overrides == null) { + return OptionalNullable.absent(); + } + return overrides; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("overrides") + private OptionalNullable> _getOverrides() { + return overrides; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateVariationRequestContent && equalTo((UpdateVariationRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateVariationRequestContent other) { + return name.equals(other.name) && description.equals(other.description) && overrides.equals(other.overrides); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.overrides); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + private OptionalNullable> overrides = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateVariationRequestContent other) { + name(other.getName()); + description(other.getDescription()); + overrides(other.getOverrides()); + return this; + } + + /** + *

    A human-readable name for the variation

    + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

    A description of what this variation controls

    + */ + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(@Nullable OptionalNullable description) { + this.description = description; + return this; + } + + public Builder description(String description) { + this.description = OptionalNullable.of(description); + return this; + } + + public Builder description(Optional description) { + if (description.isPresent()) { + this.description = OptionalNullable.of(description.get()); + } else { + this.description = OptionalNullable.absent(); + } + return this; + } + + public Builder description(com.auth0.client.mgmt.core.Nullable description) { + if (description.isNull()) { + this.description = OptionalNullable.ofNull(); + } else if (description.isEmpty()) { + this.description = OptionalNullable.absent(); + } else { + this.description = OptionalNullable.of(description.get()); + } + return this; + } + + @JsonSetter(value = "overrides", nulls = Nulls.SKIP) + public Builder overrides(@Nullable OptionalNullable> overrides) { + this.overrides = overrides; + return this; + } + + public Builder overrides(Map overrides) { + this.overrides = OptionalNullable.of(overrides); + return this; + } + + public Builder overrides(Optional> overrides) { + if (overrides.isPresent()) { + this.overrides = OptionalNullable.of(overrides.get()); + } else { + this.overrides = OptionalNullable.absent(); + } + return this; + } + + public Builder overrides(com.auth0.client.mgmt.core.Nullable> overrides) { + if (overrides.isNull()) { + this.overrides = OptionalNullable.ofNull(); + } else if (overrides.isEmpty()) { + this.overrides = OptionalNullable.absent(); + } else { + this.overrides = OptionalNullable.of(overrides.get()); + } + return this; + } + + public UpdateVariationRequestContent build() { + return new UpdateVariationRequestContent(name, description, overrides, 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/experimentation/types/AdvanceRampRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/AdvanceRampRequestContent.java new file mode 100644 index 00000000..27606366 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/AdvanceRampRequestContent.java @@ -0,0 +1,127 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AdvanceRampRequestContent.Builder.class) +public final class AdvanceRampRequestContent { + private final int targetLevel; + + private final Map additionalProperties; + + private AdvanceRampRequestContent(int targetLevel, Map additionalProperties) { + this.targetLevel = targetLevel; + this.additionalProperties = additionalProperties; + } + + /** + * @return The target percentage level from the experiment schedule. Must be the immediate next level. + */ + @JsonProperty("target_level") + public int getTargetLevel() { + return targetLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AdvanceRampRequestContent && equalTo((AdvanceRampRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AdvanceRampRequestContent other) { + return targetLevel == other.targetLevel; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.targetLevel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TargetLevelStage builder() { + return new Builder(); + } + + public interface TargetLevelStage { + /** + *

    The target percentage level from the experiment schedule. Must be the immediate next level.

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

    The target percentage level from the experiment schedule. Must be the immediate next level.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("target_level") + public _FinalStage targetLevel(int targetLevel) { + this.targetLevel = targetLevel; + return this; + } + + @java.lang.Override + public AdvanceRampRequestContent build() { + return new AdvanceRampRequestContent(targetLevel, 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/experimentation/types/CreateExperimentRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/CreateExperimentRequestContent.java new file mode 100644 index 00000000..12521d3f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/CreateExperimentRequestContent.java @@ -0,0 +1,419 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.AllocationRequestItem; +import com.auth0.client.mgmt.types.AllocationStrategyEnum; +import com.auth0.client.mgmt.types.AuthenticationFlowEnum; +import com.auth0.client.mgmt.types.DefaultConfigEnum; +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 = CreateExperimentRequestContent.Builder.class) +public final class CreateExperimentRequestContent { + private final String name; + + private final Optional description; + + private final String featureFlagId; + + private final AuthenticationFlowEnum authenticationFlow; + + private final Optional defaultConfig; + + private final AllocationStrategyEnum allocationStrategy; + + private final Optional> allocations; + + private final Optional> levels; + + private final Map additionalProperties; + + private CreateExperimentRequestContent( + String name, + Optional description, + String featureFlagId, + AuthenticationFlowEnum authenticationFlow, + Optional defaultConfig, + AllocationStrategyEnum allocationStrategy, + Optional> allocations, + Optional> levels, + Map additionalProperties) { + this.name = name; + this.description = description; + this.featureFlagId = featureFlagId; + this.authenticationFlow = authenticationFlow; + this.defaultConfig = defaultConfig; + this.allocationStrategy = allocationStrategy; + this.allocations = allocations; + this.levels = levels; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the experiment + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return A description of the experiment + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return The ID of the feature flag this experiment is based on + */ + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("authentication_flow") + public AuthenticationFlowEnum getAuthenticationFlow() { + return authenticationFlow; + } + + /** + * @return Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config so the experiment overlays only its changes, 'flag' uses the flag's frozen defaults for a complete config. Optional; defaults to 'tenant' when omitted. Rejected for customer-defined flags. + */ + @JsonProperty("default_config") + public Optional getDefaultConfig() { + return defaultConfig; + } + + /** + * @return The traffic allocation strategy for this experiment + */ + @JsonProperty("allocation_strategy") + public AllocationStrategyEnum getAllocationStrategy() { + return allocationStrategy; + } + + /** + * @return Traffic allocations mapping variations to weights or segments + */ + @JsonProperty("allocations") + public Optional> getAllocations() { + return allocations; + } + + /** + * @return Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100]. + */ + @JsonProperty("levels") + public Optional> getLevels() { + return levels; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateExperimentRequestContent && equalTo((CreateExperimentRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateExperimentRequestContent other) { + return name.equals(other.name) + && description.equals(other.description) + && featureFlagId.equals(other.featureFlagId) + && authenticationFlow.equals(other.authenticationFlow) + && defaultConfig.equals(other.defaultConfig) + && allocationStrategy.equals(other.allocationStrategy) + && allocations.equals(other.allocations) + && levels.equals(other.levels); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.name, + this.description, + this.featureFlagId, + this.authenticationFlow, + this.defaultConfig, + this.allocationStrategy, + this.allocations, + this.levels); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

    A human-readable name for the experiment

    + */ + FeatureFlagIdStage name(@NotNull String name); + + Builder from(CreateExperimentRequestContent other); + } + + public interface FeatureFlagIdStage { + /** + *

    The ID of the feature flag this experiment is based on

    + */ + AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId); + } + + public interface AuthenticationFlowStage { + AllocationStrategyStage authenticationFlow(@NotNull AuthenticationFlowEnum authenticationFlow); + } + + public interface AllocationStrategyStage { + /** + *

    The traffic allocation strategy for this experiment

    + */ + _FinalStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy); + } + + public interface _FinalStage { + CreateExperimentRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

    A description of the experiment

    + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + + /** + *

    Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config so the experiment overlays only its changes, 'flag' uses the flag's frozen defaults for a complete config. Optional; defaults to 'tenant' when omitted. Rejected for customer-defined flags.

    + */ + _FinalStage defaultConfig(Optional defaultConfig); + + _FinalStage defaultConfig(DefaultConfigEnum defaultConfig); + + /** + *

    Traffic allocations mapping variations to weights or segments

    + */ + _FinalStage allocations(Optional> allocations); + + _FinalStage allocations(List allocations); + + /** + *

    Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100].

    + */ + _FinalStage levels(Optional> levels); + + _FinalStage levels(List levels); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements NameStage, FeatureFlagIdStage, AuthenticationFlowStage, AllocationStrategyStage, _FinalStage { + private String name; + + private String featureFlagId; + + private AuthenticationFlowEnum authenticationFlow; + + private AllocationStrategyEnum allocationStrategy; + + private Optional> levels = Optional.empty(); + + private Optional> allocations = Optional.empty(); + + private Optional defaultConfig = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateExperimentRequestContent other) { + name(other.getName()); + description(other.getDescription()); + featureFlagId(other.getFeatureFlagId()); + authenticationFlow(other.getAuthenticationFlow()); + defaultConfig(other.getDefaultConfig()); + allocationStrategy(other.getAllocationStrategy()); + allocations(other.getAllocations()); + levels(other.getLevels()); + return this; + } + + /** + *

    A human-readable name for the experiment

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

    The ID of the feature flag this experiment is based on

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

    The traffic allocation strategy for this experiment

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

    Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100].

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

    Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100].

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

    Traffic allocations mapping variations to weights or segments

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

    Traffic allocations mapping variations to weights or segments

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

    Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config so the experiment overlays only its changes, 'flag' uses the flag's frozen defaults for a complete config. Optional; defaults to 'tenant' when omitted. Rejected for customer-defined flags.

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

    Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config so the experiment overlays only its changes, 'flag' uses the flag's frozen defaults for a complete config. Optional; defaults to 'tenant' when omitted. Rejected for customer-defined flags.

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

    A description of the experiment

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

    A description of the experiment

    + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateExperimentRequestContent build() { + return new CreateExperimentRequestContent( + name, + description, + featureFlagId, + authenticationFlow, + defaultConfig, + allocationStrategy, + allocations, + levels, + 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/experimentation/types/CreateFeatureFlagRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/CreateFeatureFlagRequestContent.java new file mode 100644 index 00000000..1910a5e4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/CreateFeatureFlagRequestContent.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.FeatureFlagConfigParam; +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.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateFeatureFlagRequestContent.Builder.class) +public final class CreateFeatureFlagRequestContent { + private final String name; + + private final Optional description; + + private final Map parameters; + + private final Map additionalProperties; + + private CreateFeatureFlagRequestContent( + String name, + Optional description, + Map parameters, + Map additionalProperties) { + this.name = name; + this.description = description; + this.parameters = parameters; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the feature flag + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return A description of what this feature flag controls + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("parameters") + public Map getParameters() { + return parameters; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateFeatureFlagRequestContent && equalTo((CreateFeatureFlagRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateFeatureFlagRequestContent other) { + return name.equals(other.name) && description.equals(other.description) && parameters.equals(other.parameters); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.parameters); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

    A human-readable name for the feature flag

    + */ + _FinalStage name(@NotNull String name); + + Builder from(CreateFeatureFlagRequestContent other); + } + + public interface _FinalStage { + CreateFeatureFlagRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

    A description of what this feature flag controls

    + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage parameters(Map parameters); + + _FinalStage putAllParameters(Map parameters); + + _FinalStage parameters(String key, FeatureFlagConfigParam value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Map parameters = new LinkedHashMap<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateFeatureFlagRequestContent other) { + name(other.getName()); + description(other.getDescription()); + parameters(other.getParameters()); + return this; + } + + /** + *

    A human-readable name for the feature flag

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage parameters(String key, FeatureFlagConfigParam value) { + this.parameters.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllParameters(Map parameters) { + if (parameters != null) { + this.parameters.putAll(parameters); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "parameters", nulls = Nulls.SKIP) + public _FinalStage parameters(Map parameters) { + this.parameters.clear(); + if (parameters != null) { + this.parameters.putAll(parameters); + } + return this; + } + + /** + *

    A description of what this feature flag controls

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

    A description of what this feature flag controls

    + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateFeatureFlagRequestContent build() { + return new CreateFeatureFlagRequestContent(name, description, parameters, 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/experimentation/types/CreateSegmentRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/CreateSegmentRequestContent.java new file mode 100644 index 00000000..a9900d4b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/CreateSegmentRequestContent.java @@ -0,0 +1,236 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.SegmentRule; +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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateSegmentRequestContent.Builder.class) +public final class CreateSegmentRequestContent { + private final String name; + + private final Optional description; + + private final List rules; + + private final Map additionalProperties; + + private CreateSegmentRequestContent( + String name, + Optional description, + List rules, + Map additionalProperties) { + this.name = name; + this.description = description; + this.rules = rules; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the segment + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return A description of the segment + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return An ordered list of rules. A segment matches if any rule matches. Each rule is limited to 4KB and the whole segment to 10KB (serialized). + */ + @JsonProperty("rules") + public List getRules() { + return rules; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateSegmentRequestContent && equalTo((CreateSegmentRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateSegmentRequestContent other) { + return name.equals(other.name) && description.equals(other.description) && rules.equals(other.rules); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.rules); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

    A human-readable name for the segment

    + */ + _FinalStage name(@NotNull String name); + + Builder from(CreateSegmentRequestContent other); + } + + public interface _FinalStage { + CreateSegmentRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

    A description of the segment

    + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + + /** + *

    An ordered list of rules. A segment matches if any rule matches. Each rule is limited to 4KB and the whole segment to 10KB (serialized).

    + */ + _FinalStage rules(List rules); + + _FinalStage addRules(SegmentRule rules); + + _FinalStage addAllRules(List rules); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private List rules = new ArrayList<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateSegmentRequestContent other) { + name(other.getName()); + description(other.getDescription()); + rules(other.getRules()); + return this; + } + + /** + *

    A human-readable name for the segment

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

    An ordered list of rules. A segment matches if any rule matches. Each rule is limited to 4KB and the whole segment to 10KB (serialized).

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

    An ordered list of rules. A segment matches if any rule matches. Each rule is limited to 4KB and the whole segment to 10KB (serialized).

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

    An ordered list of rules. A segment matches if any rule matches. Each rule is limited to 4KB and the whole segment to 10KB (serialized).

    + */ + @java.lang.Override + @JsonSetter(value = "rules", nulls = Nulls.SKIP) + public _FinalStage rules(List rules) { + this.rules.clear(); + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + /** + *

    A description of the segment

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

    A description of the segment

    + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateSegmentRequestContent build() { + return new CreateSegmentRequestContent(name, description, rules, 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/experimentation/types/ListExperimentsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/ListExperimentsRequestParameters.java new file mode 100644 index 00000000..d6a6197f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/ListExperimentsRequestParameters.java @@ -0,0 +1,388 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.ExperimentStatusEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListExperimentsRequestParameters.Builder.class) +public final class ListExperimentsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final OptionalNullable status; + + private final OptionalNullable authenticationFlow; + + private final OptionalNullable featureFlagId; + + private final Map additionalProperties; + + private ListExperimentsRequestParameters( + OptionalNullable from, + OptionalNullable take, + OptionalNullable status, + OptionalNullable authenticationFlow, + OptionalNullable featureFlagId, + Map additionalProperties) { + this.from = from; + this.take = take; + this.status = status; + this.authenticationFlow = authenticationFlow; + this.featureFlagId = featureFlagId; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of experiments to return per page. Defaults to 25, maximum 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Filter by status. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("status") + public OptionalNullable getStatus() { + if (status == null) { + return OptionalNullable.absent(); + } + return status; + } + + /** + * @return Filter by authentication flow. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authentication_flow") + public OptionalNullable getAuthenticationFlow() { + if (authenticationFlow == null) { + return OptionalNullable.absent(); + } + return authenticationFlow; + } + + /** + * @return Filter by feature flag ID. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_id") + public OptionalNullable getFeatureFlagId() { + if (featureFlagId == null) { + return OptionalNullable.absent(); + } + return featureFlagId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("status") + private OptionalNullable _getStatus() { + return status; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authentication_flow") + private OptionalNullable _getAuthenticationFlow() { + return authenticationFlow; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_id") + private OptionalNullable _getFeatureFlagId() { + return featureFlagId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListExperimentsRequestParameters && equalTo((ListExperimentsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListExperimentsRequestParameters other) { + return from.equals(other.from) + && take.equals(other.take) + && status.equals(other.status) + && authenticationFlow.equals(other.authenticationFlow) + && featureFlagId.equals(other.featureFlagId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take, this.status, this.authenticationFlow, this.featureFlagId); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable status = OptionalNullable.absent(); + + private OptionalNullable authenticationFlow = OptionalNullable.absent(); + + private OptionalNullable featureFlagId = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListExperimentsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + status(other.getStatus()); + authenticationFlow(other.getAuthenticationFlow()); + featureFlagId(other.getFeatureFlagId()); + return this; + } + + /** + *

    Optional Id from which to start selection.

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

    Number of experiments to return per page. Defaults to 25, maximum 50.

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

    Filter by status. Exact match.

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

    Filter by authentication flow. Exact match.

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

    Filter by feature flag ID. Exact match.

    + */ + @JsonSetter(value = "feature_flag_id", nulls = Nulls.SKIP) + public Builder featureFlagId(@Nullable OptionalNullable featureFlagId) { + this.featureFlagId = featureFlagId; + return this; + } + + public Builder featureFlagId(String featureFlagId) { + this.featureFlagId = OptionalNullable.of(featureFlagId); + return this; + } + + public Builder featureFlagId(Optional featureFlagId) { + if (featureFlagId.isPresent()) { + this.featureFlagId = OptionalNullable.of(featureFlagId.get()); + } else { + this.featureFlagId = OptionalNullable.absent(); + } + return this; + } + + public Builder featureFlagId(com.auth0.client.mgmt.core.Nullable featureFlagId) { + if (featureFlagId.isNull()) { + this.featureFlagId = OptionalNullable.ofNull(); + } else if (featureFlagId.isEmpty()) { + this.featureFlagId = OptionalNullable.absent(); + } else { + this.featureFlagId = OptionalNullable.of(featureFlagId.get()); + } + return this; + } + + public ListExperimentsRequestParameters build() { + return new ListExperimentsRequestParameters( + from, take, status, authenticationFlow, featureFlagId, 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/experimentation/types/ListFeatureFlagsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/ListFeatureFlagsRequestParameters.java new file mode 100644 index 00000000..b0625235 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/ListFeatureFlagsRequestParameters.java @@ -0,0 +1,328 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.FeatureFlagStatusEnum; +import com.auth0.client.mgmt.types.FeatureFlagTypeEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListFeatureFlagsRequestParameters.Builder.class) +public final class ListFeatureFlagsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final OptionalNullable type; + + private final OptionalNullable status; + + private final Map additionalProperties; + + private ListFeatureFlagsRequestParameters( + OptionalNullable from, + OptionalNullable take, + OptionalNullable type, + OptionalNullable status, + Map additionalProperties) { + this.from = from; + this.take = take; + this.type = type; + this.status = status; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of feature flags to return per page. Defaults to 25, maximum 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Filter by type. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + /** + * @return Filter by status. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("status") + public OptionalNullable getStatus() { + if (status == null) { + return OptionalNullable.absent(); + } + return status; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("status") + private OptionalNullable _getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListFeatureFlagsRequestParameters && equalTo((ListFeatureFlagsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListFeatureFlagsRequestParameters other) { + return from.equals(other.from) + && take.equals(other.take) + && type.equals(other.type) + && status.equals(other.status); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take, this.type, this.status); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable type = OptionalNullable.absent(); + + private OptionalNullable status = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListFeatureFlagsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + type(other.getType()); + status(other.getStatus()); + return this; + } + + /** + *

    Optional Id from which to start selection.

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

    Number of feature flags to return per page. Defaults to 25, maximum 50.

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

    Filter by type. Exact match.

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

    Filter by status. Exact match.

    + */ + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(@Nullable OptionalNullable status) { + this.status = status; + return this; + } + + public Builder status(FeatureFlagStatusEnum status) { + this.status = OptionalNullable.of(status); + return this; + } + + public Builder status(Optional status) { + if (status.isPresent()) { + this.status = OptionalNullable.of(status.get()); + } else { + this.status = OptionalNullable.absent(); + } + return this; + } + + public Builder status(com.auth0.client.mgmt.core.Nullable status) { + if (status.isNull()) { + this.status = OptionalNullable.ofNull(); + } else if (status.isEmpty()) { + this.status = OptionalNullable.absent(); + } else { + this.status = OptionalNullable.of(status.get()); + } + return this; + } + + public ListFeatureFlagsRequestParameters build() { + return new ListFeatureFlagsRequestParameters(from, take, type, status, 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/experimentation/types/ListSegmentsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/ListSegmentsRequestParameters.java new file mode 100644 index 00000000..d52debc9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/ListSegmentsRequestParameters.java @@ -0,0 +1,328 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.SegmentStatusEnum; +import com.auth0.client.mgmt.types.SegmentTypeFilterEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListSegmentsRequestParameters.Builder.class) +public final class ListSegmentsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final OptionalNullable type; + + private final OptionalNullable status; + + private final Map additionalProperties; + + private ListSegmentsRequestParameters( + OptionalNullable from, + OptionalNullable take, + OptionalNullable type, + OptionalNullable status, + Map additionalProperties) { + this.from = from; + this.take = take; + this.type = type; + this.status = status; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of segments to return per page. Defaults to 25, maximum 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Filter by type. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + /** + * @return Filter by status. Exact match. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("status") + public OptionalNullable getStatus() { + if (status == null) { + return OptionalNullable.absent(); + } + return status; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("status") + private OptionalNullable _getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListSegmentsRequestParameters && equalTo((ListSegmentsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListSegmentsRequestParameters other) { + return from.equals(other.from) + && take.equals(other.take) + && type.equals(other.type) + && status.equals(other.status); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take, this.type, this.status); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable type = OptionalNullable.absent(); + + private OptionalNullable status = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListSegmentsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + type(other.getType()); + status(other.getStatus()); + return this; + } + + /** + *

    Optional Id from which to start selection.

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

    Number of segments to return per page. Defaults to 25, maximum 50.

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

    Filter by type. Exact match.

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

    Filter by status. Exact match.

    + */ + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(@Nullable OptionalNullable status) { + this.status = status; + return this; + } + + public Builder status(SegmentStatusEnum status) { + this.status = OptionalNullable.of(status); + return this; + } + + public Builder status(Optional status) { + if (status.isPresent()) { + this.status = OptionalNullable.of(status.get()); + } else { + this.status = OptionalNullable.absent(); + } + return this; + } + + public Builder status(com.auth0.client.mgmt.core.Nullable status) { + if (status.isNull()) { + this.status = OptionalNullable.ofNull(); + } else if (status.isEmpty()) { + this.status = OptionalNullable.absent(); + } else { + this.status = OptionalNullable.of(status.get()); + } + return this; + } + + public ListSegmentsRequestParameters build() { + return new ListSegmentsRequestParameters(from, take, type, status, 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/experimentation/types/UpdateExperimentRequestParameters.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/UpdateExperimentRequestParameters.java new file mode 100644 index 00000000..6b705132 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/UpdateExperimentRequestParameters.java @@ -0,0 +1,340 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.AllocationRequestItem; +import com.auth0.client.mgmt.types.AuthenticationFlowEnum; +import com.auth0.client.mgmt.types.DefaultConfigEnum; +import com.auth0.client.mgmt.types.ExperimentTransitionStatusEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateExperimentRequestParameters.Builder.class) +public final class UpdateExperimentRequestParameters { + private final Optional name; + + private final OptionalNullable description; + + private final Optional authenticationFlow; + + private final Optional> allocations; + + private final Optional defaultConfig; + + private final Optional> levels; + + private final Optional status; + + private final Map additionalProperties; + + private UpdateExperimentRequestParameters( + Optional name, + OptionalNullable description, + Optional authenticationFlow, + Optional> allocations, + Optional defaultConfig, + Optional> levels, + Optional status, + Map additionalProperties) { + this.name = name; + this.description = description; + this.authenticationFlow = authenticationFlow; + this.allocations = allocations; + this.defaultConfig = defaultConfig; + this.levels = levels; + this.status = status; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the experiment + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return A description of the experiment + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + /** + * @return Specifies the target authentication flow for this experiment. This field can only be modified on draft experiments. Must be one of: authentication, mfa_enrollment, mfa_challenge, password_reset, passkey_enrollment, or all. Note that the all value targets every flow at once, but requires that this is the only active experiment. + */ + @JsonProperty("authentication_flow") + public Optional getAuthenticationFlow() { + return authenticationFlow; + } + + /** + * @return Replaces all traffic allocations. Cannot be modified while the experiment is active. + */ + @JsonProperty("allocations") + public Optional> getAllocations() { + return allocations; + } + + /** + * @return Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config, 'flag' uses the flag's frozen defaults. Can only be modified on draft experiments. Rejected for customer-defined flags. + */ + @JsonProperty("default_config") + public Optional getDefaultConfig() { + return defaultConfig; + } + + /** + * @return Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100]. Can only be modified on draft experiments. + */ + @JsonProperty("levels") + public Optional> getLevels() { + return levels; + } + + @JsonProperty("status") + public Optional getStatus() { + return status; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateExperimentRequestParameters && equalTo((UpdateExperimentRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateExperimentRequestParameters other) { + return name.equals(other.name) + && description.equals(other.description) + && authenticationFlow.equals(other.authenticationFlow) + && allocations.equals(other.allocations) + && defaultConfig.equals(other.defaultConfig) + && levels.equals(other.levels) + && status.equals(other.status); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.name, + this.description, + this.authenticationFlow, + this.allocations, + this.defaultConfig, + this.levels, + this.status); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + private Optional authenticationFlow = Optional.empty(); + + private Optional> allocations = Optional.empty(); + + private Optional defaultConfig = Optional.empty(); + + private Optional> levels = Optional.empty(); + + private Optional status = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateExperimentRequestParameters other) { + name(other.getName()); + description(other.getDescription()); + authenticationFlow(other.getAuthenticationFlow()); + allocations(other.getAllocations()); + defaultConfig(other.getDefaultConfig()); + levels(other.getLevels()); + status(other.getStatus()); + return this; + } + + /** + *

    A human-readable name for the experiment

    + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

    A description of the experiment

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

    Specifies the target authentication flow for this experiment. This field can only be modified on draft experiments. Must be one of: authentication, mfa_enrollment, mfa_challenge, password_reset, passkey_enrollment, or all. Note that the all value targets every flow at once, but requires that this is the only active experiment.

    + */ + @JsonSetter(value = "authentication_flow", nulls = Nulls.SKIP) + public Builder authenticationFlow(Optional authenticationFlow) { + this.authenticationFlow = authenticationFlow; + return this; + } + + public Builder authenticationFlow(AuthenticationFlowEnum authenticationFlow) { + this.authenticationFlow = Optional.ofNullable(authenticationFlow); + return this; + } + + /** + *

    Replaces all traffic allocations. Cannot be modified while the experiment is active.

    + */ + @JsonSetter(value = "allocations", nulls = Nulls.SKIP) + public Builder allocations(Optional> allocations) { + this.allocations = allocations; + return this; + } + + public Builder allocations(List allocations) { + this.allocations = Optional.ofNullable(allocations); + return this; + } + + /** + *

    Applies only to Auth0-managed flags. Controls where non-overridden config keys resolve from: 'tenant' inherits the tenant's live config, 'flag' uses the flag's frozen defaults. Can only be modified on draft experiments. Rejected for customer-defined flags.

    + */ + @JsonSetter(value = "default_config", nulls = Nulls.SKIP) + public Builder defaultConfig(Optional defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + public Builder defaultConfig(DefaultConfigEnum defaultConfig) { + this.defaultConfig = Optional.ofNullable(defaultConfig); + return this; + } + + /** + *

    Ramp experiment levels configuration. A strictly-increasing sequence of exposure percentages, each an integer in [0, 100]. Can only be modified on draft experiments.

    + */ + @JsonSetter(value = "levels", nulls = Nulls.SKIP) + public Builder levels(Optional> levels) { + this.levels = levels; + return this; + } + + public Builder levels(List levels) { + this.levels = Optional.ofNullable(levels); + return this; + } + + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(Optional status) { + this.status = status; + return this; + } + + public Builder status(ExperimentTransitionStatusEnum status) { + this.status = Optional.ofNullable(status); + return this; + } + + public UpdateExperimentRequestParameters build() { + return new UpdateExperimentRequestParameters( + name, + description, + authenticationFlow, + allocations, + defaultConfig, + levels, + status, + 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/experimentation/types/UpdateFeatureFlagRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/UpdateFeatureFlagRequestContent.java new file mode 100644 index 00000000..be184c6e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/UpdateFeatureFlagRequestContent.java @@ -0,0 +1,232 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.FeatureFlagConfigParam; +import com.auth0.client.mgmt.types.FeatureFlagStatusEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateFeatureFlagRequestContent.Builder.class) +public final class UpdateFeatureFlagRequestContent { + private final Optional name; + + private final OptionalNullable description; + + private final Optional> parameters; + + private final Optional status; + + private final Map additionalProperties; + + private UpdateFeatureFlagRequestContent( + Optional name, + OptionalNullable description, + Optional> parameters, + Optional status, + Map additionalProperties) { + this.name = name; + this.description = description; + this.parameters = parameters; + this.status = status; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the feature flag + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return A description of what this feature flag controls + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + @JsonProperty("parameters") + public Optional> getParameters() { + return parameters; + } + + /** + * @return Target lifecycle status (draft → active, draft → archived, active → archived). Activating a flag requires at least 2 variations. When combined with field edits, the edits and the transition are applied together; if the transition is rejected, no edits are applied. + */ + @JsonProperty("status") + public Optional getStatus() { + return status; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateFeatureFlagRequestContent && equalTo((UpdateFeatureFlagRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateFeatureFlagRequestContent other) { + return name.equals(other.name) + && description.equals(other.description) + && parameters.equals(other.parameters) + && status.equals(other.status); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.parameters, this.status); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + private Optional> parameters = Optional.empty(); + + private Optional status = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateFeatureFlagRequestContent other) { + name(other.getName()); + description(other.getDescription()); + parameters(other.getParameters()); + status(other.getStatus()); + return this; + } + + /** + *

    A human-readable name for the feature flag

    + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

    A description of what this feature flag controls

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

    Target lifecycle status (draft → active, draft → archived, active → archived). Activating a flag requires at least 2 variations. When combined with field edits, the edits and the transition are applied together; if the transition is rejected, no edits are applied.

    + */ + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(Optional status) { + this.status = status; + return this; + } + + public Builder status(FeatureFlagStatusEnum status) { + this.status = Optional.ofNullable(status); + return this; + } + + public UpdateFeatureFlagRequestContent build() { + return new UpdateFeatureFlagRequestContent(name, description, parameters, status, 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/experimentation/types/UpdateSegmentRequestContent.java b/src/main/java/com/auth0/client/mgmt/experimentation/types/UpdateSegmentRequestContent.java new file mode 100644 index 00000000..d0202648 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/experimentation/types/UpdateSegmentRequestContent.java @@ -0,0 +1,239 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.experimentation.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.types.SegmentRule; +import com.auth0.client.mgmt.types.SegmentStatusEnum; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateSegmentRequestContent.Builder.class) +public final class UpdateSegmentRequestContent { + private final Optional name; + + private final OptionalNullable description; + + private final Optional> rules; + + private final Optional status; + + private final Map additionalProperties; + + private UpdateSegmentRequestContent( + Optional name, + OptionalNullable description, + Optional> rules, + Optional status, + Map additionalProperties) { + this.name = name; + this.description = description; + this.rules = rules; + this.status = status; + this.additionalProperties = additionalProperties; + } + + /** + * @return A human-readable name for the segment + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return A description of the segment + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + /** + * @return Replaces the entire rules array. Each rule is limited to 4KB and the whole segment to 10KB (serialized). + */ + @JsonProperty("rules") + public Optional> getRules() { + return rules; + } + + /** + * @return Target lifecycle status. Archiving removes the segment from the active pool and is terminal (an archived segment cannot return to active). When combined with field edits, the edits apply first and the transition follows. + */ + @JsonProperty("status") + public Optional getStatus() { + return status; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateSegmentRequestContent && equalTo((UpdateSegmentRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateSegmentRequestContent other) { + return name.equals(other.name) + && description.equals(other.description) + && rules.equals(other.rules) + && status.equals(other.status); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.rules, this.status); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + private Optional> rules = Optional.empty(); + + private Optional status = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateSegmentRequestContent other) { + name(other.getName()); + description(other.getDescription()); + rules(other.getRules()); + status(other.getStatus()); + return this; + } + + /** + *

    A human-readable name for the segment

    + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

    A description of the segment

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

    Replaces the entire rules array. Each rule is limited to 4KB and the whole segment to 10KB (serialized).

    + */ + @JsonSetter(value = "rules", nulls = Nulls.SKIP) + public Builder rules(Optional> rules) { + this.rules = rules; + return this; + } + + public Builder rules(List rules) { + this.rules = Optional.ofNullable(rules); + return this; + } + + /** + *

    Target lifecycle status. Archiving removes the segment from the active pool and is terminal (an archived segment cannot return to active). When combined with field edits, the edits apply first and the transition follows.

    + */ + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(Optional status) { + this.status = status; + return this; + } + + public Builder status(SegmentStatusEnum status) { + this.status = Optional.ofNullable(status); + return this; + } + + public UpdateSegmentRequestContent build() { + return new UpdateSegmentRequestContent(name, description, rules, status, 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/flows/AsyncRawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java index 2a5f39b8..b45c9c3d 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java @@ -10,9 +10,11 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.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; @@ -65,6 +67,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -133,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), @@ -146,6 +164,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -206,6 +227,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -237,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), @@ -250,6 +285,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -290,6 +328,15 @@ public CompletableFuture> delete( 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 @@ -330,6 +377,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } 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 51c38d57..78887a5d 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java @@ -10,9 +10,11 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.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; @@ -60,6 +62,8 @@ public ManagementApiHttpResponse> list( .addPathSegments("flows") .addPathSegment(flowId) .addPathSegments("executions"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -80,6 +84,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -111,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); @@ -121,6 +137,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -172,6 +190,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -191,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); @@ -201,6 +231,8 @@ public ManagementApiHttpResponse get( 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); } @@ -232,6 +264,15 @@ public ManagementApiHttpResponse delete(String flowId, String executionId, if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -259,6 +300,8 @@ public ManagementApiHttpResponse delete(String flowId, String executionId, 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/flows/types/GetFlowExecutionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/flows/types/GetFlowExecutionRequestParameters.java index b630e8dd..f39a035e 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/types/GetFlowExecutionRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/flows/types/GetFlowExecutionRequestParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.flows.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.types.GetFlowExecutionRequestParametersHydrateEnum; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -46,6 +48,12 @@ public Optional> getHydrate() return hydrate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("hydrate") + private Optional> _getHydrate() { + return hydrate; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java index 7faee5d0..1d1298a2 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.flows.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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListFlowExecutionsRequestParameters.Builder.class) public final class ListFlowExecutionsRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -29,16 +32,33 @@ public final class ListFlowExecutionsRequestParameters { private final Map additionalProperties; private ListFlowExecutionsRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { + OptionalNullable includeTotals, + OptionalNullable from, + OptionalNullable take, + Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +69,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +78,24 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -70,12 +109,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListFlowExecutionsRequestParameters other) { - return from.equals(other.from) && take.equals(other.take); + return includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take); + return Objects.hash(this.includeTotals, this.from, this.take); } @java.lang.Override @@ -89,6 +128,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -99,11 +140,46 @@ public static final class Builder { private Builder() {} public Builder from(ListFlowExecutionsRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; } + /** + *

    Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

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

    Optional Id from which to start selection.

    */ @@ -173,7 +249,7 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { } public ListFlowExecutionsRequestParameters build() { - return new ListFlowExecutionsRequestParameters(from, take, additionalProperties); + return new ListFlowExecutionsRequestParameters(includeTotals, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncRawConnectionsClient.java index 811186f6..9d9e6e3a 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncRawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncRawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -88,6 +89,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -154,6 +164,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -200,6 +213,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -244,6 +266,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -282,6 +307,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -331,6 +365,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -368,6 +405,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -408,6 +454,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -464,6 +513,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -513,6 +571,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/vault/RawConnectionsClient.java index 56969cf9..b76c729d 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/RawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/flows/vault/RawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -83,6 +84,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -126,6 +136,8 @@ public ManagementApiHttpResponse 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); } @@ -164,6 +176,15 @@ public ManagementApiHttpResponse crea 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() : "{}"; @@ -194,6 +215,8 @@ public ManagementApiHttpResponse crea 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); } @@ -224,6 +247,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -257,6 +289,8 @@ public ManagementApiHttpResponse get( 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); } @@ -286,6 +320,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -313,6 +356,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -361,6 +406,15 @@ public ManagementApiHttpResponse upda 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() : "{}"; @@ -394,6 +448,8 @@ public ManagementApiHttpResponse upda 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/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java index 522da4a4..7498b81c 100644 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.flows.vault.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListFlowsVaultConnectionsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java b/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java index 7d30c814..e6765931 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -103,6 +104,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -168,6 +178,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/groups/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/groups/AsyncRawRolesClient.java index b5abe311..8de3e8ad 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/groups/AsyncRawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -99,6 +100,15 @@ public CompletableFuture>> li 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 @@ -162,6 +172,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -216,6 +229,15 @@ public CompletableFuture> create( 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 @@ -261,6 +283,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -315,6 +340,15 @@ public CompletableFuture> delete( 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 @@ -360,6 +394,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java b/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java index 1473c454..c492781f 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -97,6 +98,15 @@ public ManagementApiHttpResponse> get( 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() : "{}"; @@ -140,6 +150,8 @@ public ManagementApiHttpResponse> get( 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/groups/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/groups/RawRolesClient.java index 23185711..1579668c 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/groups/RawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -93,6 +94,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -135,6 +145,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -180,6 +192,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -210,6 +231,8 @@ public ManagementApiHttpResponse create( 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); } @@ -255,6 +278,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -285,6 +317,8 @@ public ManagementApiHttpResponse delete( 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/groups/types/GetGroupMembersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java index 9a9e524e..cd4db832 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.groups.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.JsonIgnore; 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; @@ -48,7 +49,8 @@ private GetGroupMembersRequestParameters( /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -59,7 +61,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -70,7 +73,8 @@ public OptionalNullable getIncludeFields() { /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -81,7 +85,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -89,6 +94,30 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/groups/types/ListGroupRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/groups/types/ListGroupRolesRequestParameters.java index 417c9c74..39ffbc71 100644 --- a/src/main/java/com/auth0/client/mgmt/groups/types/ListGroupRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/groups/types/ListGroupRolesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.groups.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListGroupRolesRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncFactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncFactorsClient.java index e387e191..8b80553f 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncFactorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/AsyncFactorsClient.java @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.Suppliers; +import com.auth0.client.mgmt.guardian.factors.AsyncEmailClient; import com.auth0.client.mgmt.guardian.factors.AsyncPhoneClient; import com.auth0.client.mgmt.guardian.factors.AsyncPushNotificationClient; import com.auth0.client.mgmt.guardian.factors.AsyncSmsClient; @@ -23,6 +24,8 @@ public class AsyncFactorsClient { private final AsyncRawFactorsClient rawClient; + protected final Supplier emailClient; + protected final Supplier phoneClient; protected final Supplier pushNotificationClient; @@ -34,6 +37,7 @@ public class AsyncFactorsClient { public AsyncFactorsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new AsyncRawFactorsClient(clientOptions); + this.emailClient = Suppliers.memoize(() -> new AsyncEmailClient(clientOptions)); this.phoneClient = Suppliers.memoize(() -> new AsyncPhoneClient(clientOptions)); this.pushNotificationClient = Suppliers.memoize(() -> new AsyncPushNotificationClient(clientOptions)); this.smsClient = Suppliers.memoize(() -> new AsyncSmsClient(clientOptions)); @@ -77,6 +81,10 @@ public CompletableFuture set( return this.rawClient.set(name, request, requestOptions).thenApply(response -> response.body()); } + public AsyncEmailClient email() { + return this.emailClient.get(); + } + public AsyncPhoneClient phone() { return this.phoneClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncGuardianClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncGuardianClient.java deleted file mode 100644 index ce7f4ca9..00000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncGuardianClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncGuardianClient { - protected final ClientOptions clientOptions; - - protected final Supplier enrollmentsClient; - - protected final Supplier factorsClient; - - protected final Supplier policiesClient; - - public AsyncGuardianClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.enrollmentsClient = Suppliers.memoize(() -> new AsyncEnrollmentsClient(clientOptions)); - this.factorsClient = Suppliers.memoize(() -> new AsyncFactorsClient(clientOptions)); - this.policiesClient = Suppliers.memoize(() -> new AsyncPoliciesClient(clientOptions)); - } - - public AsyncEnrollmentsClient enrollments() { - return this.enrollmentsClient.get(); - } - - public AsyncFactorsClient factors() { - return this.factorsClient.get(); - } - - public AsyncPoliciesClient policies() { - return this.policiesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java index 35a13ab8..41d40934 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -77,6 +78,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -121,6 +131,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -165,6 +178,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -204,6 +226,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -247,6 +272,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -282,6 +316,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java index 9d0c81b9..134568c7 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -69,6 +70,15 @@ public CompletableFuture>> list(R 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 @@ -107,6 +117,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -160,6 +173,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -199,6 +221,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java index c72388dd..f3805533 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -78,6 +79,15 @@ public CompletableFuture>> list(Re 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 @@ -116,6 +126,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -179,6 +192,15 @@ public CompletableFuture>> set( 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 @@ -217,6 +239,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java index 8425b8b9..0e29a31f 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.core.Suppliers; +import com.auth0.client.mgmt.guardian.factors.EmailClient; import com.auth0.client.mgmt.guardian.factors.PhoneClient; import com.auth0.client.mgmt.guardian.factors.PushNotificationClient; import com.auth0.client.mgmt.guardian.factors.SmsClient; @@ -22,6 +23,8 @@ public class FactorsClient { private final RawFactorsClient rawClient; + protected final Supplier emailClient; + protected final Supplier phoneClient; protected final Supplier pushNotificationClient; @@ -33,6 +36,7 @@ public class FactorsClient { public FactorsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.rawClient = new RawFactorsClient(clientOptions); + this.emailClient = Suppliers.memoize(() -> new EmailClient(clientOptions)); this.phoneClient = Suppliers.memoize(() -> new PhoneClient(clientOptions)); this.pushNotificationClient = Suppliers.memoize(() -> new PushNotificationClient(clientOptions)); this.smsClient = Suppliers.memoize(() -> new SmsClient(clientOptions)); @@ -75,6 +79,10 @@ public SetGuardianFactorResponseContent set( return this.rawClient.set(name, request, requestOptions).body(); } + public EmailClient email() { + return this.emailClient.get(); + } + public PhoneClient phone() { return this.phoneClient.get(); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/GuardianClient.java b/src/main/java/com/auth0/client/mgmt/guardian/GuardianClient.java deleted file mode 100644 index 0850d1d0..00000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/GuardianClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class GuardianClient { - protected final ClientOptions clientOptions; - - protected final Supplier enrollmentsClient; - - protected final Supplier factorsClient; - - protected final Supplier policiesClient; - - public GuardianClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.enrollmentsClient = Suppliers.memoize(() -> new EnrollmentsClient(clientOptions)); - this.factorsClient = Suppliers.memoize(() -> new FactorsClient(clientOptions)); - this.policiesClient = Suppliers.memoize(() -> new PoliciesClient(clientOptions)); - } - - public EnrollmentsClient enrollments() { - return this.enrollmentsClient.get(); - } - - public FactorsClient factors() { - return this.factorsClient.get(); - } - - public PoliciesClient policies() { - return this.policiesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java index 1af3e0d5..edf239c9 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -73,6 +74,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -103,6 +113,8 @@ public ManagementApiHttpResponse 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); } @@ -139,6 +151,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -166,6 +187,8 @@ public ManagementApiHttpResponse get( 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); } @@ -201,6 +224,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -225,6 +257,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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/guardian/RawFactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/RawFactorsClient.java index 09ddffd7..0b2a39b0 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/RawFactorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/RawFactorsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -65,6 +66,15 @@ public ManagementApiHttpResponse> list(RequestOptions reque 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() : "{}"; @@ -92,6 +102,8 @@ public ManagementApiHttpResponse> list(RequestOptions reque 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); } @@ -137,6 +149,15 @@ public ManagementApiHttpResponse set( 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() : "{}"; @@ -163,6 +184,8 @@ public ManagementApiHttpResponse set( 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/guardian/RawPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/guardian/RawPoliciesClient.java index 3fbc2bce..bba0d10b 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/RawPoliciesClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/RawPoliciesClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -74,6 +75,15 @@ public ManagementApiHttpResponse> list(RequestOptions reques 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() : "{}"; @@ -101,6 +111,8 @@ public ManagementApiHttpResponse> list(RequestOptions reques 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); } @@ -156,6 +168,15 @@ public ManagementApiHttpResponse> set( 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() : "{}"; @@ -183,6 +204,8 @@ public ManagementApiHttpResponse> set( 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/guardian/factors/AsyncEmailClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncEmailClient.java new file mode 100644 index 00000000..0f5fa904 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncEmailClient.java @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.guardian.factors; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.guardian.factors.types.SetEmailFactorSettingsRequestContent; +import com.auth0.client.mgmt.types.GetEmailFactorSettingsResponseContent; +import com.auth0.client.mgmt.types.SetEmailFactorSettingsResponseContent; +import java.util.concurrent.CompletableFuture; + +public class AsyncEmailClient { + protected final ClientOptions clientOptions; + + private final AsyncRawEmailClient rawClient; + + public AsyncEmailClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawEmailClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawEmailClient withRawResponse() { + return this.rawClient; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture get() { + return this.rawClient.get().thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture set(SetEmailFactorSettingsRequestContent request) { + return this.rawClient.set(request).thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture set( + SetEmailFactorSettingsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPhoneClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPhoneClient.java index 955dcc44..864c6e0a 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPhoneClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPhoneClient.java @@ -9,14 +9,17 @@ import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorPhoneTemplatesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneTwilioRequestContent; +import com.auth0.client.mgmt.guardian.factors.types.SetPhoneFactorSettingsRequestContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.GetPhoneFactorSettingsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.SetPhoneFactorSettingsResponseContent; import java.util.concurrent.CompletableFuture; public class AsyncPhoneClient { @@ -138,6 +141,35 @@ public CompletableFuture setProv return this.rawClient.setProvider(request, requestOptions).thenApply(response -> response.body()); } + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture get() { + return this.rawClient.get().thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture set(SetPhoneFactorSettingsRequestContent request) { + return this.rawClient.set(request).thenApply(response -> response.body()); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture set( + SetPhoneFactorSettingsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(request, requestOptions).thenApply(response -> response.body()); + } + /** * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. */ diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawEmailClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawEmailClient.java new file mode 100644 index 00000000..700b5898 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawEmailClient.java @@ -0,0 +1,243 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.guardian.factors; + +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.ForbiddenError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.guardian.factors.types.SetEmailFactorSettingsRequestContent; +import com.auth0.client.mgmt.types.GetEmailFactorSettingsResponseContent; +import com.auth0.client.mgmt.types.SetEmailFactorSettingsResponseContent; +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 AsyncRawEmailClient { + protected final ClientOptions clientOptions; + + public AsyncRawEmailClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> get() { + return get(null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> get( + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/email/settings"); + 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, GetEmailFactorSettingsResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (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; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> set( + SetEmailFactorSettingsRequestContent request) { + return set(request, null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> set( + SetEmailFactorSettingsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/email/settings"); + 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("PUT", 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, SetEmailFactorSettingsResponseContent.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 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/guardian/factors/AsyncRawPhoneClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPhoneClient.java index 3071a7d4..b8c1c411 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPhoneClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPhoneClient.java @@ -10,22 +10,27 @@ 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.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.guardian.factors.types.SetGuardianFactorPhoneMessageTypesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorPhoneTemplatesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneTwilioRequestContent; +import com.auth0.client.mgmt.guardian.factors.types.SetPhoneFactorSettingsRequestContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.GetPhoneFactorSettingsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.SetPhoneFactorSettingsResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.util.concurrent.CompletableFuture; @@ -78,6 +83,15 @@ public AsyncRawPhoneClient(ClientOptions clientOptions) { 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() { @@ -117,6 +131,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -169,6 +186,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -213,6 +239,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -257,6 +286,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -296,6 +334,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -367,6 +408,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -406,6 +456,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -450,6 +503,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -489,6 +551,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -535,6 +600,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -574,6 +648,211 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> get() { + return get(null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> get( + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/phone/settings"); + 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, GetPhoneFactorSettingsResponseContent.class), + response)); + return; + } + try { + switch (response.code()) { + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (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; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> set( + SetPhoneFactorSettingsRequestContent request) { + return set(request, null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public CompletableFuture> set( + SetPhoneFactorSettingsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/phone/settings"); + 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("PUT", 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, SetPhoneFactorSettingsResponseContent.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 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)); } @@ -617,6 +896,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -656,6 +944,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -708,6 +999,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -747,6 +1047,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPushNotificationClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPushNotificationClient.java index 04d68900..5a07086e 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPushNotificationClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPushNotificationClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -84,6 +85,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -123,6 +133,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -197,6 +210,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -237,6 +259,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -315,6 +340,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -355,6 +389,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -426,6 +463,15 @@ public CompletableFuture>> setFcmP 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 @@ -464,6 +510,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -535,6 +584,15 @@ public CompletableFuture>> updateF 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 @@ -573,6 +631,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -644,6 +705,15 @@ public CompletableFuture>> setFcmv 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 @@ -682,6 +752,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -753,6 +826,15 @@ public CompletableFuture>> updateF 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 @@ -791,6 +873,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -834,6 +919,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -873,6 +967,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -947,6 +1044,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -987,6 +1093,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1061,6 +1170,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -1101,6 +1219,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1145,6 +1266,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -1185,6 +1315,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -1238,6 +1371,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -1278,6 +1420,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawSmsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawSmsClient.java index 99d89351..9af12cf9 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawSmsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawSmsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -23,7 +24,9 @@ import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -78,6 +81,15 @@ public AsyncRawSmsClient(ClientOptions clientOptions) { 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() { @@ -117,6 +129,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -196,6 +211,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -235,6 +259,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -283,6 +310,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -322,6 +358,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -378,6 +417,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -417,6 +465,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -435,7 +486,8 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public CompletableFuture> getTemplates() { + public CompletableFuture>> + getTemplates() { return getTemplates(null); } @@ -444,8 +496,8 @@ public CompletableFuturePrevious function: Retrieve details of SMS enrollment and verification templates configured for your tenant. *
    */ - public CompletableFuture> getTemplates( - RequestOptions requestOptions) { + public CompletableFuture>> + getTemplates(RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("guardian/factors/sms/templates"); @@ -464,7 +516,16 @@ public CompletableFuture> future = + 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 @@ -474,7 +535,8 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO if (response.isSuccessful()) { future.complete(new ManagementApiHttpResponse<>( ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorSmsTemplatesResponseContent.class), + responseBodyString, + new TypeReference>() {}), response)); return; } @@ -503,6 +565,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -559,6 +624,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -598,6 +672,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncSmsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncSmsClient.java index 32a918da..51571cfe 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncSmsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncSmsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; +import java.util.Optional; import java.util.concurrent.CompletableFuture; public class AsyncSmsClient { @@ -135,7 +136,7 @@ public CompletableFuture setProvid *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public CompletableFuture getTemplates() { + public CompletableFuture> getTemplates() { return this.rawClient.getTemplates().thenApply(response -> response.body()); } @@ -144,7 +145,8 @@ public CompletableFuture getTempla *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public CompletableFuture getTemplates(RequestOptions requestOptions) { + public CompletableFuture> getTemplates( + RequestOptions requestOptions) { return this.rawClient.getTemplates(requestOptions).thenApply(response -> response.body()); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/EmailClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/EmailClient.java new file mode 100644 index 00000000..8107c39d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/EmailClient.java @@ -0,0 +1,57 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.guardian.factors; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.guardian.factors.types.SetEmailFactorSettingsRequestContent; +import com.auth0.client.mgmt.types.GetEmailFactorSettingsResponseContent; +import com.auth0.client.mgmt.types.SetEmailFactorSettingsResponseContent; + +public class EmailClient { + protected final ClientOptions clientOptions; + + private final RawEmailClient rawClient; + + public EmailClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawEmailClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawEmailClient withRawResponse() { + return this.rawClient; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public GetEmailFactorSettingsResponseContent get() { + return this.rawClient.get().body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public GetEmailFactorSettingsResponseContent get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public SetEmailFactorSettingsResponseContent set(SetEmailFactorSettingsRequestContent request) { + return this.rawClient.set(request).body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public SetEmailFactorSettingsResponseContent set( + SetEmailFactorSettingsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/PhoneClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/PhoneClient.java index baae8b16..a41e3157 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/PhoneClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/PhoneClient.java @@ -9,14 +9,17 @@ import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorPhoneTemplatesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneTwilioRequestContent; +import com.auth0.client.mgmt.guardian.factors.types.SetPhoneFactorSettingsRequestContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.GetPhoneFactorSettingsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.SetPhoneFactorSettingsResponseContent; public class PhoneClient { protected final ClientOptions clientOptions; @@ -133,6 +136,35 @@ public SetGuardianFactorsProviderPhoneResponseContent setProvider( return this.rawClient.setProvider(request, requestOptions).body(); } + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public GetPhoneFactorSettingsResponseContent get() { + return this.rawClient.get().body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public GetPhoneFactorSettingsResponseContent get(RequestOptions requestOptions) { + return this.rawClient.get(requestOptions).body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public SetPhoneFactorSettingsResponseContent set(SetPhoneFactorSettingsRequestContent request) { + return this.rawClient.set(request).body(); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public SetPhoneFactorSettingsResponseContent set( + SetPhoneFactorSettingsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.set(request, requestOptions).body(); + } + /** * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. */ diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawEmailClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawEmailClient.java new file mode 100644 index 00000000..fe18b67c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawEmailClient.java @@ -0,0 +1,194 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.guardian.factors; + +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.ForbiddenError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.guardian.factors.types.SetEmailFactorSettingsRequestContent; +import com.auth0.client.mgmt.types.GetEmailFactorSettingsResponseContent; +import com.auth0.client.mgmt.types.SetEmailFactorSettingsResponseContent; +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 RawEmailClient { + protected final ClientOptions clientOptions; + + public RawEmailClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse get() { + return get(null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse get(RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/email/settings"); + 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, GetEmailFactorSettingsResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse set( + SetEmailFactorSettingsRequestContent request) { + return set(request, null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse set( + SetEmailFactorSettingsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/email/settings"); + 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("PUT", 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, SetEmailFactorSettingsResponseContent.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 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/guardian/factors/RawPhoneClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPhoneClient.java index 440e0799..2926220f 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPhoneClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPhoneClient.java @@ -10,22 +10,27 @@ 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.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.guardian.factors.types.SetGuardianFactorPhoneMessageTypesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorPhoneTemplatesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneTwilioRequestContent; +import com.auth0.client.mgmt.guardian.factors.types.SetPhoneFactorSettingsRequestContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.GetPhoneFactorSettingsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.SetPhoneFactorSettingsResponseContent; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import okhttp3.Headers; @@ -73,6 +78,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -386,6 +444,8 @@ public ManagementApiHttpResponse 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); } @@ -424,6 +484,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -451,6 +520,165 @@ public ManagementApiHttpResponse 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); + } + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse get() { + return get(null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse get(RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/phone/settings"); + 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, GetPhoneFactorSettingsResponseContent.class), + response); + } + try { + switch (response.code()) { + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse set( + SetPhoneFactorSettingsRequestContent request) { + return set(request, null); + } + + /** + * TODO: Link this endpoint to relevant documentation when available. + */ + public ManagementApiHttpResponse set( + SetPhoneFactorSettingsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("guardian/factors/phone/settings"); + 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("PUT", 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, SetPhoneFactorSettingsResponseContent.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 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); } @@ -486,6 +714,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -513,6 +750,8 @@ public ManagementApiHttpResponse 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); } @@ -557,6 +796,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -584,6 +832,8 @@ public ManagementApiHttpResponse 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/guardian/factors/RawPushNotificationClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPushNotificationClient.java index 3bf70718..54f54276 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPushNotificationClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPushNotificationClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -79,6 +80,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -106,6 +116,8 @@ public ManagementApiHttpResponse 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); } @@ -169,6 +181,15 @@ public ManagementApiHttpResponse> setFcmProvider( 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() : "{}"; @@ -380,6 +423,8 @@ public ManagementApiHttpResponse> setFcmProvider( 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); } @@ -442,6 +487,15 @@ public ManagementApiHttpResponse> updateFcmProvider( 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() : "{}"; @@ -469,6 +523,8 @@ public ManagementApiHttpResponse> updateFcmProvider( 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); } @@ -531,6 +587,15 @@ public ManagementApiHttpResponse> setFcmv1Provider( 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() : "{}"; @@ -558,6 +623,8 @@ public ManagementApiHttpResponse> setFcmv1Provider( 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); } @@ -620,6 +687,15 @@ public ManagementApiHttpResponse> updateFcmv1Provider( 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() : "{}"; @@ -647,6 +723,8 @@ public ManagementApiHttpResponse> updateFcmv1Provider( 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); } @@ -682,6 +760,15 @@ public ManagementApiHttpResponse g 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() : "{}"; @@ -709,6 +796,8 @@ public ManagementApiHttpResponse g 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); } @@ -772,6 +861,15 @@ public ManagementApiHttpResponse g 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() : "{}"; @@ -262,6 +296,8 @@ public ManagementApiHttpResponse g 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); } @@ -310,6 +346,15 @@ public ManagementApiHttpResponse s 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() : "{}"; @@ -337,6 +382,8 @@ public ManagementApiHttpResponse s 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); } @@ -347,7 +394,7 @@ public ManagementApiHttpResponse s *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public ManagementApiHttpResponse getTemplates() { + public ManagementApiHttpResponse> getTemplates() { return getTemplates(null); } @@ -356,7 +403,7 @@ public ManagementApiHttpResponse g *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public ManagementApiHttpResponse getTemplates( + public ManagementApiHttpResponse> getTemplates( RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -376,13 +423,23 @@ public ManagementApiHttpResponse g 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, GetGuardianFactorSmsTemplatesResponseContent.class), + responseBodyString, + new TypeReference>() {}), response); } try { @@ -403,6 +460,8 @@ public ManagementApiHttpResponse g 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); } @@ -451,6 +510,15 @@ public ManagementApiHttpResponse s 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() : "{}"; @@ -478,6 +546,8 @@ public ManagementApiHttpResponse s 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/guardian/factors/SmsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/SmsClient.java index 9120fdab..764acf3b 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/SmsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/SmsClient.java @@ -14,6 +14,7 @@ import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; +import java.util.Optional; public class SmsClient { protected final ClientOptions clientOptions; @@ -131,7 +132,7 @@ public SetGuardianFactorsProviderSmsResponseContent setProvider( *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public GetGuardianFactorSmsTemplatesResponseContent getTemplates() { + public Optional getTemplates() { return this.rawClient.getTemplates().body(); } @@ -140,7 +141,7 @@ public GetGuardianFactorSmsTemplatesResponseContent getTemplates() { *
    Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant.
          * 
    */ - public GetGuardianFactorSmsTemplatesResponseContent getTemplates(RequestOptions requestOptions) { + public Optional getTemplates(RequestOptions requestOptions) { return this.rawClient.getTemplates(requestOptions).body(); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncRawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncRawSettingsClient.java index 6033e08a..382f9b91 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncRawSettingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncRawSettingsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -69,6 +70,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -108,6 +118,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -175,6 +188,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -214,6 +236,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -269,6 +294,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -308,6 +342,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/RawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/RawSettingsClient.java index c14fc393..12c83aca 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/RawSettingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/RawSettingsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.UnauthorizedError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse ge 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() : "{}"; @@ -91,6 +101,8 @@ public ManagementApiHttpResponse ge 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); } @@ -149,6 +161,15 @@ public ManagementApiHttpResponse se 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() : "{}"; @@ -176,6 +197,8 @@ public ManagementApiHttpResponse se 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); } @@ -223,6 +246,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -250,6 +282,8 @@ public ManagementApiHttpResponse 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/guardian/factors/types/SetEmailFactorSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetEmailFactorSettingsRequestContent.java new file mode 100644 index 00000000..6dbf47ae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetEmailFactorSettingsRequestContent.java @@ -0,0 +1,161 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.guardian.factors.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetEmailFactorSettingsRequestContent.Builder.class) +public final class SetEmailFactorSettingsRequestContent { + private final int otpLength; + + private final int otpExpirationTime; + + private final Map additionalProperties; + + private SetEmailFactorSettingsRequestContent( + int otpLength, int otpExpirationTime, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public int getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public int getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetEmailFactorSettingsRequestContent + && equalTo((SetEmailFactorSettingsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetEmailFactorSettingsRequestContent other) { + return otpLength == other.otpLength && otpExpirationTime == other.otpExpirationTime; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OtpLengthStage builder() { + return new Builder(); + } + + public interface OtpLengthStage { + /** + *

    The length of the OTP code.

    + */ + OtpExpirationTimeStage otpLength(int otpLength); + + Builder from(SetEmailFactorSettingsRequestContent other); + } + + public interface OtpExpirationTimeStage { + /** + *

    The OTP expiration time in seconds.

    + */ + _FinalStage otpExpirationTime(int otpExpirationTime); + } + + public interface _FinalStage { + SetEmailFactorSettingsRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OtpLengthStage, OtpExpirationTimeStage, _FinalStage { + private int otpLength; + + private int otpExpirationTime; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetEmailFactorSettingsRequestContent other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

    The length of the OTP code.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_length") + public OtpExpirationTimeStage otpLength(int otpLength) { + this.otpLength = otpLength; + return this; + } + + /** + *

    The OTP expiration time in seconds.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_expiration_time") + public _FinalStage otpExpirationTime(int otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + @java.lang.Override + public SetEmailFactorSettingsRequestContent build() { + return new SetEmailFactorSettingsRequestContent(otpLength, otpExpirationTime, 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/guardian/factors/types/SetGuardianFactorPhoneTemplatesRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneTemplatesRequestContent.java index 0ae80d52..b3ade47d 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneTemplatesRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneTemplatesRequestContent.java @@ -122,7 +122,6 @@ public Builder from(SetGuardianFactorPhoneTemplatesRequestContent other) { } /** - *

    Message sent to the user when they are invited to enroll with a phone number.

    *

    Message sent to the user when they are invited to enroll with a phone number.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMess } /** - *

    Message sent to the user when they are prompted to verify their account.

    *

    Message sent to the user when they are prompted to verify their account.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorSmsTemplatesRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorSmsTemplatesRequestContent.java index b3acce3e..a790077e 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorSmsTemplatesRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorSmsTemplatesRequestContent.java @@ -122,7 +122,6 @@ public Builder from(SetGuardianFactorSmsTemplatesRequestContent other) { } /** - *

    Message sent to the user when they are invited to enroll with a phone number.

    *

    Message sent to the user when they are invited to enroll with a phone number.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMess } /** - *

    Message sent to the user when they are prompted to verify their account.

    *

    Message sent to the user when they are prompted to verify their account.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetPhoneFactorSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetPhoneFactorSettingsRequestContent.java new file mode 100644 index 00000000..ecd3bbba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetPhoneFactorSettingsRequestContent.java @@ -0,0 +1,161 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.guardian.factors.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetPhoneFactorSettingsRequestContent.Builder.class) +public final class SetPhoneFactorSettingsRequestContent { + private final int otpLength; + + private final int otpExpirationTime; + + private final Map additionalProperties; + + private SetPhoneFactorSettingsRequestContent( + int otpLength, int otpExpirationTime, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public int getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public int getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetPhoneFactorSettingsRequestContent + && equalTo((SetPhoneFactorSettingsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetPhoneFactorSettingsRequestContent other) { + return otpLength == other.otpLength && otpExpirationTime == other.otpExpirationTime; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OtpLengthStage builder() { + return new Builder(); + } + + public interface OtpLengthStage { + /** + *

    The length of the OTP code.

    + */ + OtpExpirationTimeStage otpLength(int otpLength); + + Builder from(SetPhoneFactorSettingsRequestContent other); + } + + public interface OtpExpirationTimeStage { + /** + *

    The OTP expiration time in seconds.

    + */ + _FinalStage otpExpirationTime(int otpExpirationTime); + } + + public interface _FinalStage { + SetPhoneFactorSettingsRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OtpLengthStage, OtpExpirationTimeStage, _FinalStage { + private int otpLength; + + private int otpExpirationTime; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetPhoneFactorSettingsRequestContent other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

    The length of the OTP code.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_length") + public OtpExpirationTimeStage otpLength(int otpLength) { + this.otpLength = otpLength; + return this; + } + + /** + *

    The OTP expiration time in seconds.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_expiration_time") + public _FinalStage otpExpirationTime(int otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + @java.lang.Override + public SetPhoneFactorSettingsRequestContent build() { + return new SetPhoneFactorSettingsRequestContent(otpLength, otpExpirationTime, 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/guardian/types/CreateGuardianEnrollmentTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/types/CreateGuardianEnrollmentTicketRequestContent.java index e55872ce..701bd0c9 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/types/CreateGuardianEnrollmentTicketRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/types/CreateGuardianEnrollmentTicketRequestContent.java @@ -214,7 +214,6 @@ public Builder from(CreateGuardianEnrollmentTicketRequestContent other) { } /** - *

    user_id for the enrollment ticket

    *

    user_id for the enrollment ticket

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/guardian/types/SetGuardianFactorRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/types/SetGuardianFactorRequestContent.java index b20967eb..bdc5e50a 100644 --- a/src/main/java/com/auth0/client/mgmt/guardian/types/SetGuardianFactorRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/guardian/types/SetGuardianFactorRequestContent.java @@ -97,7 +97,6 @@ public Builder from(SetGuardianFactorRequestContent other) { } /** - *

    Whether this factor is enabled (true) or disabled (false).

    *

    Whether this factor is enabled (true) or disabled (false).

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java b/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java index 1dc678ac..57ba5642 100644 --- a/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java +++ b/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java @@ -10,6 +10,7 @@ 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; @@ -72,6 +73,15 @@ public CompletableFuture>> get( 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 @@ -120,6 +130,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -173,6 +186,15 @@ public CompletableFuture> create( 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 @@ -218,6 +240,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -271,6 +296,15 @@ public CompletableFuture> delete( 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 @@ -311,6 +345,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -364,6 +401,15 @@ public CompletableFuture> update( 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 @@ -414,6 +460,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java b/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java index 7a1fddb0..0e75523f 100644 --- a/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java +++ b/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java @@ -10,6 +10,7 @@ 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; @@ -67,6 +68,15 @@ public ManagementApiHttpResponse> get(String id, RequestOpti 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() : "{}"; @@ -100,6 +110,8 @@ public ManagementApiHttpResponse> get(String id, RequestOpti 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); } @@ -145,6 +157,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -175,6 +196,8 @@ public ManagementApiHttpResponse create( 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); } @@ -219,6 +242,15 @@ public ManagementApiHttpResponse delete(String id, List request, R if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -246,6 +278,8 @@ public ManagementApiHttpResponse delete(String id, List request, R 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); } @@ -291,6 +325,15 @@ public ManagementApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -324,6 +367,8 @@ public ManagementApiHttpResponse update( 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/jobs/AsyncErrorsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncErrorsClient.java index 55043ca4..30a460ac 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncErrorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/AsyncErrorsClient.java @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; +import java.util.Optional; import java.util.concurrent.CompletableFuture; public class AsyncErrorsClient { @@ -28,14 +29,14 @@ public AsyncRawErrorsClient withRawResponse() { /** * Retrieve error details of a failed job. */ - public CompletableFuture get(String id) { + public CompletableFuture> get(String id) { return this.rawClient.get(id).thenApply(response -> response.body()); } /** * Retrieve error details of a failed job. */ - public CompletableFuture get(String id, RequestOptions requestOptions) { + 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/jobs/AsyncRawErrorsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawErrorsClient.java index 83a2e1ab..46d59bea 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawErrorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawErrorsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -16,7 +17,9 @@ import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -38,14 +41,14 @@ public AsyncRawErrorsClient(ClientOptions clientOptions) { /** * Retrieve error details of a failed job. */ - public CompletableFuture> get(String id) { + public CompletableFuture>> get(String id) { return get(id, null); } /** * Retrieve error details of a failed job. */ - public CompletableFuture> get( + public CompletableFuture>> get( String id, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -67,7 +70,16 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - CompletableFuture> future = new CompletableFuture<>(); + 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 { @@ -75,7 +87,8 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ErrorsGetResponse.class), + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), response)); return; } @@ -114,6 +127,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersExportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersExportsClient.java index 89cd124c..4cf7e831 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersExportsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersExportsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -91,6 +92,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -135,6 +145,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersImportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersImportsClient.java index 0f0a1d2d..753fdfc0 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersImportsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersImportsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ContentTooLargeError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -98,6 +99,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -152,6 +162,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -177,7 +190,7 @@ public CompletableFuture> future = @@ -234,6 +247,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -259,7 +275,7 @@ public CompletableFuture> future = @@ -316,6 +332,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -352,6 +371,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -406,6 +434,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -442,6 +473,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -496,6 +536,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawVerificationEmailClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawVerificationEmailClient.java index 28d51b77..143cb035 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawVerificationEmailClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawVerificationEmailClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -78,6 +79,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -122,6 +132,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java index bde7f5fd..2e078368 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java @@ -6,6 +6,7 @@ import com.auth0.client.mgmt.core.ClientOptions; import com.auth0.client.mgmt.core.RequestOptions; import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; +import java.util.Optional; public class ErrorsClient { protected final ClientOptions clientOptions; @@ -27,14 +28,14 @@ public RawErrorsClient withRawResponse() { /** * Retrieve error details of a failed job. */ - public ErrorsGetResponse get(String id) { + public Optional get(String id) { return this.rawClient.get(id).body(); } /** * Retrieve error details of a failed job. */ - public ErrorsGetResponse get(String id, RequestOptions requestOptions) { + public Optional get(String id, RequestOptions requestOptions) { return this.rawClient.get(id, requestOptions).body(); } } diff --git a/src/main/java/com/auth0/client/mgmt/jobs/RawErrorsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/RawErrorsClient.java index a56fe583..66588a2a 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawErrorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/RawErrorsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -16,7 +17,9 @@ import com.auth0.client.mgmt.errors.UnauthorizedError; import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; +import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -34,14 +37,14 @@ public RawErrorsClient(ClientOptions clientOptions) { /** * Retrieve error details of a failed job. */ - public ManagementApiHttpResponse get(String id) { + public ManagementApiHttpResponse> get(String id) { return get(id, null); } /** * Retrieve error details of a failed job. */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { + public ManagementApiHttpResponse> get(String id, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("jobs") @@ -62,12 +65,23 @@ public ManagementApiHttpResponse get(String id, RequestOption 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, ErrorsGetResponse.class), response); + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); } try { switch (response.code()) { @@ -93,6 +107,8 @@ public ManagementApiHttpResponse get(String id, RequestOption 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/jobs/RawUsersExportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/RawUsersExportsClient.java index dfbf7adc..d6022ace 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawUsersExportsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/RawUsersExportsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -85,6 +86,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -114,6 +124,8 @@ public ManagementApiHttpResponse create( 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/jobs/RawUsersImportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/RawUsersImportsClient.java index 87be7146..de3b10c8 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawUsersImportsClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/RawUsersImportsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ContentTooLargeError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -94,6 +95,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -129,6 +139,8 @@ public ManagementApiHttpResponse create( 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); } @@ -145,7 +157,7 @@ public ManagementApiHttpResponse create(InputS Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); try (Response response = client.newCall(okhttpRequest).execute()) { @@ -183,6 +195,8 @@ public ManagementApiHttpResponse create(InputS 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); } @@ -200,7 +214,7 @@ public ManagementApiHttpResponse create( Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); try (Response response = client.newCall(okhttpRequest).execute()) { @@ -238,6 +252,8 @@ public ManagementApiHttpResponse create( 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); } @@ -266,6 +282,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -301,6 +326,8 @@ public ManagementApiHttpResponse create( 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); } @@ -329,6 +356,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -364,6 +400,8 @@ public ManagementApiHttpResponse create( 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/jobs/RawVerificationEmailClient.java b/src/main/java/com/auth0/client/mgmt/jobs/RawVerificationEmailClient.java index 72fe8976..be65804a 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawVerificationEmailClient.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/RawVerificationEmailClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -74,6 +75,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -104,6 +114,8 @@ public ManagementApiHttpResponse create( 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/jobs/types/CreateImportUsersRequestContent.java b/src/main/java/com/auth0/client/mgmt/jobs/types/CreateImportUsersRequestContent.java index f37eec35..8aa885e4 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateImportUsersRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/types/CreateImportUsersRequestContent.java @@ -171,7 +171,6 @@ public Builder from(CreateImportUsersRequestContent other) { } /** - *

    connection_id of the connection to which users will be imported.

    *

    connection_id of the connection to which users will be imported.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateVerificationEmailRequestContent.java b/src/main/java/com/auth0/client/mgmt/jobs/types/CreateVerificationEmailRequestContent.java index 93bc0061..9857bcf3 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateVerificationEmailRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/types/CreateVerificationEmailRequestContent.java @@ -167,7 +167,6 @@ public Builder from(CreateVerificationEmailRequestContent other) { } /** - *

    user_id of the user to send the verification email to.

    *

    user_id of the user to send the verification email to.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java b/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java index 2f9d812b..6802e5fd 100644 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java +++ b/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java @@ -86,11 +86,6 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public ErrorsGetResponse deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>() {})); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("status") && ((Map) value).containsKey("type") @@ -100,6 +95,11 @@ public ErrorsGetResponse deserialize(JsonParser p, DeserializationContext contex } catch (RuntimeException e) { } } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, new TypeReference>() {})); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } 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 8823269f..3523ec44 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 00000000..91d93569 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncNetworkAclsClient.java @@ -0,0 +1,87 @@ +/** + * 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()); + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public CompletableFuture delete(String id) { + return this.rawClient.delete(id).thenApply(response -> response.body()); + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public CompletableFuture delete(String id, RequestOptions requestOptions) { + return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java index c934e084..e3eea0c1 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -165,6 +178,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -209,6 +231,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -251,6 +276,15 @@ public CompletableFuture> delete(RequestOptions 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 @@ -286,6 +320,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java index d22e3d05..7ccd81f5 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -102,6 +103,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -164,6 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -216,6 +229,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -265,6 +287,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -307,6 +332,15 @@ public CompletableFuture> rekey(RequestOptions r 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 @@ -342,6 +376,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -386,6 +423,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -435,6 +481,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -488,6 +537,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -537,6 +595,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -580,6 +641,15 @@ public CompletableFuture> delete(String kid, Req 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 @@ -620,6 +690,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -666,6 +739,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { 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() { @@ -715,6 +797,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } 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 00000000..27c240e0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawNetworkAclsClient.java @@ -0,0 +1,463 @@ +/** + * 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; + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public CompletableFuture> delete(String id) { + return delete(id, null); + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public CompletableFuture> delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 429: + future.completeExceptionally(new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (JsonProcessingException e) { + future.completeExceptionally( + new ManagementException("Failed to deserialize response: " + e.getMessage(), e)); + } catch (IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java index 3ff7dab2..c1ce4522 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -70,6 +71,15 @@ public CompletableFuture>> list(Requ 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 @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -156,6 +169,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -195,6 +217,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -239,6 +264,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -287,6 +321,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -332,6 +369,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -376,6 +422,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } 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 df7f643c..574af876 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 00000000..82d36b7e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/keys/NetworkAclsClient.java @@ -0,0 +1,86 @@ +/** + * 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(); + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public void delete(String id) { + this.rawClient.delete(id).body(); + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public void delete(String id, RequestOptions requestOptions) { + this.rawClient.delete(id, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java index 239c5c48..e9c2c4e7 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse get(Reques 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() : "{}"; @@ -94,6 +104,8 @@ public ManagementApiHttpResponse get(Reques 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); } @@ -138,6 +150,15 @@ public ManagementApiHttpResponse set( 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() : "{}"; @@ -168,6 +189,8 @@ public ManagementApiHttpResponse set( 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); } @@ -202,6 +225,15 @@ public ManagementApiHttpResponse delete(RequestOptions requestOptions) { if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -226,6 +258,8 @@ public ManagementApiHttpResponse delete(RequestOptions requestOptions) { 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/RawEncryptionClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawEncryptionClient.java index 4106d5ed..f5a8d5b4 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/RawEncryptionClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/RawEncryptionClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -96,6 +97,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -136,6 +146,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -180,6 +192,15 @@ public ManagementApiHttpResponse create( 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() : "{}"; @@ -213,6 +234,8 @@ public ManagementApiHttpResponse create( 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); } @@ -247,6 +270,15 @@ public ManagementApiHttpResponse rekey(RequestOptions requestOptions) { if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -271,6 +303,8 @@ public ManagementApiHttpResponse rekey(RequestOptions requestOptions) { 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); } @@ -306,6 +340,15 @@ public ManagementApiHttpResponse get(String kid 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() : "{}"; @@ -338,6 +381,8 @@ public ManagementApiHttpResponse get(String kid 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); } @@ -383,6 +428,15 @@ public ManagementApiHttpResponse import_( 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() : "{}"; @@ -416,6 +470,8 @@ public ManagementApiHttpResponse import_( 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); } @@ -451,6 +507,15 @@ public ManagementApiHttpResponse delete(String kid, RequestOptions request if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -478,6 +543,8 @@ public ManagementApiHttpResponse delete(String kid, RequestOptions request 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); } @@ -516,6 +583,15 @@ 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); + } + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public ManagementApiHttpResponse delete(String id) { + return delete(id, null); + } + + /** + * Delete a key used to verify HTTP Message Signatures on Network ACL rules + */ + public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("keys/network-acls") + .addPathSegment(id); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 429: + throw new TooManyRequestsError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new ManagementApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); + } catch (IOException e) { + throw new ManagementException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java index 2731f176..3b58a2d6 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java +++ b/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -66,6 +67,15 @@ public ManagementApiHttpResponse> list(RequestOptions requestO 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() : "{}"; @@ -96,6 +106,8 @@ public ManagementApiHttpResponse> list(RequestOptions requestO 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); } @@ -130,6 +142,15 @@ public ManagementApiHttpResponse rotate(Reques 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() : "{}"; @@ -156,6 +177,8 @@ public ManagementApiHttpResponse rotate(Reques 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); } @@ -191,6 +214,15 @@ public ManagementApiHttpResponse get(String kid, 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() : "{}"; @@ -223,6 +255,8 @@ public ManagementApiHttpResponse get(String kid, 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); } @@ -260,6 +294,15 @@ public ManagementApiHttpResponse revoke( 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() : "{}"; @@ -290,6 +333,8 @@ public ManagementApiHttpResponse revoke( 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 00000000..9e1fcb5e --- /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/keys/types/ImportEncryptionKeyRequestContent.java b/src/main/java/com/auth0/client/mgmt/keys/types/ImportEncryptionKeyRequestContent.java index 7cd8794c..de452017 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/types/ImportEncryptionKeyRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/keys/types/ImportEncryptionKeyRequestContent.java @@ -98,7 +98,6 @@ public Builder from(ImportEncryptionKeyRequestContent other) { } /** - *

    Base64 encoded ciphertext of key material wrapped by public wrapping key.

    *

    Base64 encoded ciphertext of key material wrapped by public wrapping key.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java b/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java index bc9d6bde..f0980b3d 100644 --- a/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.keys.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListEncryptionKeysRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Default value is 50, maximum value is 100. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncClientsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncClientsClient.java new file mode 100644 index 00000000..6abc012d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncClientsClient.java @@ -0,0 +1,162 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.ListOrganizationClientsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent; +import com.auth0.client.mgmt.types.GetOrganizationClientResponseContent; +import com.auth0.client.mgmt.types.OrganizationClient; +import com.auth0.client.mgmt.types.UpdateOrganizationClientResponseContent; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class AsyncClientsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawClientsClient rawClient; + + public AsyncClientsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawClientsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawClientsClient withRawResponse() { + return this.rawClient; + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

      + *
    • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
    • + *

    + */ + public CompletableFuture> list(String id) { + return this.rawClient.list(id).thenApply(response -> response.body()); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

      + *
    • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
    • + *

    + */ + public CompletableFuture> list(String id, RequestOptions requestOptions) { + return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

      + *
    • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
    • + *

    + */ + public CompletableFuture> list( + String id, ListOrganizationClientsRequestParameters request) { + return this.rawClient.list(id, request).thenApply(response -> response.body()); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

      + *
    • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
    • + *

    + */ + public CompletableFuture> list( + String id, ListOrganizationClientsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Associate one or more clients with an organization. + */ + public CompletableFuture> create( + String id, CreateOrganizationClientsRequestContent request) { + return this.rawClient.create(id, request).thenApply(response -> response.body()); + } + + /** + * Associate one or more clients with an organization. + */ + public CompletableFuture> create( + String id, CreateOrganizationClientsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Remove one or more client associations from an organization. + */ + public CompletableFuture delete(String id, DeleteOrganizationClientsRequestContent request) { + return this.rawClient.delete(id, request).thenApply(response -> response.body()); + } + + /** + * Remove one or more client associations from an organization. + */ + public CompletableFuture delete( + String id, DeleteOrganizationClientsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Get a specific client association for an organization. + */ + public CompletableFuture get(String id, String clientId) { + return this.rawClient.get(id, clientId).thenApply(response -> response.body()); + } + + /** + * Get a specific client association for an organization. + */ + public CompletableFuture get( + String id, String clientId, RequestOptions requestOptions) { + return this.rawClient.get(id, clientId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Update an organization client association. + */ + public CompletableFuture update(String id, String clientId) { + return this.rawClient.update(id, clientId).thenApply(response -> response.body()); + } + + /** + * Update an organization client association. + */ + public CompletableFuture update( + String id, String clientId, RequestOptions requestOptions) { + return this.rawClient.update(id, clientId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Update an organization client association. + */ + public CompletableFuture update( + String id, String clientId, UpdateOrganizationClientRequestContent request) { + return this.rawClient.update(id, clientId, request).thenApply(response -> response.body()); + } + + /** + * Update an organization client association. + */ + public CompletableFuture update( + String id, String clientId, UpdateOrganizationClientRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, clientId, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncMembersClient.java index b42e9461..648296f3 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncMembersClient.java @@ -44,7 +44,7 @@ public AsyncRawMembersClient withRawResponse() { * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
      *
    • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
    • - *
    • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
    • + *
    • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
    • *
    *

    This endpoint supports two types of pagination:

    *
      @@ -64,7 +64,7 @@ public CompletableFuture> list(String id) * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
        *
      • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
      • - *
      • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
      • + *
      • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
      • *
      *

      This endpoint supports two types of pagination:

      *
        @@ -84,7 +84,7 @@ public CompletableFuture> list(String id, * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
          *
        • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
        • - *
        • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
        • + *
        • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
        • *
        *

        This endpoint supports two types of pagination:

        *
          @@ -105,7 +105,7 @@ public CompletableFuture> list( * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
            *
          • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
          • - *
          • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
          • + *
          • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
          • *
          *

          This endpoint supports two types of pagination:

          *
            diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java index 08cd75b2..a6c90c6f 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -100,6 +101,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -165,6 +175,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -213,6 +226,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -267,6 +289,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -307,6 +332,15 @@ public CompletableFuture> delete( 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 @@ -352,6 +386,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientsClient.java new file mode 100644 index 00000000..7b9b91f3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientsClient.java @@ -0,0 +1,690 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.ListOrganizationClientsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent; +import com.auth0.client.mgmt.types.GetOrganizationClientResponseContent; +import com.auth0.client.mgmt.types.ListOrganizationClientsResponseContent; +import com.auth0.client.mgmt.types.OrganizationClient; +import com.auth0.client.mgmt.types.UpdateOrganizationClientResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawClientsClient { + protected final ClientOptions clientOptions; + + public AsyncRawClientsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

              + *
            • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
            • + *

            + */ + public CompletableFuture>> list(String id) { + return list(id, ListOrganizationClientsRequestParameters.builder().build()); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

              + *
            • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
            • + *

            + */ + public CompletableFuture>> list( + String id, RequestOptions requestOptions) { + return list(id, ListOrganizationClientsRequestParameters.builder().build(), requestOptions); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

              + *
            • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
            • + *

            + */ + public CompletableFuture>> list( + String id, ListOrganizationClientsRequestParameters request) { + return list(id, request, null); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

              + *
            • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
            • + *

            + */ + public CompletableFuture>> list( + String id, ListOrganizationClientsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationClientsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationClientsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListOrganizationClientsRequestParameters nextRequest = + ListOrganizationClientsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClients(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(id, nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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; + } + + /** + * Associate one or more clients with an organization. + */ + public CompletableFuture>> create( + String id, CreateOrganizationClientsRequestContent request) { + return create(id, request, null); + } + + /** + * Associate one or more clients with an organization. + */ + public CompletableFuture>> create( + String id, CreateOrganizationClientsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients"); + 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, new TypeReference>() {}), + 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 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; + } + + /** + * Remove one or more client associations from an organization. + */ + public CompletableFuture> delete( + String id, DeleteOrganizationClientsRequestContent request) { + return delete(id, request, null); + } + + /** + * Remove one or more client associations from an organization. + */ + public CompletableFuture> delete( + String id, DeleteOrganizationClientsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients"); + 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("DELETE", 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()) { + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>(null, response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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; + } + + /** + * Get a specific client association for an organization. + */ + public CompletableFuture> get( + String id, String clientId) { + return get(id, clientId, null); + } + + /** + * Get a specific client association for an organization. + */ + public CompletableFuture> get( + String id, String clientId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients") + .addPathSegment(clientId); + 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, GetOrganizationClientResponseContent.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; + } + + /** + * Update an organization client association. + */ + public CompletableFuture> update( + String id, String clientId) { + return update( + id, clientId, UpdateOrganizationClientRequestContent.builder().build()); + } + + /** + * Update an organization client association. + */ + public CompletableFuture> update( + String id, String clientId, RequestOptions requestOptions) { + return update( + id, clientId, UpdateOrganizationClientRequestContent.builder().build(), requestOptions); + } + + /** + * Update an organization client association. + */ + public CompletableFuture> update( + String id, String clientId, UpdateOrganizationClientRequestContent request) { + return update(id, clientId, request, null); + } + + /** + * Update an organization client association. + */ + public CompletableFuture> update( + String id, String clientId, UpdateOrganizationClientRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients") + .addPathSegment(clientId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateOrganizationClientResponseContent.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/organizations/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java index 6eeb0574..6c7a5e7f 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -98,6 +99,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -164,6 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -212,6 +225,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -266,6 +288,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -307,6 +332,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -351,6 +385,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -391,6 +428,15 @@ public CompletableFuture> delete( 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 @@ -426,6 +472,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -495,6 +544,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -539,6 +597,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java index 24bda7f4..65e5e1e9 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -111,6 +112,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -178,6 +188,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -232,6 +245,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -286,6 +308,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -335,6 +360,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -384,6 +418,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -433,6 +470,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -482,6 +528,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -528,6 +577,15 @@ public CompletableFuture> delete( 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 @@ -568,6 +626,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -649,6 +710,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -683,6 +753,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java index 8fb4ad22..f9d4f177 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java @@ -11,8 +11,10 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -102,6 +104,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -172,6 +183,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -228,6 +242,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -264,6 +287,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), @@ -277,6 +305,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -324,6 +355,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -368,6 +408,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -416,6 +459,15 @@ public CompletableFuture> delete( 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 @@ -461,6 +513,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -542,6 +597,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -591,6 +655,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawGroupsClient.java index cd13af1d..dc7ac387 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -100,6 +101,15 @@ public CompletableFuture>> l 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 @@ -164,6 +174,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawInvitationsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawInvitationsClient.java index b0e3a02f..98036636 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawInvitationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawInvitationsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -113,6 +114,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -183,6 +193,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -237,6 +250,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -286,6 +308,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -355,6 +380,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -404,6 +438,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -444,6 +481,15 @@ public CompletableFuture> delete( 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 @@ -484,6 +530,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java index 496cc19a..b27c320e 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -52,7 +53,7 @@ public AsyncRawMembersClient(ClientOptions clientOptions) { * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
              *
            • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
            • - *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
            • + *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
            • *
            *

            This endpoint supports two types of pagination:

            *
              @@ -72,7 +73,7 @@ public CompletableFuture *
            • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
            • - *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
            • + *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
            • *
            *

            This endpoint supports two types of pagination:

            *
              @@ -93,7 +94,7 @@ public CompletableFuture *
            • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
            • - *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
            • + *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
            • *
            *

            This endpoint supports two types of pagination:

            *
              @@ -114,7 +115,7 @@ public CompletableFuture *
            • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
            • - *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
            • + *
            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
            • *
            *

            This endpoint supports two types of pagination:

            *
              @@ -132,6 +133,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -228,6 +240,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -284,6 +299,15 @@ public CompletableFuture> create( 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 @@ -324,6 +348,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -372,6 +399,15 @@ public CompletableFuture> delete( 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 @@ -412,6 +448,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/ClientsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/ClientsClient.java new file mode 100644 index 00000000..e86f9712 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/ClientsClient.java @@ -0,0 +1,156 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.ListOrganizationClientsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent; +import com.auth0.client.mgmt.types.GetOrganizationClientResponseContent; +import com.auth0.client.mgmt.types.OrganizationClient; +import com.auth0.client.mgmt.types.UpdateOrganizationClientResponseContent; +import java.util.List; + +public class ClientsClient { + protected final ClientOptions clientOptions; + + private final RawClientsClient rawClient; + + public ClientsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawClientsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawClientsClient withRawResponse() { + return this.rawClient; + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                + *
              • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
              • + *

              + */ + public SyncPagingIterable list(String id) { + return this.rawClient.list(id).body(); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                + *
              • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
              • + *

              + */ + public SyncPagingIterable list(String id, RequestOptions requestOptions) { + return this.rawClient.list(id, requestOptions).body(); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                + *
              • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
              • + *

              + */ + public SyncPagingIterable list(String id, ListOrganizationClientsRequestParameters request) { + return this.rawClient.list(id, request).body(); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                + *
              • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
              • + *

              + */ + public SyncPagingIterable list( + String id, ListOrganizationClientsRequestParameters request, RequestOptions requestOptions) { + return this.rawClient.list(id, request, requestOptions).body(); + } + + /** + * Associate one or more clients with an organization. + */ + public List create(String id, CreateOrganizationClientsRequestContent request) { + return this.rawClient.create(id, request).body(); + } + + /** + * Associate one or more clients with an organization. + */ + public List create( + String id, CreateOrganizationClientsRequestContent request, RequestOptions requestOptions) { + return this.rawClient.create(id, request, requestOptions).body(); + } + + /** + * Remove one or more client associations from an organization. + */ + public void delete(String id, DeleteOrganizationClientsRequestContent request) { + this.rawClient.delete(id, request).body(); + } + + /** + * Remove one or more client associations from an organization. + */ + public void delete(String id, DeleteOrganizationClientsRequestContent request, RequestOptions requestOptions) { + this.rawClient.delete(id, request, requestOptions).body(); + } + + /** + * Get a specific client association for an organization. + */ + public GetOrganizationClientResponseContent get(String id, String clientId) { + return this.rawClient.get(id, clientId).body(); + } + + /** + * Get a specific client association for an organization. + */ + public GetOrganizationClientResponseContent get(String id, String clientId, RequestOptions requestOptions) { + return this.rawClient.get(id, clientId, requestOptions).body(); + } + + /** + * Update an organization client association. + */ + public UpdateOrganizationClientResponseContent update(String id, String clientId) { + return this.rawClient.update(id, clientId).body(); + } + + /** + * Update an organization client association. + */ + public UpdateOrganizationClientResponseContent update(String id, String clientId, RequestOptions requestOptions) { + return this.rawClient.update(id, clientId, requestOptions).body(); + } + + /** + * Update an organization client association. + */ + public UpdateOrganizationClientResponseContent update( + String id, String clientId, UpdateOrganizationClientRequestContent request) { + return this.rawClient.update(id, clientId, request).body(); + } + + /** + * Update an organization client association. + */ + public UpdateOrganizationClientResponseContent update( + String id, String clientId, UpdateOrganizationClientRequestContent request, RequestOptions requestOptions) { + return this.rawClient.update(id, clientId, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/MembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/MembersClient.java index 7bdaaf16..6133dfd6 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/MembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/MembersClient.java @@ -43,7 +43,7 @@ public RawMembersClient withRawResponse() { * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                *
              • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
              • - *
              • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
              • + *
              • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
              • *
              *

              This endpoint supports two types of pagination:

              *
                @@ -63,7 +63,7 @@ public SyncPagingIterable list(String id) { * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                  *
                • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                • - *
                • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                • + *
                • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                • *
                *

                This endpoint supports two types of pagination:

                *
                  @@ -83,7 +83,7 @@ public SyncPagingIterable list(String id, RequestOptions req * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                    *
                  • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                  • - *
                  • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                  • + *
                  • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                  • *
                  *

                  This endpoint supports two types of pagination:

                  *
                    @@ -103,7 +103,7 @@ public SyncPagingIterable list(String id, ListOrganizationMe * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                      *
                    • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                    • - *
                    • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                    • + *
                    • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                    • *
                    *

                    This endpoint supports two types of pagination:

                    *
                      diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java index 0566aa02..ffac603c 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -95,6 +96,15 @@ public ManagementApiHttpResponse> li 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() : "{}"; @@ -138,6 +148,8 @@ public ManagementApiHttpResponse> li 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); } @@ -178,6 +190,15 @@ public ManagementApiHttpResponse delete(String id, String grantId, Request if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -275,6 +307,8 @@ public ManagementApiHttpResponse delete(String id, String grantId, Request Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawClientsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawClientsClient.java new file mode 100644 index 00000000..3f317273 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawClientsClient.java @@ -0,0 +1,551 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.MediaTypes; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.ConflictError; +import com.auth0.client.mgmt.errors.ForbiddenError; +import com.auth0.client.mgmt.errors.NotFoundError; +import com.auth0.client.mgmt.errors.TooManyRequestsError; +import com.auth0.client.mgmt.errors.UnauthorizedError; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.ListOrganizationClientsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent; +import com.auth0.client.mgmt.types.GetOrganizationClientResponseContent; +import com.auth0.client.mgmt.types.ListOrganizationClientsResponseContent; +import com.auth0.client.mgmt.types.OrganizationClient; +import com.auth0.client.mgmt.types.UpdateOrganizationClientResponseContent; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawClientsClient { + protected final ClientOptions clientOptions; + + public RawClientsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                        + *
                      • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
                      • + *

                      + */ + public ManagementApiHttpResponse> list(String id) { + return list(id, ListOrganizationClientsRequestParameters.builder().build()); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                        + *
                      • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
                      • + *

                      + */ + public ManagementApiHttpResponse> list( + String id, RequestOptions requestOptions) { + return list(id, ListOrganizationClientsRequestParameters.builder().build(), requestOptions); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                        + *
                      • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
                      • + *

                      + */ + public ManagementApiHttpResponse> list( + String id, ListOrganizationClientsRequestParameters request) { + return list(id, request, null); + } + + /** + * List all clients associated with an organization, using checkpoint pagination. + *

                        + *
                      • + * Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. + *
                      • + *

                      + */ + public ManagementApiHttpResponse> list( + String id, ListOrganizationClientsRequestParameters request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationClientsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationClientsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListOrganizationClientsRequestParameters nextRequest = + ListOrganizationClientsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getClients(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + id, nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); + } + } + + /** + * Associate one or more clients with an organization. + */ + public ManagementApiHttpResponse> create( + String id, CreateOrganizationClientsRequestContent request) { + return create(id, request, null); + } + + /** + * Associate one or more clients with an organization. + */ + public ManagementApiHttpResponse> create( + String id, CreateOrganizationClientsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients"); + 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, new TypeReference>() {}), + 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 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); + } + } + + /** + * Remove one or more client associations from an organization. + */ + public ManagementApiHttpResponse delete(String id, DeleteOrganizationClientsRequestContent request) { + return delete(id, request, null); + } + + /** + * Remove one or more client associations from an organization. + */ + public ManagementApiHttpResponse delete( + String id, DeleteOrganizationClientsRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients"); + 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("DELETE", 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(); + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>(null, response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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); + } + } + + /** + * Get a specific client association for an organization. + */ + public ManagementApiHttpResponse get(String id, String clientId) { + return get(id, clientId, null); + } + + /** + * Get a specific client association for an organization. + */ + public ManagementApiHttpResponse get( + String id, String clientId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients") + .addPathSegment(clientId); + 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, GetOrganizationClientResponseContent.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); + } + } + + /** + * Update an organization client association. + */ + public ManagementApiHttpResponse update(String id, String clientId) { + return update( + id, clientId, UpdateOrganizationClientRequestContent.builder().build()); + } + + /** + * Update an organization client association. + */ + public ManagementApiHttpResponse update( + String id, String clientId, RequestOptions requestOptions) { + return update( + id, clientId, UpdateOrganizationClientRequestContent.builder().build(), requestOptions); + } + + /** + * Update an organization client association. + */ + public ManagementApiHttpResponse update( + String id, String clientId, UpdateOrganizationClientRequestContent request) { + return update(id, clientId, request, null); + } + + /** + * Update an organization client association. + */ + public ManagementApiHttpResponse update( + String id, String clientId, UpdateOrganizationClientRequestContent request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("clients") + .addPathSegment(clientId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new ManagementApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, UpdateOrganizationClientResponseContent.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/organizations/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java index 8a5cd901..8e6f8234 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawConnectionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -92,6 +93,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -211,6 +232,8 @@ public ManagementApiHttpResponse 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); } @@ -243,6 +266,15 @@ public ManagementApiHttpResponse ge 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() : "{}"; @@ -273,6 +305,8 @@ public ManagementApiHttpResponse ge 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); } @@ -304,6 +338,15 @@ public ManagementApiHttpResponse delete(String id, String connectionId, Re if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -328,6 +371,8 @@ public ManagementApiHttpResponse delete(String id, String connectionId, Re 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); } @@ -389,6 +434,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -419,6 +473,8 @@ public ManagementApiHttpResponse Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java index feefc949..55f2daad 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -105,6 +106,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -149,6 +159,8 @@ public ManagementApiHttpResponse 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); } @@ -195,6 +207,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -379,6 +422,8 @@ public ManagementApiHttpResponse 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); } @@ -416,6 +461,15 @@ public ManagementApiHttpResponse delete(String id, String discoveryDomainI if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -443,6 +497,8 @@ public ManagementApiHttpResponse delete(String id, String discoveryDomainI 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); } @@ -516,6 +572,15 @@ public ManagementApiHttpResponse> lis 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() : "{}"; @@ -143,6 +154,8 @@ public ManagementApiHttpResponse> lis 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); } @@ -191,6 +204,15 @@ public ManagementApiHttpResponse add( 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() : "{}"; @@ -214,6 +236,9 @@ public ManagementApiHttpResponse add( 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); @@ -224,6 +249,8 @@ public ManagementApiHttpResponse add( 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); } @@ -262,6 +289,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -292,6 +328,8 @@ public ManagementApiHttpResponse get( 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); } @@ -331,6 +369,15 @@ public ManagementApiHttpResponse delete(String id, String connectionId, Re if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -361,6 +408,8 @@ public ManagementApiHttpResponse delete(String id, String connectionId, Re 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); } @@ -434,6 +483,15 @@ public ManagementApiHttpResponse up 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() : "{}"; @@ -467,6 +525,8 @@ public ManagementApiHttpResponse up Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawGroupsClient.java index c53b5247..8592ad24 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -95,6 +96,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -137,6 +147,8 @@ public ManagementApiHttpResponse> list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawInvitationsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawInvitationsClient.java index f61b48ec..503c64a0 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawInvitationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawInvitationsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -108,6 +109,15 @@ public ManagementApiHttpResponse> lis 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() : "{}"; @@ -154,6 +164,8 @@ public ManagementApiHttpResponse> lis 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); } @@ -200,6 +212,15 @@ public ManagementApiHttpResponse cr 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() : "{}"; @@ -233,6 +254,8 @@ public ManagementApiHttpResponse cr 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); } @@ -293,6 +316,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -326,6 +358,8 @@ public ManagementApiHttpResponse get( 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); } @@ -357,6 +391,15 @@ public ManagementApiHttpResponse delete(String id, String invitationId, Re if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -384,6 +427,8 @@ public ManagementApiHttpResponse delete(String id, String invitationId, Re Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java index 743f0a04..1cad3d2f 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -47,7 +48,7 @@ public RawMembersClient(ClientOptions clientOptions) { * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                        *
                      • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                      • - *
                      • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                      • + *
                      • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                      • *
                      *

                      This endpoint supports two types of pagination:

                      *
                        @@ -67,7 +68,7 @@ public ManagementApiHttpResponse> list(St * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                          *
                        • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                        • - *
                        • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                        • + *
                        • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                        • *
                        *

                        This endpoint supports two types of pagination:

                        *
                          @@ -88,7 +89,7 @@ public ManagementApiHttpResponse> list( * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                            *
                          • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                          • - *
                          • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                          • + *
                          • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                          • *
                          *

                          This endpoint supports two types of pagination:

                          *
                            @@ -109,7 +110,7 @@ public ManagementApiHttpResponse> list( * This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it. *
                              *
                            • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
                            • - *
                            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.
                            • + *
                            • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token. Only directly assigned roles are returned. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.
                            • *
                            *

                            This endpoint supports two types of pagination:

                            *
                              @@ -127,6 +128,8 @@ public ManagementApiHttpResponse> list( .addPathSegments("organizations") .addPathSegment(id) .addPathSegments("members"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -155,6 +158,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -199,6 +211,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -246,6 +260,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -273,6 +296,8 @@ public ManagementApiHttpResponse create( 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); } @@ -312,6 +337,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -339,6 +373,8 @@ public ManagementApiHttpResponse delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/groups/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/groups/AsyncRawRolesClient.java index d701c6cb..362b2ed1 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/groups/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/groups/AsyncRawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -113,6 +114,15 @@ public CompletableFuture>> li 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 @@ -177,6 +187,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -236,6 +249,15 @@ public CompletableFuture> create( 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 @@ -286,6 +308,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -345,6 +370,15 @@ public CompletableFuture> delete( 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 @@ -390,6 +424,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/groups/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/groups/RawRolesClient.java index 88e90d2d..c9d13fe4 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/groups/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/groups/RawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -107,6 +108,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -150,6 +160,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -201,6 +213,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -234,6 +255,8 @@ public ManagementApiHttpResponse create( 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); } @@ -285,6 +308,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -315,6 +347,8 @@ public ManagementApiHttpResponse delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/groups/types/ListOrganizationGroupRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/groups/types/ListOrganizationGroupRolesRequestParameters.java index aa874943..39ac468e 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/groups/types/ListOrganizationGroupRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/groups/types/ListOrganizationGroupRolesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.groups.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListOrganizationGroupRolesRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawEffectiveRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawEffectiveRolesClient.java index d6be7c8b..acd5491d 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawEffectiveRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawEffectiveRolesClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -108,6 +109,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -175,6 +185,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java index 6ae56220..8c47c085 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -50,6 +51,7 @@ public AsyncRawRolesClient(ClientOptions clientOptions) { /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture>> list(String id, String userId) { return list( @@ -61,6 +63,7 @@ public CompletableFuture>> li /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture>> list( String id, String userId, RequestOptions requestOptions) { @@ -74,6 +77,7 @@ public CompletableFuture>> li /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture>> list( String id, String userId, ListOrganizationMemberRolesRequestParameters request) { @@ -83,6 +87,7 @@ public CompletableFuture>> li /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture>> list( String id, @@ -116,6 +121,15 @@ public CompletableFuture>> li 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 @@ -184,6 +198,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -245,6 +262,15 @@ public CompletableFuture> assign( 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 @@ -290,6 +316,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -351,6 +380,15 @@ public CompletableFuture> delete( 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 @@ -391,6 +429,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRolesClient.java index a7a22e10..e2b0abbc 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRolesClient.java @@ -32,6 +32,7 @@ public AsyncRawRolesClient withRawResponse() { /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture> list(String id, String userId) { return this.rawClient.list(id, userId).thenApply(response -> response.body()); @@ -40,6 +41,7 @@ public CompletableFuture> list(String id, String userId /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture> list(String id, String userId, RequestOptions requestOptions) { return this.rawClient.list(id, userId, requestOptions).thenApply(response -> response.body()); @@ -48,6 +50,7 @@ public CompletableFuture> list(String id, String userId /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture> list( String id, String userId, ListOrganizationMemberRolesRequestParameters request) { @@ -57,6 +60,7 @@ public CompletableFuture> list( /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public CompletableFuture> list( String id, diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/RawEffectiveRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/RawEffectiveRolesClient.java index c76b1fe9..ae326a95 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/RawEffectiveRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/RawEffectiveRolesClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -103,6 +104,15 @@ public ManagementApiHttpResponseUsers can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public ManagementApiHttpResponse> list(String id, String userId) { return list( @@ -56,6 +58,7 @@ public ManagementApiHttpResponse> list(String id, Strin /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public ManagementApiHttpResponse> list( String id, String userId, RequestOptions requestOptions) { @@ -69,6 +72,7 @@ public ManagementApiHttpResponse> list( /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public ManagementApiHttpResponse> list( String id, String userId, ListOrganizationMemberRolesRequestParameters request) { @@ -78,6 +82,7 @@ public ManagementApiHttpResponse> list( /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public ManagementApiHttpResponse> list( String id, @@ -111,6 +116,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -156,6 +170,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -209,6 +225,15 @@ public ManagementApiHttpResponse assign( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -239,6 +264,8 @@ public ManagementApiHttpResponse assign( 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); } @@ -292,6 +319,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -319,6 +355,8 @@ public ManagementApiHttpResponse delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/RolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/RolesClient.java index 2511b8e8..7a532ed5 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/RolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/RolesClient.java @@ -31,6 +31,7 @@ public RawRolesClient withRawResponse() { /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public SyncPagingIterable list(String id, String userId) { return this.rawClient.list(id, userId).body(); @@ -39,6 +40,7 @@ public SyncPagingIterable list(String id, String userId) { /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public SyncPagingIterable list(String id, String userId, RequestOptions requestOptions) { return this.rawClient.list(id, userId, requestOptions).body(); @@ -47,6 +49,7 @@ public SyncPagingIterable list(String id, String userId, RequestOptions re /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public SyncPagingIterable list( String id, String userId, ListOrganizationMemberRolesRequestParameters request) { @@ -56,6 +59,7 @@ public SyncPagingIterable list( /** * Retrieve detailed list of roles assigned to a given user within the context of a specific Organization. *

                              Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.

                              + *

                              Note: Returns only direct role assignments for this member. To also include group-based role assignments, use GET /api/v2/organizations/{id}/members/{user_id}/effective-roles.

                              */ public SyncPagingIterable list( String id, diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/AsyncRawGroupsClient.java index f1a22faf..bc2de736 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/AsyncRawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -87,6 +88,15 @@ public CompletableFuture>> l 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 @@ -153,6 +163,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/RawGroupsClient.java index 6e80b498..bb573a53 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/RawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -82,6 +83,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -126,6 +136,8 @@ public ManagementApiHttpResponse> list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new ManagementApiException( "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (JsonProcessingException e) { + throw new ManagementException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new ManagementException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/types/ListOrganizationMemberRoleSourceGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/types/ListOrganizationMemberRoleSourceGroupsRequestParameters.java index 631eb1b2..bbb7e884 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/types/ListOrganizationMemberRoleSourceGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/effectiveroles/sources/types/ListOrganizationMemberRoleSourceGroupsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.members.effectiveroles.sources.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.JsonIgnore; 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; @@ -45,7 +46,8 @@ private ListOrganizationMemberRoleSourceGroupsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -56,7 +58,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -67,11 +70,23 @@ public OptionalNullable getTake() { /** * @return The role ID to get group sources for. */ - @JsonIgnore + @JsonProperty("role_id") public String getRoleId() { return roleId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -163,7 +178,6 @@ public Builder from(ListOrganizationMemberRoleSourceGroupsRequestParameters othe } /** - *

                              The role ID to get group sources for.

                              *

                              The role ID to get group sources for.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberEffectiveRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberEffectiveRolesRequestParameters.java index 32f11cc2..6c6431b7 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberEffectiveRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberEffectiveRolesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.members.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListOrganizationMemberEffectiveRolesRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java index feabe2ea..1e4908f3 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.members.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListOrganizationMemberRolesRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncGroupsClient.java new file mode 100644 index 00000000..ae6ef007 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncGroupsClient.java @@ -0,0 +1,65 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleGroupsRequestParameters; +import com.auth0.client.mgmt.types.RoleGroup; +import java.util.concurrent.CompletableFuture; + +public class AsyncGroupsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawGroupsClient rawClient; + + public AsyncGroupsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawGroupsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawGroupsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture> list(String organizationId, String roleId) { + return this.rawClient.list(organizationId, roleId).thenApply(response -> response.body()); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture> list( + String organizationId, String roleId, RequestOptions requestOptions) { + return this.rawClient.list(organizationId, roleId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture> list( + String organizationId, String roleId, ListOrganizationRoleGroupsRequestParameters request) { + return this.rawClient.list(organizationId, roleId, request).thenApply(response -> response.body()); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture> list( + String organizationId, + String roleId, + ListOrganizationRoleGroupsRequestParameters request, + RequestOptions requestOptions) { + return this.rawClient + .list(organizationId, roleId, request, requestOptions) + .thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncMembersClient.java new file mode 100644 index 00000000..1133defa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncMembersClient.java @@ -0,0 +1,83 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleMembersRequestParameters; +import com.auth0.client.mgmt.types.RoleMember; +import java.util.concurrent.CompletableFuture; + +public class AsyncMembersClient { + protected final ClientOptions clientOptions; + + private final AsyncRawMembersClient rawClient; + + public AsyncMembersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawMembersClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawMembersClient withRawResponse() { + return this.rawClient; + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture> list(String id, String roleId) { + return this.rawClient.list(id, roleId).thenApply(response -> response.body()); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture> list( + String id, String roleId, RequestOptions requestOptions) { + return this.rawClient.list(id, roleId, requestOptions).thenApply(response -> response.body()); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture> list( + String id, String roleId, ListOrganizationRoleMembersRequestParameters request) { + return this.rawClient.list(id, roleId, request).thenApply(response -> response.body()); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture> list( + String id, + String roleId, + ListOrganizationRoleMembersRequestParameters request, + RequestOptions requestOptions) { + return this.rawClient.list(id, roleId, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRawGroupsClient.java new file mode 100644 index 00000000..0efd9e0f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRawGroupsClient.java @@ -0,0 +1,201 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.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.organizations.roles.types.ListOrganizationRoleGroupsRequestParameters; +import com.auth0.client.mgmt.types.ListOrganizationRoleGroupsResponseContent; +import com.auth0.client.mgmt.types.RoleGroup; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawGroupsClient { + protected final ClientOptions clientOptions; + + public AsyncRawGroupsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture>> list( + String organizationId, String roleId) { + return list( + organizationId, + roleId, + ListOrganizationRoleGroupsRequestParameters.builder().build()); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture>> list( + String organizationId, String roleId, RequestOptions requestOptions) { + return list( + organizationId, + roleId, + ListOrganizationRoleGroupsRequestParameters.builder().build(), + requestOptions); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture>> list( + String organizationId, String roleId, ListOrganizationRoleGroupsRequestParameters request) { + return list(organizationId, roleId, request, null); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public CompletableFuture>> list( + String organizationId, + String roleId, + ListOrganizationRoleGroupsRequestParameters request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(organizationId) + .addPathSegments("roles") + .addPathSegment(roleId) + .addPathSegments("groups"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationRoleGroupsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationRoleGroupsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListOrganizationRoleGroupsRequestParameters nextRequest = + ListOrganizationRoleGroupsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getGroups(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(organizationId, roleId, nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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/organizations/roles/AsyncRawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRawMembersClient.java new file mode 100644 index 00000000..cab91156 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRawMembersClient.java @@ -0,0 +1,226 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.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.organizations.roles.types.ListOrganizationRoleMembersRequestParameters; +import com.auth0.client.mgmt.types.ListOrganizationRoleMembersResponseContent; +import com.auth0.client.mgmt.types.RoleMember; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawMembersClient { + protected final ClientOptions clientOptions; + + public AsyncRawMembersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture>> list(String id, String roleId) { + return list( + id, + roleId, + ListOrganizationRoleMembersRequestParameters.builder().build()); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture>> list( + String id, String roleId, RequestOptions requestOptions) { + return list( + id, + roleId, + ListOrganizationRoleMembersRequestParameters.builder().build(), + requestOptions); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture>> list( + String id, String roleId, ListOrganizationRoleMembersRequestParameters request) { + return list(id, roleId, request, null); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public CompletableFuture>> list( + String id, + String roleId, + ListOrganizationRoleMembersRequestParameters request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("roles") + .addPathSegment(roleId) + .addPathSegments("members"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(true), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationRoleMembersResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationRoleMembersResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListOrganizationRoleMembersRequestParameters nextRequest = + ListOrganizationRoleMembersRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getMembers(); + future.complete(new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> { + try { + return list(id, roleId, nextRequest, requestOptions) + .get() + .body(); + } catch (InterruptedException | ExecutionException e) { + throw new RuntimeException(e); + } + }), + response)); + return; + } + try { + switch (response.code()) { + case 400: + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 401: + future.completeExceptionally(new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 403: + future.completeExceptionally(new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + case 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/organizations/roles/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRolesClient.java new file mode 100644 index 00000000..0b74b313 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/AsyncRolesClient.java @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.Suppliers; +import java.util.function.Supplier; + +public class AsyncRolesClient { + protected final ClientOptions clientOptions; + + protected final Supplier membersClient; + + protected final Supplier groupsClient; + + public AsyncRolesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.membersClient = Suppliers.memoize(() -> new AsyncMembersClient(clientOptions)); + this.groupsClient = Suppliers.memoize(() -> new AsyncGroupsClient(clientOptions)); + } + + public AsyncMembersClient members() { + return this.membersClient.get(); + } + + public AsyncGroupsClient groups() { + return this.groupsClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/GroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/GroupsClient.java new file mode 100644 index 00000000..1c65c3e3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/GroupsClient.java @@ -0,0 +1,63 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleGroupsRequestParameters; +import com.auth0.client.mgmt.types.RoleGroup; + +public class GroupsClient { + protected final ClientOptions clientOptions; + + private final RawGroupsClient rawClient; + + public GroupsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawGroupsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawGroupsClient withRawResponse() { + return this.rawClient; + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public SyncPagingIterable list(String organizationId, String roleId) { + return this.rawClient.list(organizationId, roleId).body(); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public SyncPagingIterable list(String organizationId, String roleId, RequestOptions requestOptions) { + return this.rawClient.list(organizationId, roleId, requestOptions).body(); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public SyncPagingIterable list( + String organizationId, String roleId, ListOrganizationRoleGroupsRequestParameters request) { + return this.rawClient.list(organizationId, roleId, request).body(); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public SyncPagingIterable list( + String organizationId, + String roleId, + ListOrganizationRoleGroupsRequestParameters request, + RequestOptions requestOptions) { + return this.rawClient + .list(organizationId, roleId, request, requestOptions) + .body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/MembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/MembersClient.java new file mode 100644 index 00000000..0d752875 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/MembersClient.java @@ -0,0 +1,81 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleMembersRequestParameters; +import com.auth0.client.mgmt.types.RoleMember; + +public class MembersClient { + protected final ClientOptions clientOptions; + + private final RawMembersClient rawClient; + + public MembersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawMembersClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawMembersClient withRawResponse() { + return this.rawClient; + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public SyncPagingIterable list(String id, String roleId) { + return this.rawClient.list(id, roleId).body(); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public SyncPagingIterable list(String id, String roleId, RequestOptions requestOptions) { + return this.rawClient.list(id, roleId, requestOptions).body(); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public SyncPagingIterable list( + String id, String roleId, ListOrganizationRoleMembersRequestParameters request) { + return this.rawClient.list(id, roleId, request).body(); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public SyncPagingIterable list( + String id, + String roleId, + ListOrganizationRoleMembersRequestParameters request, + RequestOptions requestOptions) { + return this.rawClient.list(id, roleId, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/RawGroupsClient.java new file mode 100644 index 00000000..ebdb6e6c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/RawGroupsClient.java @@ -0,0 +1,164 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.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.organizations.roles.types.ListOrganizationRoleGroupsRequestParameters; +import com.auth0.client.mgmt.types.ListOrganizationRoleGroupsResponseContent; +import com.auth0.client.mgmt.types.RoleGroup; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawGroupsClient { + protected final ClientOptions clientOptions; + + public RawGroupsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public ManagementApiHttpResponse> list(String organizationId, String roleId) { + return list( + organizationId, + roleId, + ListOrganizationRoleGroupsRequestParameters.builder().build()); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public ManagementApiHttpResponse> list( + String organizationId, String roleId, RequestOptions requestOptions) { + return list( + organizationId, + roleId, + ListOrganizationRoleGroupsRequestParameters.builder().build(), + requestOptions); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public ManagementApiHttpResponse> list( + String organizationId, String roleId, ListOrganizationRoleGroupsRequestParameters request) { + return list(organizationId, roleId, request, null); + } + + /** + * Retrieve the list of groups assigned to a role in the context of an organization. + */ + public ManagementApiHttpResponse> list( + String organizationId, + String roleId, + ListOrganizationRoleGroupsRequestParameters request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(organizationId) + .addPathSegments("roles") + .addPathSegment(roleId) + .addPathSegments("groups"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationRoleGroupsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationRoleGroupsResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListOrganizationRoleGroupsRequestParameters nextRequest = + ListOrganizationRoleGroupsRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getGroups(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable(startingAfter.isPresent(), result, parsedResponse, () -> list( + organizationId, roleId, nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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/organizations/roles/RawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/RawMembersClient.java new file mode 100644 index 00000000..307e4e3a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/RawMembersClient.java @@ -0,0 +1,191 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.ManagementApiException; +import com.auth0.client.mgmt.core.ManagementApiHttpResponse; +import com.auth0.client.mgmt.core.ManagementException; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.QueryStringMapper; +import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; +import com.auth0.client.mgmt.errors.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.organizations.roles.types.ListOrganizationRoleMembersRequestParameters; +import com.auth0.client.mgmt.types.ListOrganizationRoleMembersResponseContent; +import com.auth0.client.mgmt.types.RoleMember; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawMembersClient { + protected final ClientOptions clientOptions; + + public RawMembersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public ManagementApiHttpResponse> list(String id, String roleId) { + return list( + id, + roleId, + ListOrganizationRoleMembersRequestParameters.builder().build()); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public ManagementApiHttpResponse> list( + String id, String roleId, RequestOptions requestOptions) { + return list( + id, + roleId, + ListOrganizationRoleMembersRequestParameters.builder().build(), + requestOptions); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public ManagementApiHttpResponse> list( + String id, String roleId, ListOrganizationRoleMembersRequestParameters request) { + return list(id, roleId, request, null); + } + + /** + * List the organization members assigned a specific role within the context of an organization. + *

                                + *
                              • + * Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups. + *
                              • + *

                              + */ + public ManagementApiHttpResponse> list( + String id, + String roleId, + ListOrganizationRoleMembersRequestParameters request, + RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("organizations") + .addPathSegment(id) + .addPathSegments("roles") + .addPathSegment(roleId) + .addPathSegments("members"); + if (!request.getFrom().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "from", request.getFrom().orElse(null), false); + } + QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); + if (!request.getFields().isAbsent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "fields", request.getFields().orElse(null), false); + } + QueryStringMapper.addQueryParameter( + httpUrl, "include_fields", request.getIncludeFields().orElse(true), false); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + ListOrganizationRoleMembersResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListOrganizationRoleMembersResponseContent.class); + Optional startingAfter = parsedResponse.getNext(); + ListOrganizationRoleMembersRequestParameters nextRequest = + ListOrganizationRoleMembersRequestParameters.builder() + .from(request) + .from(startingAfter) + .build(); + List result = parsedResponse.getMembers(); + return new ManagementApiHttpResponse<>( + new SyncPagingIterable( + startingAfter.isPresent(), result, parsedResponse, () -> list( + id, roleId, nextRequest, requestOptions) + .body()), + response); + } + try { + switch (response.code()) { + case 400: + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 401: + throw new UnauthorizedError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 403: + throw new ForbiddenError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 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/organizations/roles/RolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/RolesClient.java new file mode 100644 index 00000000..fbd90314 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/RolesClient.java @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles; + +import com.auth0.client.mgmt.core.ClientOptions; +import com.auth0.client.mgmt.core.Suppliers; +import java.util.function.Supplier; + +public class RolesClient { + protected final ClientOptions clientOptions; + + protected final Supplier membersClient; + + protected final Supplier groupsClient; + + public RolesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.membersClient = Suppliers.memoize(() -> new MembersClient(clientOptions)); + this.groupsClient = Suppliers.memoize(() -> new GroupsClient(clientOptions)); + } + + public MembersClient members() { + return this.membersClient.get(); + } + + public GroupsClient groups() { + return this.groupsClient.get(); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/roles/types/ListOrganizationRoleGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/types/ListOrganizationRoleGroupsRequestParameters.java new file mode 100644 index 00000000..7bf48331 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/types/ListOrganizationRoleGroupsRequestParameters.java @@ -0,0 +1,204 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationRoleGroupsRequestParameters.Builder.class) +public final class ListOrganizationRoleGroupsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final Map additionalProperties; + + private ListOrganizationRoleGroupsRequestParameters( + OptionalNullable from, OptionalNullable take, Map additionalProperties) { + this.from = from; + this.take = take; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of results per page. Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationRoleGroupsRequestParameters + && equalTo((ListOrganizationRoleGroupsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationRoleGroupsRequestParameters other) { + return from.equals(other.from) && take.equals(other.take); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationRoleGroupsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + return this; + } + + /** + *

                              Optional Id from which to start selection.

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

                              Number of results per page. Defaults to 50.

                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + public ListOrganizationRoleGroupsRequestParameters build() { + return new ListOrganizationRoleGroupsRequestParameters(from, take, 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/organizations/roles/types/ListOrganizationRoleMembersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/roles/types/ListOrganizationRoleMembersRequestParameters.java new file mode 100644 index 00000000..08a4c07f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/roles/types/ListOrganizationRoleMembersRequestParameters.java @@ -0,0 +1,328 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.roles.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationRoleMembersRequestParameters.Builder.class) +public final class ListOrganizationRoleMembersRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final OptionalNullable fields; + + private final OptionalNullable includeFields; + + private final Map additionalProperties; + + private ListOrganizationRoleMembersRequestParameters( + OptionalNullable from, + OptionalNullable take, + OptionalNullable fields, + OptionalNullable includeFields, + Map additionalProperties) { + this.from = from; + this.take = take; + this.fields = fields; + this.includeFields = includeFields; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of results per page. Defaults to 50. Values above the maximum permitted size are capped. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + public OptionalNullable getFields() { + if (fields == null) { + return OptionalNullable.absent(); + } + return fields; + } + + /** + * @return Whether specified fields are to be included (true) or excluded (false). Defaults to true. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + public OptionalNullable getIncludeFields() { + if (includeFields == null) { + return OptionalNullable.absent(); + } + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationRoleMembersRequestParameters + && equalTo((ListOrganizationRoleMembersRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationRoleMembersRequestParameters other) { + return from.equals(other.from) + && take.equals(other.take) + && fields.equals(other.fields) + && includeFields.equals(other.includeFields); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take, this.fields, this.includeFields); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable fields = OptionalNullable.absent(); + + private OptionalNullable includeFields = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationRoleMembersRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + fields(other.getFields()); + includeFields(other.getIncludeFields()); + return this; + } + + /** + *

                              Optional Id from which to start selection.

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

                              Number of results per page. Defaults to 50. Values above the maximum permitted size are capped.

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

                              Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

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

                              Whether specified fields are to be included (true) or excluded (false). Defaults to true.

                              + */ + @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) + public Builder includeFields(@Nullable OptionalNullable includeFields) { + this.includeFields = includeFields; + return this; + } + + public Builder includeFields(Boolean includeFields) { + this.includeFields = OptionalNullable.of(includeFields); + return this; + } + + public Builder includeFields(Optional includeFields) { + if (includeFields.isPresent()) { + this.includeFields = OptionalNullable.of(includeFields.get()); + } else { + this.includeFields = OptionalNullable.absent(); + } + return this; + } + + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { + if (includeFields.isNull()) { + this.includeFields = OptionalNullable.ofNull(); + } else if (includeFields.isEmpty()) { + this.includeFields = OptionalNullable.absent(); + } else { + this.includeFields = OptionalNullable.of(includeFields.get()); + } + return this; + } + + public ListOrganizationRoleMembersRequestParameters build() { + return new ListOrganizationRoleMembersRequestParameters( + from, take, fields, includeFields, 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/organizations/types/AddOrganizationConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/AddOrganizationConnectionRequestContent.java index 2fa7a9dc..9306ad47 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/AddOrganizationConnectionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/AddOrganizationConnectionRequestContent.java @@ -172,7 +172,6 @@ public Builder from(AddOrganizationConnectionRequestContent other) { } /** - *

                              Single connection ID to add to the organization.

                              *

                              Single connection ID to add to the organization.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/AssociateOrganizationClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/AssociateOrganizationClientGrantRequestContent.java index 008e5fd2..77e66230 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/AssociateOrganizationClientGrantRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/AssociateOrganizationClientGrantRequestContent.java @@ -99,7 +99,6 @@ public Builder from(AssociateOrganizationClientGrantRequestContent other) { } /** - *

                              A Client Grant ID to add to the organization.

                              *

                              A Client Grant ID to add to the organization.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java index facd18fd..079b803f 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationAllConnectionRequestParameters.java @@ -5,6 +5,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.types.OrganizationAccessLevelEnum; +import com.auth0.client.mgmt.types.OrganizationMemberAccessLevelEnum; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -32,6 +33,8 @@ public final class CreateOrganizationAllConnectionRequestParameters { private final Optional organizationAccessLevel; + private final Optional organizationMemberAccessLevel; + private final Optional isEnabled; private final String connectionId; @@ -44,6 +47,7 @@ private CreateOrganizationAllConnectionRequestParameters( Optional showAsButton, Optional isSignupEnabled, Optional organizationAccessLevel, + Optional organizationMemberAccessLevel, Optional isEnabled, String connectionId, Map additionalProperties) { @@ -52,6 +56,7 @@ private CreateOrganizationAllConnectionRequestParameters( this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.isEnabled = isEnabled; this.connectionId = connectionId; this.additionalProperties = additionalProperties; @@ -94,6 +99,11 @@ public Optional getOrganizationAccessLevel() { return organizationAccessLevel; } + @JsonProperty("organization_member_access_level") + public Optional getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + /** * @return Whether the connection is enabled for the organization. */ @@ -128,6 +138,7 @@ private boolean equalTo(CreateOrganizationAllConnectionRequestParameters other) && showAsButton.equals(other.showAsButton) && isSignupEnabled.equals(other.isSignupEnabled) && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel) && isEnabled.equals(other.isEnabled) && connectionId.equals(other.connectionId); } @@ -140,6 +151,7 @@ public int hashCode() { this.showAsButton, this.isSignupEnabled, this.organizationAccessLevel, + this.organizationMemberAccessLevel, this.isEnabled, this.connectionId); } @@ -201,6 +213,11 @@ public interface _FinalStage { _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel(OrganizationMemberAccessLevelEnum organizationMemberAccessLevel); + /** *

                              Whether the connection is enabled for the organization.

                              */ @@ -215,6 +232,8 @@ public static final class Builder implements ConnectionIdStage, _FinalStage { private Optional isEnabled = Optional.empty(); + private Optional organizationMemberAccessLevel = Optional.empty(); + private Optional organizationAccessLevel = Optional.empty(); private Optional isSignupEnabled = Optional.empty(); @@ -237,13 +256,13 @@ public Builder from(CreateOrganizationAllConnectionRequestParameters other) { showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); isEnabled(other.getIsEnabled()); connectionId(other.getConnectionId()); return this; } /** - *

                              Connection identifier.

                              *

                              Connection identifier.

                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -274,6 +293,21 @@ public _FinalStage isEnabled(Optional isEnabled) { return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + OrganizationMemberAccessLevelEnum organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + @java.lang.Override public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); @@ -375,6 +409,7 @@ public CreateOrganizationAllConnectionRequestParameters build() { showAsButton, isSignupEnabled, organizationAccessLevel, + organizationMemberAccessLevel, isEnabled, connectionId, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationClientsRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationClientsRequestContent.java new file mode 100644 index 00000000..9126f6bf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationClientsRequestContent.java @@ -0,0 +1,125 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.CreateOrganizationClientRequestItem; +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 = CreateOrganizationClientsRequestContent.Builder.class) +public final class CreateOrganizationClientsRequestContent { + private final List clients; + + private final Map additionalProperties; + + private CreateOrganizationClientsRequestContent( + List clients, Map additionalProperties) { + this.clients = clients; + this.additionalProperties = additionalProperties; + } + + /** + * @return List of clients to associate with the organization. + */ + @JsonProperty("clients") + public List getClients() { + return clients; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateOrganizationClientsRequestContent + && equalTo((CreateOrganizationClientsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateOrganizationClientsRequestContent other) { + return clients.equals(other.clients); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clients); + } + + @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 clients = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(CreateOrganizationClientsRequestContent other) { + clients(other.getClients()); + return this; + } + + /** + *

                              List of clients to associate with the organization.

                              + */ + @JsonSetter(value = "clients", nulls = Nulls.SKIP) + public Builder clients(List clients) { + this.clients.clear(); + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + public Builder addClients(CreateOrganizationClientRequestItem clients) { + this.clients.add(clients); + return this; + } + + public Builder addAllClients(List clients) { + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + public CreateOrganizationClientsRequestContent build() { + return new CreateOrganizationClientsRequestContent(clients, 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/organizations/types/CreateOrganizationDiscoveryDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationDiscoveryDomainRequestContent.java index 24739546..bd77e634 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationDiscoveryDomainRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationDiscoveryDomainRequestContent.java @@ -144,7 +144,6 @@ public Builder from(CreateOrganizationDiscoveryDomainRequestContent other) { } /** - *

                              The domain name to associate with the organization e.g. acme.com.

                              *

                              The domain name to associate with the organization e.g. acme.com.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationInvitationRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationInvitationRequestContent.java index 2fa99448..b0a9f33b 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationInvitationRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationInvitationRequestContent.java @@ -289,7 +289,6 @@ public ClientIdStage invitee(@NotNull OrganizationInvitationInvitee invitee) { } /** - *

                              Auth0 client ID. Used to resolve the application's login initiation endpoint.

                              *

                              Auth0 client ID. Used to resolve the application's login initiation endpoint.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/DeleteOrganizationClientsRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/DeleteOrganizationClientsRequestContent.java new file mode 100644 index 00000000..0bfa0ada --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/DeleteOrganizationClientsRequestContent.java @@ -0,0 +1,123 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.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 = DeleteOrganizationClientsRequestContent.Builder.class) +public final class DeleteOrganizationClientsRequestContent { + private final List clients; + + private final Map additionalProperties; + + private DeleteOrganizationClientsRequestContent(List clients, Map additionalProperties) { + this.clients = clients; + this.additionalProperties = additionalProperties; + } + + /** + * @return List of client IDs to disassociate from the organization. + */ + @JsonProperty("clients") + public List getClients() { + return clients; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DeleteOrganizationClientsRequestContent + && equalTo((DeleteOrganizationClientsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(DeleteOrganizationClientsRequestContent other) { + return clients.equals(other.clients); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clients); + } + + @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 clients = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(DeleteOrganizationClientsRequestContent other) { + clients(other.getClients()); + return this; + } + + /** + *

                              List of client IDs to disassociate from the organization.

                              + */ + @JsonSetter(value = "clients", nulls = Nulls.SKIP) + public Builder clients(List clients) { + this.clients.clear(); + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + public Builder addClients(String clients) { + this.clients.add(clients); + return this; + } + + public Builder addAllClients(List clients) { + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + public DeleteOrganizationClientsRequestContent build() { + return new DeleteOrganizationClientsRequestContent(clients, 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/organizations/types/GetOrganizationInvitationRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/GetOrganizationInvitationRequestParameters.java index 7e130e65..55e2b1aa 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/GetOrganizationInvitationRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/GetOrganizationInvitationRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetOrganizationInvitationRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java index 14962022..9024cb77 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationAllConnectionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -48,7 +49,8 @@ private ListOrganizationAllConnectionsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -59,7 +61,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -70,7 +73,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -81,7 +85,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Filter connections by enabled status. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_enabled") public OptionalNullable getIsEnabled() { if (isEnabled == null) { return OptionalNullable.absent(); @@ -89,6 +94,30 @@ public OptionalNullable getIsEnabled() { return isEnabled; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_enabled") + private OptionalNullable _getIsEnabled() { + return isEnabled; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java index a05a0e3f..48a6606f 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.organizations.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; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -69,7 +71,8 @@ public Optional> getGrantIds() { /** * @return Optional filter on audience of the client grant. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("audience") public OptionalNullable getAudience() { if (audience == null) { return OptionalNullable.absent(); @@ -80,7 +83,8 @@ public OptionalNullable getAudience() { /** * @return Optional filter on client_id of the client grant. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") public OptionalNullable getClientId() { if (clientId == null) { return OptionalNullable.absent(); @@ -91,7 +95,8 @@ public OptionalNullable getClientId() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -102,7 +107,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -113,7 +119,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -121,6 +128,42 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("grant_ids") + private Optional> _getGrantIds() { + return grantIds; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("audience") + private OptionalNullable _getAudience() { + return audience; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientsRequestParameters.java new file mode 100644 index 00000000..bfa4dbe6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientsRequestParameters.java @@ -0,0 +1,204 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationClientsRequestParameters.Builder.class) +public final class ListOrganizationClientsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final Map additionalProperties; + + private ListOrganizationClientsRequestParameters( + OptionalNullable from, OptionalNullable take, Map additionalProperties) { + this.from = from; + this.take = take; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of results per page. Defaults to 50. Values greater than the maximum of 100 are capped at 100. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationClientsRequestParameters + && equalTo((ListOrganizationClientsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationClientsRequestParameters other) { + return from.equals(other.from) && take.equals(other.take); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationClientsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + return this; + } + + /** + *

                              Optional Id from which to start selection.

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

                              Number of results per page. Defaults to 50. Values greater than the maximum of 100 are capped at 100.

                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + public ListOrganizationClientsRequestParameters build() { + return new ListOrganizationClientsRequestParameters(from, take, 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/organizations/types/ListOrganizationConnectionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java index 0079d9d9..58a8c0a9 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListOrganizationConnectionsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java index ec9d637d..8a90b83f 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListOrganizationDiscoveryDomainsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationGroupsRequestParameters.java index d4a4aaf0..ca4bb109 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationGroupsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListOrganizationGroupsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java index 03acfb70..e2bb762e 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -56,7 +57,8 @@ private ListOrganizationInvitationsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -67,7 +69,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -78,7 +81,8 @@ public OptionalNullable getPerPage() { /** * @return When true, return results inside an object that also contains the start and limit. When false (default), a direct array of results is returned. We do not yet support returning the total invitations count. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -89,7 +93,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -100,7 +105,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -111,7 +117,8 @@ public OptionalNullable getIncludeFields() { /** * @return Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") public OptionalNullable getSort() { if (sort == null) { return OptionalNullable.absent(); @@ -119,6 +126,42 @@ public OptionalNullable getSort() { return sort; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java index 3a743f5c..0f1a7f38 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.organizations.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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListOrganizationMembersRequestParameters.Builder.class) public final class ListOrganizationMembersRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -33,11 +36,13 @@ public final class ListOrganizationMembersRequestParameters { private final Map additionalProperties; private ListOrganizationMembersRequestParameters( + OptionalNullable includeTotals, OptionalNullable from, OptionalNullable take, OptionalNullable fields, OptionalNullable includeFields, Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.fields = fields; @@ -45,10 +50,23 @@ private ListOrganizationMembersRequestParameters( this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -59,7 +77,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -70,7 +89,8 @@ public OptionalNullable getTake() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -81,7 +101,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -89,6 +110,36 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -102,7 +153,8 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListOrganizationMembersRequestParameters other) { - return from.equals(other.from) + return includeTotals.equals(other.includeTotals) + && from.equals(other.from) && take.equals(other.take) && fields.equals(other.fields) && includeFields.equals(other.includeFields); @@ -110,7 +162,7 @@ private boolean equalTo(ListOrganizationMembersRequestParameters other) { @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take, this.fields, this.includeFields); + return Objects.hash(this.includeTotals, this.from, this.take, this.fields, this.includeFields); } @java.lang.Override @@ -124,6 +176,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -138,6 +192,7 @@ public static final class Builder { private Builder() {} public Builder from(ListOrganizationMembersRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); fields(other.getFields()); @@ -145,6 +200,40 @@ public Builder from(ListOrganizationMembersRequestParameters other) { return this; } + /** + *

                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

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

                              Optional Id from which to start selection.

                              */ @@ -283,7 +372,7 @@ public Builder includeFields(com.auth0.client.mgmt.core.Nullable includ public ListOrganizationMembersRequestParameters build() { return new ListOrganizationMembersRequestParameters( - from, take, fields, includeFields, additionalProperties); + includeTotals, from, take, fields, includeFields, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationClientRequestContent.java new file mode 100644 index 00000000..0b5bc760 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationClientRequestContent.java @@ -0,0 +1,113 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.organizations.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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateOrganizationClientRequestContent.Builder.class) +public final class UpdateOrganizationClientRequestContent { + private final Optional useForMemberAccess; + + private final Map additionalProperties; + + private UpdateOrganizationClientRequestContent( + Optional useForMemberAccess, Map additionalProperties) { + this.useForMemberAccess = useForMemberAccess; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether this client is used for member access to the organization. + */ + @JsonProperty("use_for_member_access") + public Optional getUseForMemberAccess() { + return useForMemberAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateOrganizationClientRequestContent + && equalTo((UpdateOrganizationClientRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateOrganizationClientRequestContent other) { + return useForMemberAccess.equals(other.useForMemberAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.useForMemberAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional useForMemberAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateOrganizationClientRequestContent other) { + useForMemberAccess(other.getUseForMemberAccess()); + return this; + } + + /** + *

                              Whether this client is used for member access to the organization.

                              + */ + @JsonSetter(value = "use_for_member_access", nulls = Nulls.SKIP) + public Builder useForMemberAccess(Optional useForMemberAccess) { + this.useForMemberAccess = useForMemberAccess; + return this; + } + + public Builder useForMemberAccess(Boolean useForMemberAccess) { + this.useForMemberAccess = Optional.ofNullable(useForMemberAccess); + return this; + } + + public UpdateOrganizationClientRequestContent build() { + return new UpdateOrganizationClientRequestContent(useForMemberAccess, 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/organizations/types/UpdateOrganizationConnectionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestParameters.java index b5ef7753..f443c1eb 100644 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestParameters.java @@ -7,6 +7,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.OrganizationAccessLevelEnumWithNull; +import com.auth0.client.mgmt.types.OrganizationMemberAccessLevelEnumWithNull; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -34,6 +35,8 @@ public final class UpdateOrganizationConnectionRequestParameters { private final OptionalNullable organizationAccessLevel; + private final OptionalNullable organizationMemberAccessLevel; + private final OptionalNullable isEnabled; private final Map additionalProperties; @@ -44,6 +47,7 @@ private UpdateOrganizationConnectionRequestParameters( Optional showAsButton, Optional isSignupEnabled, OptionalNullable organizationAccessLevel, + OptionalNullable organizationMemberAccessLevel, OptionalNullable isEnabled, Map additionalProperties) { this.organizationConnectionName = organizationConnectionName; @@ -51,6 +55,7 @@ private UpdateOrganizationConnectionRequestParameters( this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.isEnabled = isEnabled; this.additionalProperties = additionalProperties; } @@ -100,6 +105,15 @@ public OptionalNullable getOrganizationAcce return organizationAccessLevel; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_member_access_level") + public OptionalNullable getOrganizationMemberAccessLevel() { + if (organizationMemberAccessLevel == null) { + return OptionalNullable.absent(); + } + return organizationMemberAccessLevel; + } + /** * @return Whether the connection is enabled for the organization. */ @@ -124,6 +138,12 @@ private OptionalNullable _getOrganizationAc return organizationAccessLevel; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_member_access_level") + private OptionalNullable _getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("is_enabled") private OptionalNullable _getIsEnabled() { @@ -148,6 +168,7 @@ private boolean equalTo(UpdateOrganizationConnectionRequestParameters other) { && showAsButton.equals(other.showAsButton) && isSignupEnabled.equals(other.isSignupEnabled) && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel) && isEnabled.equals(other.isEnabled); } @@ -159,6 +180,7 @@ public int hashCode() { this.showAsButton, this.isSignupEnabled, this.organizationAccessLevel, + this.organizationMemberAccessLevel, this.isEnabled); } @@ -184,6 +206,9 @@ public static final class Builder { private OptionalNullable organizationAccessLevel = OptionalNullable.absent(); + private OptionalNullable organizationMemberAccessLevel = + OptionalNullable.absent(); + private OptionalNullable isEnabled = OptionalNullable.absent(); @JsonAnySetter @@ -197,6 +222,7 @@ public Builder from(UpdateOrganizationConnectionRequestParameters other) { showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); isEnabled(other.getIsEnabled()); return this; } @@ -311,6 +337,42 @@ public Builder organizationAccessLevel( return this; } + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public Builder organizationMemberAccessLevel( + @Nullable OptionalNullable organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + + public Builder organizationMemberAccessLevel( + OrganizationMemberAccessLevelEnumWithNull organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = OptionalNullable.of(organizationMemberAccessLevel); + return this; + } + + public Builder organizationMemberAccessLevel( + Optional organizationMemberAccessLevel) { + if (organizationMemberAccessLevel.isPresent()) { + this.organizationMemberAccessLevel = OptionalNullable.of(organizationMemberAccessLevel.get()); + } else { + this.organizationMemberAccessLevel = OptionalNullable.absent(); + } + return this; + } + + public Builder organizationMemberAccessLevel( + com.auth0.client.mgmt.core.Nullable + organizationMemberAccessLevel) { + if (organizationMemberAccessLevel.isNull()) { + this.organizationMemberAccessLevel = OptionalNullable.ofNull(); + } else if (organizationMemberAccessLevel.isEmpty()) { + this.organizationMemberAccessLevel = OptionalNullable.absent(); + } else { + this.organizationMemberAccessLevel = OptionalNullable.of(organizationMemberAccessLevel.get()); + } + return this; + } + /** *

                              Whether the connection is enabled for the organization.

                              */ @@ -352,6 +414,7 @@ public UpdateOrganizationConnectionRequestParameters build() { showAsButton, isSignupEnabled, organizationAccessLevel, + organizationMemberAccessLevel, isEnabled, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java index 37ca4bfb..584b0f6d 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -74,6 +75,15 @@ public CompletableFuture>> get( 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 @@ -122,6 +132,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -180,6 +193,15 @@ public CompletableFuture> set( 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 @@ -220,6 +242,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawPartialsClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawPartialsClient.java index a9736236..ca39ceb0 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawPartialsClient.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawPartialsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -71,6 +72,15 @@ public CompletableFuture>> get( 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 @@ -119,6 +129,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -173,6 +186,15 @@ public CompletableFuture> set( 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 @@ -213,6 +235,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawRenderingClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawRenderingClient.java index 290858a2..6ddaa6d4 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawRenderingClient.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawRenderingClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -123,6 +124,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -191,6 +201,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -243,6 +256,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -291,6 +313,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -339,6 +364,15 @@ public CompletableFuture> get( 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 @@ -391,6 +425,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -466,6 +503,15 @@ public CompletableFuture> u 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 @@ -514,6 +560,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java index 3faaa185..cb557000 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public ManagementApiHttpResponse> get( 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() : "{}"; @@ -102,6 +112,8 @@ public ManagementApiHttpResponse> get( 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); } @@ -152,6 +164,15 @@ public ManagementApiHttpResponse set( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -179,6 +200,8 @@ public ManagementApiHttpResponse set( 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/prompts/RawPartialsClient.java b/src/main/java/com/auth0/client/mgmt/prompts/RawPartialsClient.java index a085a1fe..cc66afc5 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/RawPartialsClient.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/RawPartialsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -66,6 +67,15 @@ public ManagementApiHttpResponse> get(PartialGroupsEnum prom 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() : "{}"; @@ -99,6 +109,8 @@ public ManagementApiHttpResponse> get(PartialGroupsEnum prom 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); } @@ -144,6 +156,15 @@ public ManagementApiHttpResponse set( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -171,6 +192,8 @@ public ManagementApiHttpResponse set( 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/prompts/RawRenderingClient.java b/src/main/java/com/auth0/client/mgmt/prompts/RawRenderingClient.java index e1efb1c0..3cd56228 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/RawRenderingClient.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/RawRenderingClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -118,6 +119,15 @@ public ManagementApiHttpResponse bulkUpdate( 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() : "{}"; @@ -237,6 +258,8 @@ public ManagementApiHttpResponse bulkUpdate( 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); } @@ -277,6 +300,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -312,6 +344,8 @@ public ManagementApiHttpResponse get( 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); } @@ -379,6 +413,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -411,6 +454,8 @@ public ManagementApiHttpResponse update( 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/prompts/types/ListAculsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java index 6c9d1de5..2ca88531 100644 --- a/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java @@ -3,14 +3,15 @@ */ package com.auth0.client.mgmt.prompts.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.AculRenderingModeEnum; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -65,7 +66,8 @@ private ListAculsRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -76,7 +78,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (default: true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -87,7 +90,8 @@ public OptionalNullable getIncludeFields() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -98,7 +102,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Maximum value is 100, default value is 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -109,7 +114,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total configuration count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -120,7 +126,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Name of the prompt to filter by */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("prompt") public OptionalNullable getPrompt() { if (prompt == null) { return OptionalNullable.absent(); @@ -131,7 +138,8 @@ public OptionalNullable getPrompt() { /** * @return Name of the screen to filter by */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("screen") public OptionalNullable getScreen() { if (screen == null) { return OptionalNullable.absent(); @@ -142,7 +150,8 @@ public OptionalNullable getScreen() { /** * @return Rendering mode to filter by */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("rendering_mode") public OptionalNullable getRenderingMode() { if (renderingMode == null) { return OptionalNullable.absent(); @@ -150,6 +159,54 @@ public OptionalNullable getRenderingMode() { return renderingMode; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("prompt") + private OptionalNullable _getPrompt() { + return prompt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("screen") + private OptionalNullable _getScreen() { + return screen; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("rendering_mode") + private OptionalNullable _getRenderingMode() { + return renderingMode; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java index 3855eaa4..374dcfd7 100644 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -165,6 +178,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -214,6 +236,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java index 5c33d763..2d68a2bf 100644 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -94,6 +104,8 @@ public ManagementApiHttpResponse get( 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); } @@ -138,6 +150,15 @@ public ManagementApiHttpResponse u 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() : "{}"; @@ -171,6 +192,8 @@ public ManagementApiHttpResponse u 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/riskassessments/settings/AsyncRawNewDeviceClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncRawNewDeviceClient.java index 4036e953..7a83fcb1 100644 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncRawNewDeviceClient.java +++ b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncRawNewDeviceClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -113,6 +123,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -165,6 +178,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -215,6 +237,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/RawNewDeviceClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/RawNewDeviceClient.java index 70f832c4..9f00e2bd 100644 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/RawNewDeviceClient.java +++ b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/RawNewDeviceClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -65,6 +66,15 @@ public ManagementApiHttpResponseLength of time to remember devices for, in days.

                              *

                              Length of time to remember devices for, in days.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/types/UpdateRiskAssessmentsSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/riskassessments/types/UpdateRiskAssessmentsSettingsRequestContent.java index bc134074..31bbcd62 100644 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/types/UpdateRiskAssessmentsSettingsRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/riskassessments/types/UpdateRiskAssessmentsSettingsRequestContent.java @@ -98,7 +98,6 @@ public Builder from(UpdateRiskAssessmentsSettingsRequestContent other) { } /** - *

                              Whether or not risk assessment is enabled.

                              *

                              Whether or not risk assessment is enabled.

                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawGroupsClient.java index e7fc85e1..d1c464cb 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawGroupsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -99,6 +100,15 @@ public CompletableFuture>> g 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 @@ -162,6 +172,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -216,6 +229,15 @@ public CompletableFuture> create( 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 @@ -261,6 +283,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -315,6 +340,15 @@ public CompletableFuture> delete( 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 @@ -360,6 +394,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java index b867a426..35391d58 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -100,6 +101,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -169,6 +179,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -222,6 +235,15 @@ public CompletableFuture> add( 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 @@ -267,6 +289,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -321,6 +346,15 @@ public CompletableFuture> delete( 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 @@ -361,6 +395,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawUsersClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawUsersClient.java index 35afcf25..f424e244 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawUsersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -48,6 +49,7 @@ public AsyncRawUsersClient(ClientOptions clientOptions) { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                              Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                              *

                              This endpoint supports two types of pagination:

                              *
                                *
                              • Offset pagination
                              • @@ -68,6 +70,7 @@ public CompletableFuture> /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                *

                                This endpoint supports two types of pagination:

                                *
                                  *
                                • Offset pagination
                                • @@ -89,6 +92,7 @@ public CompletableFuture> /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                  Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                  *

                                  This endpoint supports two types of pagination:

                                  *
                                    *
                                  • Offset pagination
                                  • @@ -110,6 +114,7 @@ public CompletableFuture> /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                    Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                    *

                                    This endpoint supports two types of pagination:

                                    *
                                      *
                                    • Offset pagination
                                    • @@ -131,6 +136,8 @@ public CompletableFuture> .addPathSegments("roles") .addPathSegment(id) .addPathSegments("users"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -151,6 +158,15 @@ public CompletableFuture> 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 @@ -215,6 +231,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -270,6 +289,15 @@ public CompletableFuture> assign( 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 @@ -315,6 +343,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncUsersClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncUsersClient.java index 39bda944..eba9d84e 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/AsyncUsersClient.java @@ -30,6 +30,7 @@ public AsyncRawUsersClient withRawResponse() { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                      Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                      *

                                      This endpoint supports two types of pagination:

                                      *
                                        *
                                      • Offset pagination
                                      • @@ -50,6 +51,7 @@ public CompletableFuture> list(String id) { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                        Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                        *

                                        This endpoint supports two types of pagination:

                                        *
                                          *
                                        • Offset pagination
                                        • @@ -70,6 +72,7 @@ public CompletableFuture> list(String id, RequestOp /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                          Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                          *

                                          This endpoint supports two types of pagination:

                                          *
                                            *
                                          • Offset pagination
                                          • @@ -90,6 +93,7 @@ public CompletableFuture> list(String id, ListRoleU /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                            Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                            *

                                            This endpoint supports two types of pagination:

                                            *
                                              *
                                            • Offset pagination
                                            • diff --git a/src/main/java/com/auth0/client/mgmt/roles/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/roles/RawGroupsClient.java index 970d20bc..6466ee8f 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/RawGroupsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -92,6 +93,15 @@ public ManagementApiHttpResponse> get( 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() : "{}"; @@ -134,6 +144,8 @@ public ManagementApiHttpResponse> get( 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); } @@ -179,6 +191,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -209,6 +230,8 @@ public ManagementApiHttpResponse create( 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); } @@ -254,6 +277,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -284,6 +316,8 @@ public ManagementApiHttpResponse delete( 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/roles/RawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java index ce99d607..dee95f63 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -94,6 +95,15 @@ public ManagementApiHttpResponse> 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() : "{}"; @@ -138,6 +148,8 @@ public ManagementApiHttpResponse> 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); } @@ -183,6 +195,15 @@ public ManagementApiHttpResponse add( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -213,6 +234,8 @@ public ManagementApiHttpResponse add( 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); } @@ -258,6 +281,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -285,6 +317,8 @@ public ManagementApiHttpResponse delete( 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/roles/RawUsersClient.java b/src/main/java/com/auth0/client/mgmt/roles/RawUsersClient.java index 035e1f30..5f4b2134 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/RawUsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/RawUsersClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -43,6 +44,7 @@ public RawUsersClient(ClientOptions clientOptions) { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                              Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                              *

                                              This endpoint supports two types of pagination:

                                              *
                                                *
                                              • Offset pagination
                                              • @@ -63,6 +65,7 @@ public ManagementApiHttpResponse> list(String id) { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                *

                                                This endpoint supports two types of pagination:

                                                *
                                                  *
                                                • Offset pagination
                                                • @@ -83,6 +86,7 @@ public ManagementApiHttpResponse> list(String id, R /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                  Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                  *

                                                  This endpoint supports two types of pagination:

                                                  *
                                                    *
                                                  • Offset pagination
                                                  • @@ -104,6 +108,7 @@ public ManagementApiHttpResponse> list( /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                    Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                    *

                                                    This endpoint supports two types of pagination:

                                                    *
                                                      *
                                                    • Offset pagination
                                                    • @@ -125,6 +130,8 @@ public ManagementApiHttpResponse> list( .addPathSegments("roles") .addPathSegment(id) .addPathSegments("users"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -145,6 +152,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -187,6 +203,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -234,6 +252,15 @@ public ManagementApiHttpResponse assign( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -264,6 +291,8 @@ public ManagementApiHttpResponse assign( 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/roles/UsersClient.java b/src/main/java/com/auth0/client/mgmt/roles/UsersClient.java index a9247945..96fc5e27 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/UsersClient.java +++ b/src/main/java/com/auth0/client/mgmt/roles/UsersClient.java @@ -29,6 +29,7 @@ public RawUsersClient withRawResponse() { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                      Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                      *

                                                      This endpoint supports two types of pagination:

                                                      *
                                                        *
                                                      • Offset pagination
                                                      • @@ -49,6 +50,7 @@ public SyncPagingIterable list(String id) { /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                        Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                        *

                                                        This endpoint supports two types of pagination:

                                                        *
                                                          *
                                                        • Offset pagination
                                                        • @@ -69,6 +71,7 @@ public SyncPagingIterable list(String id, RequestOptions requestOption /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                          Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                          *

                                                          This endpoint supports two types of pagination:

                                                          *
                                                            *
                                                          • Offset pagination
                                                          • @@ -89,6 +92,7 @@ public SyncPagingIterable list(String id, ListRoleUsersRequestParamete /** * Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. + *

                                                            Note: Returns only users with direct role assignments. For groups assigned to this role, use GET /api/v2/roles/{id}/groups.

                                                            *

                                                            This endpoint supports two types of pagination:

                                                            *
                                                              *
                                                            • Offset pagination
                                                            • diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleGroupsParameters.java b/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleGroupsParameters.java index 650b3c2f..f6160216 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleGroupsParameters.java +++ b/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleGroupsParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.roles.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListRoleGroupsParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java index d028f097..2215e708 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.roles.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListRolePermissionsRequestParameters( /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPerPage() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java index 321a175d..247da19e 100644 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.roles.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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListRoleUsersRequestParameters.Builder.class) public final class ListRoleUsersRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -29,16 +32,33 @@ public final class ListRoleUsersRequestParameters { private final Map additionalProperties; private ListRoleUsersRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { + OptionalNullable includeTotals, + OptionalNullable from, + OptionalNullable take, + Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +69,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +78,24 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -69,12 +108,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListRoleUsersRequestParameters other) { - return from.equals(other.from) && take.equals(other.take); + return includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take); + return Objects.hash(this.includeTotals, this.from, this.take); } @java.lang.Override @@ -88,6 +127,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -98,11 +139,46 @@ public static final class Builder { private Builder() {} public Builder from(ListRoleUsersRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; } + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

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

                                                              Optional Id from which to start selection.

                                                              */ @@ -172,7 +248,7 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { } public ListRoleUsersRequestParameters build() { - return new ListRoleUsersRequestParameters(from, take, additionalProperties); + return new ListRoleUsersRequestParameters(includeTotals, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java index 96af90c7..cca21379 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -77,6 +78,15 @@ public CompletableFuture>> list( 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 @@ -120,6 +130,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -183,6 +196,15 @@ public CompletableFuture>> set( 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 @@ -226,6 +248,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java index a0d893d5..47ff01a6 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java @@ -10,6 +10,7 @@ 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; @@ -97,6 +98,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -146,6 +156,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -195,6 +208,15 @@ public CompletableFuture> revoke( 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 @@ -230,6 +252,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java index b593085d..689a57fe 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -73,6 +74,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -103,6 +113,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -158,6 +170,15 @@ public ManagementApiHttpResponse> set( 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() : "{}"; @@ -188,6 +209,8 @@ public ManagementApiHttpResponse> set( 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/selfserviceprofiles/RawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java index 5711d6c0..806823e1 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java @@ -10,6 +10,7 @@ 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; @@ -92,6 +93,15 @@ public ManagementApiHttpResponse revoke(String profileId, String id, Reque if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -189,6 +210,8 @@ public ManagementApiHttpResponse revoke(String profileId, String id, Reque 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/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java index 93d33db8..e7c814dc 100644 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java @@ -9,6 +9,8 @@ import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketEnabledFeatures; import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketEnabledOrganization; import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketProvisioningConfig; +import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketUniversalLogoutConfig; +import com.auth0.client.mgmt.types.ThirdPartyClientAccessConfig; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -42,6 +44,10 @@ public final class CreateSelfServiceProfileSsoTicketRequestContent { private final Optional useForOrganizationDiscovery; + private final Optional thirdPartyClientAccessConfig; + + private final Optional universalLogoutConfig; + private final Optional enabledFeatures; private final Map additionalProperties; @@ -55,6 +61,8 @@ private CreateSelfServiceProfileSsoTicketRequestContent( Optional domainAliasesConfig, Optional provisioningConfig, Optional useForOrganizationDiscovery, + Optional thirdPartyClientAccessConfig, + Optional universalLogoutConfig, Optional enabledFeatures, Map additionalProperties) { this.connectionId = connectionId; @@ -65,6 +73,8 @@ private CreateSelfServiceProfileSsoTicketRequestContent( this.domainAliasesConfig = domainAliasesConfig; this.provisioningConfig = provisioningConfig; this.useForOrganizationDiscovery = useForOrganizationDiscovery; + this.thirdPartyClientAccessConfig = thirdPartyClientAccessConfig; + this.universalLogoutConfig = universalLogoutConfig; this.enabledFeatures = enabledFeatures; this.additionalProperties = additionalProperties; } @@ -124,6 +134,16 @@ public Optional getUseForOrganizationDiscovery() { return useForOrganizationDiscovery; } + @JsonProperty("third_party_client_access_config") + public Optional getThirdPartyClientAccessConfig() { + return thirdPartyClientAccessConfig; + } + + @JsonProperty("universal_logout_config") + public Optional getUniversalLogoutConfig() { + return universalLogoutConfig; + } + @JsonProperty("enabled_features") public Optional getEnabledFeatures() { return enabledFeatures; @@ -150,6 +170,8 @@ private boolean equalTo(CreateSelfServiceProfileSsoTicketRequestContent other) { && domainAliasesConfig.equals(other.domainAliasesConfig) && provisioningConfig.equals(other.provisioningConfig) && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) + && thirdPartyClientAccessConfig.equals(other.thirdPartyClientAccessConfig) + && universalLogoutConfig.equals(other.universalLogoutConfig) && enabledFeatures.equals(other.enabledFeatures); } @@ -164,6 +186,8 @@ public int hashCode() { this.domainAliasesConfig, this.provisioningConfig, this.useForOrganizationDiscovery, + this.thirdPartyClientAccessConfig, + this.universalLogoutConfig, this.enabledFeatures); } @@ -194,6 +218,10 @@ public static final class Builder { private Optional useForOrganizationDiscovery = Optional.empty(); + private Optional thirdPartyClientAccessConfig = Optional.empty(); + + private Optional universalLogoutConfig = Optional.empty(); + private Optional enabledFeatures = Optional.empty(); @JsonAnySetter @@ -210,6 +238,8 @@ public Builder from(CreateSelfServiceProfileSsoTicketRequestContent other) { domainAliasesConfig(other.getDomainAliasesConfig()); provisioningConfig(other.getProvisioningConfig()); useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); + thirdPartyClientAccessConfig(other.getThirdPartyClientAccessConfig()); + universalLogoutConfig(other.getUniversalLogoutConfig()); enabledFeatures(other.getEnabledFeatures()); return this; } @@ -319,6 +349,30 @@ public Builder useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) return this; } + @JsonSetter(value = "third_party_client_access_config", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccessConfig( + Optional thirdPartyClientAccessConfig) { + this.thirdPartyClientAccessConfig = thirdPartyClientAccessConfig; + return this; + } + + public Builder thirdPartyClientAccessConfig(ThirdPartyClientAccessConfig thirdPartyClientAccessConfig) { + this.thirdPartyClientAccessConfig = Optional.ofNullable(thirdPartyClientAccessConfig); + return this; + } + + @JsonSetter(value = "universal_logout_config", nulls = Nulls.SKIP) + public Builder universalLogoutConfig( + Optional universalLogoutConfig) { + this.universalLogoutConfig = universalLogoutConfig; + return this; + } + + public Builder universalLogoutConfig(SelfServiceProfileSsoTicketUniversalLogoutConfig universalLogoutConfig) { + this.universalLogoutConfig = Optional.ofNullable(universalLogoutConfig); + return this; + } + @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) public Builder enabledFeatures(Optional enabledFeatures) { this.enabledFeatures = enabledFeatures; @@ -340,6 +394,8 @@ public CreateSelfServiceProfileSsoTicketRequestContent build() { domainAliasesConfig, provisioningConfig, useForOrganizationDiscovery, + thirdPartyClientAccessConfig, + universalLogoutConfig, enabledFeatures, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/tenants/AsyncRawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/AsyncRawSettingsClient.java index bf7ba835..eb8683cd 100644 --- a/src/main/java/com/auth0/client/mgmt/tenants/AsyncRawSettingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/tenants/AsyncRawSettingsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -94,6 +95,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -138,6 +148,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -205,6 +218,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -249,6 +271,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java index 8731df6b..b4cd2198 100644 --- a/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java +++ b/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -88,6 +89,15 @@ public ManagementApiHttpResponse get( 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() : "{}"; @@ -117,6 +127,8 @@ public ManagementApiHttpResponse get( 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); } @@ -175,6 +187,15 @@ public ManagementApiHttpResponse update( 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() : "{}"; @@ -205,6 +226,8 @@ public ManagementApiHttpResponse update( 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/tenants/types/GetTenantSettingsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/tenants/types/GetTenantSettingsRequestParameters.java index fad43e8f..47312ecd 100644 --- a/src/main/java/com/auth0/client/mgmt/tenants/types/GetTenantSettingsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/tenants/types/GetTenantSettingsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.tenants.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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetTenantSettingsRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java index c6c926a6..a7f90cc0 100644 --- a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java @@ -7,6 +7,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.DefaultTokenQuota; +import com.auth0.client.mgmt.types.ResourceServerAccessToken; import com.auth0.client.mgmt.types.SessionCookieSchema; import com.auth0.client.mgmt.types.TenantOidcLogoutSettings; import com.auth0.client.mgmt.types.TenantSettingsCountryCodes; @@ -89,6 +90,8 @@ public final class UpdateTenantSettingsRequestContent { private final Optional> enabledLocales; + private final OptionalNullable accessToken; + private final OptionalNullable securityHeaders; private final OptionalNullable sessionCookie; @@ -109,12 +112,16 @@ public final class UpdateTenantSettingsRequestContent { private final OptionalNullable authorizationResponseIssParameterSupported; + private final OptionalNullable dpopStrictRefreshTokenBinding; + private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; private final Optional resourceParameterProfile; private final Optional clientIdMetadataDocumentSupported; + private final Optional clientIdMetadataDocumentDynamicRegistrationSupported; + private final Optional enableAiGuide; private final Optional phoneConsolidatedExperience; @@ -153,6 +160,7 @@ private UpdateTenantSettingsRequestContent( Optional legacySandboxVersion, Optional defaultRedirectionUri, Optional> enabledLocales, + OptionalNullable accessToken, OptionalNullable securityHeaders, OptionalNullable sessionCookie, OptionalNullable sessions, @@ -163,9 +171,11 @@ private UpdateTenantSettingsRequestContent( OptionalNullable mtls, OptionalNullable pushedAuthorizationRequestsSupported, OptionalNullable authorizationResponseIssParameterSupported, + OptionalNullable dpopStrictRefreshTokenBinding, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, Optional resourceParameterProfile, Optional clientIdMetadataDocumentSupported, + Optional clientIdMetadataDocumentDynamicRegistrationSupported, Optional enableAiGuide, Optional phoneConsolidatedExperience, Optional includeSessionMetadataInTenantLogs, @@ -197,6 +207,7 @@ private UpdateTenantSettingsRequestContent( this.legacySandboxVersion = legacySandboxVersion; this.defaultRedirectionUri = defaultRedirectionUri; this.enabledLocales = enabledLocales; + this.accessToken = accessToken; this.securityHeaders = securityHeaders; this.sessionCookie = sessionCookie; this.sessions = sessions; @@ -207,9 +218,12 @@ private UpdateTenantSettingsRequestContent( this.mtls = mtls; this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; + this.dpopStrictRefreshTokenBinding = dpopStrictRefreshTokenBinding; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.resourceParameterProfile = resourceParameterProfile; this.clientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; + this.clientIdMetadataDocumentDynamicRegistrationSupported = + clientIdMetadataDocumentDynamicRegistrationSupported; this.enableAiGuide = enableAiGuide; this.phoneConsolidatedExperience = phoneConsolidatedExperience; this.includeSessionMetadataInTenantLogs = includeSessionMetadataInTenantLogs; @@ -423,6 +437,15 @@ public Optional> getEnabledLocales() { return enabledLocales; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("security_headers") public OptionalNullable getSecurityHeaders() { @@ -524,6 +547,18 @@ public OptionalNullable getAuthorizationResponseIssParameterSupported() return authorizationResponseIssParameterSupported; } + /** + * @return Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("dpop_strict_refresh_token_binding") + public OptionalNullable getDpopStrictRefreshTokenBinding() { + if (dpopStrictRefreshTokenBinding == null) { + return OptionalNullable.absent(); + } + return dpopStrictRefreshTokenBinding; + } + /** * @return Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. @@ -551,6 +586,14 @@ public Optional getClientIdMetadataDocumentSupported() { return clientIdMetadataDocumentSupported; } + /** + * @return Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled. + */ + @JsonProperty("client_id_metadata_document_dynamic_registration_supported") + public Optional getClientIdMetadataDocumentDynamicRegistrationSupported() { + return clientIdMetadataDocumentDynamicRegistrationSupported; + } + /** * @return Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. */ @@ -619,6 +662,12 @@ private OptionalNullable _getDefaultTokenQuota() { return defaultTokenQuota; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("security_headers") private OptionalNullable _getSecurityHeaders() { @@ -673,6 +722,12 @@ private OptionalNullable _getAuthorizationResponseIssParameterSupported return authorizationResponseIssParameterSupported; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("dpop_strict_refresh_token_binding") + private OptionalNullable _getDpopStrictRefreshTokenBinding() { + return dpopStrictRefreshTokenBinding; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { @@ -723,6 +778,7 @@ private boolean equalTo(UpdateTenantSettingsRequestContent other) { && legacySandboxVersion.equals(other.legacySandboxVersion) && defaultRedirectionUri.equals(other.defaultRedirectionUri) && enabledLocales.equals(other.enabledLocales) + && accessToken.equals(other.accessToken) && securityHeaders.equals(other.securityHeaders) && sessionCookie.equals(other.sessionCookie) && sessions.equals(other.sessions) @@ -733,10 +789,13 @@ private boolean equalTo(UpdateTenantSettingsRequestContent other) { && mtls.equals(other.mtls) && pushedAuthorizationRequestsSupported.equals(other.pushedAuthorizationRequestsSupported) && authorizationResponseIssParameterSupported.equals(other.authorizationResponseIssParameterSupported) + && dpopStrictRefreshTokenBinding.equals(other.dpopStrictRefreshTokenBinding) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) && resourceParameterProfile.equals(other.resourceParameterProfile) && clientIdMetadataDocumentSupported.equals(other.clientIdMetadataDocumentSupported) + && clientIdMetadataDocumentDynamicRegistrationSupported.equals( + other.clientIdMetadataDocumentDynamicRegistrationSupported) && enableAiGuide.equals(other.enableAiGuide) && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) && includeSessionMetadataInTenantLogs.equals(other.includeSessionMetadataInTenantLogs) @@ -772,6 +831,7 @@ public int hashCode() { this.legacySandboxVersion, this.defaultRedirectionUri, this.enabledLocales, + this.accessToken, this.securityHeaders, this.sessionCookie, this.sessions, @@ -782,9 +842,11 @@ public int hashCode() { this.mtls, this.pushedAuthorizationRequestsSupported, this.authorizationResponseIssParameterSupported, + this.dpopStrictRefreshTokenBinding, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.resourceParameterProfile, this.clientIdMetadataDocumentSupported, + this.clientIdMetadataDocumentDynamicRegistrationSupported, this.enableAiGuide, this.phoneConsolidatedExperience, this.includeSessionMetadataInTenantLogs, @@ -853,6 +915,8 @@ public static final class Builder { private Optional> enabledLocales = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable securityHeaders = OptionalNullable.absent(); private OptionalNullable sessionCookie = OptionalNullable.absent(); @@ -873,12 +937,16 @@ public static final class Builder { private OptionalNullable authorizationResponseIssParameterSupported = OptionalNullable.absent(); + private OptionalNullable dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); private Optional resourceParameterProfile = Optional.empty(); private Optional clientIdMetadataDocumentSupported = Optional.empty(); + private Optional clientIdMetadataDocumentDynamicRegistrationSupported = Optional.empty(); + private Optional enableAiGuide = Optional.empty(); private Optional phoneConsolidatedExperience = Optional.empty(); @@ -921,6 +989,7 @@ public Builder from(UpdateTenantSettingsRequestContent other) { legacySandboxVersion(other.getLegacySandboxVersion()); defaultRedirectionUri(other.getDefaultRedirectionUri()); enabledLocales(other.getEnabledLocales()); + accessToken(other.getAccessToken()); securityHeaders(other.getSecurityHeaders()); sessionCookie(other.getSessionCookie()); sessions(other.getSessions()); @@ -931,9 +1000,12 @@ public Builder from(UpdateTenantSettingsRequestContent other) { mtls(other.getMtls()); pushedAuthorizationRequestsSupported(other.getPushedAuthorizationRequestsSupported()); authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); + dpopStrictRefreshTokenBinding(other.getDpopStrictRefreshTokenBinding()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); resourceParameterProfile(other.getResourceParameterProfile()); clientIdMetadataDocumentSupported(other.getClientIdMetadataDocumentSupported()); + clientIdMetadataDocumentDynamicRegistrationSupported( + other.getClientIdMetadataDocumentDynamicRegistrationSupported()); enableAiGuide(other.getEnableAiGuide()); phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); includeSessionMetadataInTenantLogs(other.getIncludeSessionMetadataInTenantLogs()); @@ -1378,6 +1450,37 @@ public Builder enabledLocales(List enabledLo return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "security_headers", nulls = Nulls.SKIP) public Builder securityHeaders( @Nullable OptionalNullable securityHeaders) { @@ -1703,6 +1806,42 @@ public Builder authorizationResponseIssParameterSupported( return this; } + /** + *

                                                              Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility.

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

                                                              Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. @@ -1772,6 +1911,24 @@ public Builder clientIdMetadataDocumentSupported(Boolean clientIdMetadataDocumen return this; } + /** + *

                                                              Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled.

                                                              + */ + @JsonSetter(value = "client_id_metadata_document_dynamic_registration_supported", nulls = Nulls.SKIP) + public Builder clientIdMetadataDocumentDynamicRegistrationSupported( + Optional clientIdMetadataDocumentDynamicRegistrationSupported) { + this.clientIdMetadataDocumentDynamicRegistrationSupported = + clientIdMetadataDocumentDynamicRegistrationSupported; + return this; + } + + public Builder clientIdMetadataDocumentDynamicRegistrationSupported( + Boolean clientIdMetadataDocumentDynamicRegistrationSupported) { + this.clientIdMetadataDocumentDynamicRegistrationSupported = + Optional.ofNullable(clientIdMetadataDocumentDynamicRegistrationSupported); + return this; + } + /** *

                                                              Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant.

                                                              */ @@ -1885,6 +2042,7 @@ public UpdateTenantSettingsRequestContent build() { legacySandboxVersion, defaultRedirectionUri, enabledLocales, + accessToken, securityHeaders, sessionCookie, sessions, @@ -1895,9 +2053,11 @@ public UpdateTenantSettingsRequestContent build() { mtls, pushedAuthorizationRequestsSupported, authorizationResponseIssParameterSupported, + dpopStrictRefreshTokenBinding, skipNonVerifiableCallbackUriConfirmationPrompt, resourceParameterProfile, clientIdMetadataDocumentSupported, + clientIdMetadataDocumentDynamicRegistrationSupported, enableAiGuide, phoneConsolidatedExperience, includeSessionMetadataInTenantLogs, diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java index 3a515f44..6a1200ed 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java @@ -119,7 +119,6 @@ public Builder from(ActionModuleDependencyRequest other) { } /** - *

                                                              The name of the npm dependency.

                                                              *

                                                              The name of the npm dependency.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,7 +130,6 @@ public VersionStage name(@NotNull String name) { } /** - *

                                                              The version of the npm dependency.

                                                              *

                                                              The version of the npm dependency.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java index cbb2155b..af5fefaf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java @@ -119,7 +119,6 @@ public Builder from(ActionModuleSecretRequest other) { } /** - *

                                                              The name of the secret.

                                                              *

                                                              The name of the secret.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,7 +130,6 @@ public ValueStage name(@NotNull String name) { } /** - *

                                                              The value of the secret.

                                                              *

                                                              The value of the secret.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java index a6ec9ab2..eb0b9553 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java @@ -121,7 +121,6 @@ public VersionStage id(@NotNull ActionTriggerTypeEnum id) { } /** - *

                                                              The version of a trigger. v1, v2, etc.

                                                              *

                                                              The version of a trigger. v1, v2, etc.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java index 9164ae0c..509431c6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerTypeEnum.java @@ -43,6 +43,9 @@ public final class ActionTriggerTypeEnum { public static final ActionTriggerTypeEnum SEND_PHONE_MESSAGE = new ActionTriggerTypeEnum(Value.SEND_PHONE_MESSAGE, "send-phone-message"); + public static final ActionTriggerTypeEnum POST_CREDENTIAL_VALIDATION = + new ActionTriggerTypeEnum(Value.POST_CREDENTIAL_VALIDATION, "post-credential-validation"); + public static final ActionTriggerTypeEnum EVENT_STREAM = new ActionTriggerTypeEnum(Value.EVENT_STREAM, "event-stream"); @@ -105,6 +108,8 @@ public T visit(Visitor visitor) { return visitor.visitPostChangePassword(); case SEND_PHONE_MESSAGE: return visitor.visitSendPhoneMessage(); + case POST_CREDENTIAL_VALIDATION: + return visitor.visitPostCredentialValidation(); case EVENT_STREAM: return visitor.visitEventStream(); case POST_LOGIN: @@ -142,6 +147,8 @@ public static ActionTriggerTypeEnum valueOf(String value) { return POST_CHANGE_PASSWORD; case "send-phone-message": return SEND_PHONE_MESSAGE; + case "post-credential-validation": + return POST_CREDENTIAL_VALIDATION; case "event-stream": return EVENT_STREAM; case "post-login": @@ -180,6 +187,8 @@ public enum Value { SIGNUP_POST_IDENTIFIER, + POST_CREDENTIAL_VALIDATION, + UNKNOWN } @@ -212,6 +221,8 @@ public interface Visitor { T visitSignupPostIdentifier(); + T visitPostCredentialValidation(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java b/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java index 1c87c51f..58604f8a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java @@ -98,7 +98,6 @@ public Builder from(AculClientFilterById other) { } /** - *

                                                              Client ID

                                                              *

                                                              Client ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java b/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java index ce1f1484..c584c48f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java @@ -10,6 +10,8 @@ public final class AculContextEnum { public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES = new AculContextEnum( Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES, "untrusted_data.authorization_params.ui_locales"); + public static final AculContextEnum COUNTRY_CODES = new AculContextEnum(Value.COUNTRY_CODES, "country_codes"); + public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT = new AculContextEnum( Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT, "untrusted_data.authorization_params.screen_hint"); @@ -90,6 +92,8 @@ public T visit(Visitor visitor) { switch (value) { case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES: return visitor.visitUntrustedDataAuthorizationParamsUiLocales(); + case COUNTRY_CODES: + return visitor.visitCountryCodes(); case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT: return visitor.visitUntrustedDataAuthorizationParamsScreenHint(); case TENANT_FRIENDLY_NAME: @@ -135,6 +139,8 @@ public static AculContextEnum valueOf(String value) { switch (value) { case "untrusted_data.authorization_params.ui_locales": return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES; + case "country_codes": + return COUNTRY_CODES; case "untrusted_data.authorization_params.screen_hint": return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT; case "tenant.friendly_name": @@ -179,6 +185,8 @@ public enum Value { BRANDING_THEMES_DEFAULT, + COUNTRY_CODES, + CLIENT_LOGO_URI, CLIENT_DESCRIPTION, @@ -219,6 +227,8 @@ public interface Visitor { T visitBrandingThemesDefault(); + T visitCountryCodes(); + T visitClientLogoUri(); T visitClientDescription(); diff --git a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java index 24a4981a..4deba79d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java @@ -98,7 +98,6 @@ public Builder from(AculDomainFilterById other) { } /** - *

                                                              Domain ID

                                                              *

                                                              Domain ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java index 99799dbb..7f94629d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java +++ b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java @@ -98,7 +98,6 @@ public Builder from(AculOrganizationFilterById other) { } /** - *

                                                              Organization ID

                                                              *

                                                              Organization ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AdvanceRampResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AdvanceRampResponseContent.java new file mode 100644 index 00000000..769abc26 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AdvanceRampResponseContent.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.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 = AdvanceRampResponseContent.Builder.class) +public final class AdvanceRampResponseContent { + private final String experimentId; + + private final int fromLevel; + + private final int toLevel; + + private final int currentLevel; + + private final Map additionalProperties; + + private AdvanceRampResponseContent( + String experimentId, + int fromLevel, + int toLevel, + int currentLevel, + Map additionalProperties) { + this.experimentId = experimentId; + this.fromLevel = fromLevel; + this.toLevel = toLevel; + this.currentLevel = currentLevel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("experiment_id") + public String getExperimentId() { + return experimentId; + } + + @JsonProperty("from_level") + public int getFromLevel() { + return fromLevel; + } + + @JsonProperty("to_level") + public int getToLevel() { + return toLevel; + } + + @JsonProperty("current_level") + public int getCurrentLevel() { + return currentLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AdvanceRampResponseContent && equalTo((AdvanceRampResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AdvanceRampResponseContent other) { + return experimentId.equals(other.experimentId) + && fromLevel == other.fromLevel + && toLevel == other.toLevel + && currentLevel == other.currentLevel; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.experimentId, this.fromLevel, this.toLevel, this.currentLevel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ExperimentIdStage builder() { + return new Builder(); + } + + public interface ExperimentIdStage { + FromLevelStage experimentId(@NotNull String experimentId); + + Builder from(AdvanceRampResponseContent other); + } + + public interface FromLevelStage { + ToLevelStage fromLevel(int fromLevel); + } + + public interface ToLevelStage { + CurrentLevelStage toLevel(int toLevel); + } + + public interface CurrentLevelStage { + _FinalStage currentLevel(int currentLevel); + } + + public interface _FinalStage { + AdvanceRampResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ExperimentIdStage, FromLevelStage, ToLevelStage, CurrentLevelStage, _FinalStage { + private String experimentId; + + private int fromLevel; + + private int toLevel; + + private int currentLevel; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AdvanceRampResponseContent other) { + experimentId(other.getExperimentId()); + fromLevel(other.getFromLevel()); + toLevel(other.getToLevel()); + currentLevel(other.getCurrentLevel()); + return this; + } + + @java.lang.Override + @JsonSetter("experiment_id") + public FromLevelStage experimentId(@NotNull String experimentId) { + this.experimentId = Objects.requireNonNull(experimentId, "experimentId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("from_level") + public ToLevelStage fromLevel(int fromLevel) { + this.fromLevel = fromLevel; + return this; + } + + @java.lang.Override + @JsonSetter("to_level") + public CurrentLevelStage toLevel(int toLevel) { + this.toLevel = toLevel; + return this; + } + + @java.lang.Override + @JsonSetter("current_level") + public _FinalStage currentLevel(int currentLevel) { + this.currentLevel = currentLevel; + return this; + } + + @java.lang.Override + public AdvanceRampResponseContent build() { + return new AdvanceRampResponseContent(experimentId, fromLevel, toLevel, currentLevel, 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/AgentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AgentResponseContent.java new file mode 100644 index 00000000..cfc17b35 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AgentResponseContent.java @@ -0,0 +1,324 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AgentResponseContent.Builder.class) +public final class AgentResponseContent { + private final String agentId; + + private final String name; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Optional externalAgentId; + + private final Map metadata; + + private final Map additionalProperties; + + private AgentResponseContent( + String agentId, + String name, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Optional externalAgentId, + Map metadata, + Map additionalProperties) { + this.agentId = agentId; + this.name = name; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.externalAgentId = externalAgentId; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The agent ID + */ + @JsonProperty("agent_id") + public String getAgentId() { + return agentId; + } + + /** + * @return The agent name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return When the agent was created + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return When the agent was last updated + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return External identifier for the agent, if set. Omitted when not set. + */ + @JsonProperty("external_agent_id") + public Optional getExternalAgentId() { + return externalAgentId; + } + + @JsonProperty("metadata") + public Map getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AgentResponseContent && equalTo((AgentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AgentResponseContent other) { + return agentId.equals(other.agentId) + && name.equals(other.name) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && externalAgentId.equals(other.externalAgentId) + && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentId, this.name, this.createdAt, this.updatedAt, this.externalAgentId, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AgentIdStage builder() { + return new Builder(); + } + + public interface AgentIdStage { + /** + *

                                                              The agent ID

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

                                                              The agent name

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

                                                              When the agent was created

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

                                                              When the agent was last updated

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + AgentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              External identifier for the agent, if set. Omitted when not set.

                                                              + */ + _FinalStage externalAgentId(Optional externalAgentId); + + _FinalStage externalAgentId(String externalAgentId); + + _FinalStage metadata(Map metadata); + + _FinalStage putAllMetadata(Map metadata); + + _FinalStage metadata(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AgentIdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String agentId; + + private String name; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Map metadata = new LinkedHashMap<>(); + + private Optional externalAgentId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AgentResponseContent other) { + agentId(other.getAgentId()); + name(other.getName()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + externalAgentId(other.getExternalAgentId()); + metadata(other.getMetadata()); + return this; + } + + /** + *

                                                              The agent ID

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

                                                              The agent name

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

                                                              When the agent 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 OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

                                                              When the agent 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 OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage metadata(String key, Object value) { + this.metadata.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllMetadata(Map metadata) { + if (metadata != null) { + this.metadata.putAll(metadata); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Map metadata) { + this.metadata.clear(); + if (metadata != null) { + this.metadata.putAll(metadata); + } + return this; + } + + /** + *

                                                              External identifier for the agent, if set. Omitted when not set.

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

                                                              External identifier for the agent, if set. Omitted when not set.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_agent_id", nulls = Nulls.SKIP) + public _FinalStage externalAgentId(Optional externalAgentId) { + this.externalAgentId = externalAgentId; + return this; + } + + @java.lang.Override + public AgentResponseContent build() { + return new AgentResponseContent( + agentId, name, createdAt, updatedAt, externalAgentId, metadata, 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/AllocationItem.java b/src/main/java/com/auth0/client/mgmt/types/AllocationItem.java new file mode 100644 index 00000000..eb24e677 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AllocationItem.java @@ -0,0 +1,407 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AllocationItem.Builder.class) +public final class AllocationItem { + private final Optional variationId; + + private final Optional variationName; + + private final Optional segmentId; + + private final Optional segmentName; + + private final Optional weight; + + private final Optional priority; + + private final Optional isControl; + + private final Optional isFallback; + + private final OptionalNullable> variationSnapshot; + + private final OptionalNullable> segmentSnapshot; + + private final Map additionalProperties; + + private AllocationItem( + Optional variationId, + Optional variationName, + Optional segmentId, + Optional segmentName, + Optional weight, + Optional priority, + Optional isControl, + Optional isFallback, + OptionalNullable> variationSnapshot, + OptionalNullable> segmentSnapshot, + Map additionalProperties) { + this.variationId = variationId; + this.variationName = variationName; + this.segmentId = segmentId; + this.segmentName = segmentName; + this.weight = weight; + this.priority = priority; + this.isControl = isControl; + this.isFallback = isFallback; + this.variationSnapshot = variationSnapshot; + this.segmentSnapshot = segmentSnapshot; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("variation_id") + public Optional getVariationId() { + return variationId; + } + + @JsonProperty("variation_name") + public Optional getVariationName() { + return variationName; + } + + @JsonProperty("segment_id") + public Optional getSegmentId() { + return segmentId; + } + + @JsonProperty("segment_name") + public Optional getSegmentName() { + return segmentName; + } + + @JsonProperty("weight") + public Optional getWeight() { + return weight; + } + + @JsonProperty("priority") + public Optional getPriority() { + return priority; + } + + @JsonProperty("is_control") + public Optional getIsControl() { + return isControl; + } + + @JsonProperty("is_fallback") + public Optional getIsFallback() { + return isFallback; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("variation_snapshot") + public OptionalNullable> getVariationSnapshot() { + if (variationSnapshot == null) { + return OptionalNullable.absent(); + } + return variationSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("segment_snapshot") + public OptionalNullable> getSegmentSnapshot() { + if (segmentSnapshot == null) { + return OptionalNullable.absent(); + } + return segmentSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("variation_snapshot") + private OptionalNullable> _getVariationSnapshot() { + return variationSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("segment_snapshot") + private OptionalNullable> _getSegmentSnapshot() { + return segmentSnapshot; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AllocationItem && equalTo((AllocationItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AllocationItem other) { + return variationId.equals(other.variationId) + && variationName.equals(other.variationName) + && segmentId.equals(other.segmentId) + && segmentName.equals(other.segmentName) + && weight.equals(other.weight) + && priority.equals(other.priority) + && isControl.equals(other.isControl) + && isFallback.equals(other.isFallback) + && variationSnapshot.equals(other.variationSnapshot) + && segmentSnapshot.equals(other.segmentSnapshot); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.variationId, + this.variationName, + this.segmentId, + this.segmentName, + this.weight, + this.priority, + this.isControl, + this.isFallback, + this.variationSnapshot, + this.segmentSnapshot); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional variationId = Optional.empty(); + + private Optional variationName = Optional.empty(); + + private Optional segmentId = Optional.empty(); + + private Optional segmentName = Optional.empty(); + + private Optional weight = Optional.empty(); + + private Optional priority = Optional.empty(); + + private Optional isControl = Optional.empty(); + + private Optional isFallback = Optional.empty(); + + private OptionalNullable> variationSnapshot = OptionalNullable.absent(); + + private OptionalNullable> segmentSnapshot = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(AllocationItem other) { + variationId(other.getVariationId()); + variationName(other.getVariationName()); + segmentId(other.getSegmentId()); + segmentName(other.getSegmentName()); + weight(other.getWeight()); + priority(other.getPriority()); + isControl(other.getIsControl()); + isFallback(other.getIsFallback()); + variationSnapshot(other.getVariationSnapshot()); + segmentSnapshot(other.getSegmentSnapshot()); + return this; + } + + @JsonSetter(value = "variation_id", nulls = Nulls.SKIP) + public Builder variationId(Optional variationId) { + this.variationId = variationId; + return this; + } + + public Builder variationId(String variationId) { + this.variationId = Optional.ofNullable(variationId); + return this; + } + + @JsonSetter(value = "variation_name", nulls = Nulls.SKIP) + public Builder variationName(Optional variationName) { + this.variationName = variationName; + return this; + } + + public Builder variationName(String variationName) { + this.variationName = Optional.ofNullable(variationName); + return this; + } + + @JsonSetter(value = "segment_id", nulls = Nulls.SKIP) + public Builder segmentId(Optional segmentId) { + this.segmentId = segmentId; + return this; + } + + public Builder segmentId(String segmentId) { + this.segmentId = Optional.ofNullable(segmentId); + return this; + } + + @JsonSetter(value = "segment_name", nulls = Nulls.SKIP) + public Builder segmentName(Optional segmentName) { + this.segmentName = segmentName; + return this; + } + + public Builder segmentName(String segmentName) { + this.segmentName = Optional.ofNullable(segmentName); + return this; + } + + @JsonSetter(value = "weight", nulls = Nulls.SKIP) + public Builder weight(Optional weight) { + this.weight = weight; + return this; + } + + public Builder weight(Integer weight) { + this.weight = Optional.ofNullable(weight); + return this; + } + + @JsonSetter(value = "priority", nulls = Nulls.SKIP) + public Builder priority(Optional priority) { + this.priority = priority; + return this; + } + + public Builder priority(Integer priority) { + this.priority = Optional.ofNullable(priority); + return this; + } + + @JsonSetter(value = "is_control", nulls = Nulls.SKIP) + public Builder isControl(Optional isControl) { + this.isControl = isControl; + return this; + } + + public Builder isControl(Boolean isControl) { + this.isControl = Optional.ofNullable(isControl); + return this; + } + + @JsonSetter(value = "is_fallback", nulls = Nulls.SKIP) + public Builder isFallback(Optional isFallback) { + this.isFallback = isFallback; + return this; + } + + public Builder isFallback(Boolean isFallback) { + this.isFallback = Optional.ofNullable(isFallback); + return this; + } + + @JsonSetter(value = "variation_snapshot", nulls = Nulls.SKIP) + public Builder variationSnapshot(@Nullable OptionalNullable> variationSnapshot) { + this.variationSnapshot = variationSnapshot; + return this; + } + + public Builder variationSnapshot(Map variationSnapshot) { + this.variationSnapshot = OptionalNullable.of(variationSnapshot); + return this; + } + + public Builder variationSnapshot(Optional> variationSnapshot) { + if (variationSnapshot.isPresent()) { + this.variationSnapshot = OptionalNullable.of(variationSnapshot.get()); + } else { + this.variationSnapshot = OptionalNullable.absent(); + } + return this; + } + + public Builder variationSnapshot(com.auth0.client.mgmt.core.Nullable> variationSnapshot) { + if (variationSnapshot.isNull()) { + this.variationSnapshot = OptionalNullable.ofNull(); + } else if (variationSnapshot.isEmpty()) { + this.variationSnapshot = OptionalNullable.absent(); + } else { + this.variationSnapshot = OptionalNullable.of(variationSnapshot.get()); + } + return this; + } + + @JsonSetter(value = "segment_snapshot", nulls = Nulls.SKIP) + public Builder segmentSnapshot(@Nullable OptionalNullable> segmentSnapshot) { + this.segmentSnapshot = segmentSnapshot; + return this; + } + + public Builder segmentSnapshot(Map segmentSnapshot) { + this.segmentSnapshot = OptionalNullable.of(segmentSnapshot); + return this; + } + + public Builder segmentSnapshot(Optional> segmentSnapshot) { + if (segmentSnapshot.isPresent()) { + this.segmentSnapshot = OptionalNullable.of(segmentSnapshot.get()); + } else { + this.segmentSnapshot = OptionalNullable.absent(); + } + return this; + } + + public Builder segmentSnapshot(com.auth0.client.mgmt.core.Nullable> segmentSnapshot) { + if (segmentSnapshot.isNull()) { + this.segmentSnapshot = OptionalNullable.ofNull(); + } else if (segmentSnapshot.isEmpty()) { + this.segmentSnapshot = OptionalNullable.absent(); + } else { + this.segmentSnapshot = OptionalNullable.of(segmentSnapshot.get()); + } + return this; + } + + public AllocationItem build() { + return new AllocationItem( + variationId, + variationName, + segmentId, + segmentName, + weight, + priority, + isControl, + isFallback, + variationSnapshot, + segmentSnapshot, + 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/AllocationRequestItem.java b/src/main/java/com/auth0/client/mgmt/types/AllocationRequestItem.java new file mode 100644 index 00000000..519172e8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AllocationRequestItem.java @@ -0,0 +1,340 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AllocationRequestItem.Builder.class) +public final class AllocationRequestItem { + private final String variationId; + + private final Optional weight; + + private final Optional segmentId; + + private final Optional priority; + + private final boolean isControl; + + private final Optional isFallback; + + private final Map additionalProperties; + + private AllocationRequestItem( + String variationId, + Optional weight, + Optional segmentId, + Optional priority, + boolean isControl, + Optional isFallback, + Map additionalProperties) { + this.variationId = variationId; + this.weight = weight; + this.segmentId = segmentId; + this.priority = priority; + this.isControl = isControl; + this.isFallback = isFallback; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the variation to allocate + */ + @JsonProperty("variation_id") + public String getVariationId() { + return variationId; + } + + /** + * @return Percentage weight for this allocation (percentage strategy only) + */ + @JsonProperty("weight") + public Optional getWeight() { + return weight; + } + + /** + * @return The segment this allocation targets (segment strategy only) + */ + @JsonProperty("segment_id") + public Optional getSegmentId() { + return segmentId; + } + + /** + * @return Evaluation order; 1 = highest priority (segment strategy only) + */ + @JsonProperty("priority") + public Optional getPriority() { + return priority; + } + + /** + * @return Whether this allocation is the control group + */ + @JsonProperty("is_control") + public boolean getIsControl() { + return isControl; + } + + /** + * @return Whether this allocation is the default fallback (segment strategy only) + */ + @JsonProperty("is_fallback") + public Optional getIsFallback() { + return isFallback; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AllocationRequestItem && equalTo((AllocationRequestItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AllocationRequestItem other) { + return variationId.equals(other.variationId) + && weight.equals(other.weight) + && segmentId.equals(other.segmentId) + && priority.equals(other.priority) + && isControl == other.isControl + && isFallback.equals(other.isFallback); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.variationId, this.weight, this.segmentId, this.priority, this.isControl, this.isFallback); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static VariationIdStage builder() { + return new Builder(); + } + + public interface VariationIdStage { + /** + *

                                                              The ID of the variation to allocate

                                                              + */ + IsControlStage variationId(@NotNull String variationId); + + Builder from(AllocationRequestItem other); + } + + public interface IsControlStage { + /** + *

                                                              Whether this allocation is the control group

                                                              + */ + _FinalStage isControl(boolean isControl); + } + + public interface _FinalStage { + AllocationRequestItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Percentage weight for this allocation (percentage strategy only)

                                                              + */ + _FinalStage weight(Optional weight); + + _FinalStage weight(Integer weight); + + /** + *

                                                              The segment this allocation targets (segment strategy only)

                                                              + */ + _FinalStage segmentId(Optional segmentId); + + _FinalStage segmentId(String segmentId); + + /** + *

                                                              Evaluation order; 1 = highest priority (segment strategy only)

                                                              + */ + _FinalStage priority(Optional priority); + + _FinalStage priority(Integer priority); + + /** + *

                                                              Whether this allocation is the default fallback (segment strategy only)

                                                              + */ + _FinalStage isFallback(Optional isFallback); + + _FinalStage isFallback(Boolean isFallback); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements VariationIdStage, IsControlStage, _FinalStage { + private String variationId; + + private boolean isControl; + + private Optional isFallback = Optional.empty(); + + private Optional priority = Optional.empty(); + + private Optional segmentId = Optional.empty(); + + private Optional weight = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AllocationRequestItem other) { + variationId(other.getVariationId()); + weight(other.getWeight()); + segmentId(other.getSegmentId()); + priority(other.getPriority()); + isControl(other.getIsControl()); + isFallback(other.getIsFallback()); + return this; + } + + /** + *

                                                              The ID of the variation to allocate

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

                                                              Whether this allocation is the control group

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_control") + public _FinalStage isControl(boolean isControl) { + this.isControl = isControl; + return this; + } + + /** + *

                                                              Whether this allocation is the default fallback (segment strategy only)

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

                                                              Whether this allocation is the default fallback (segment strategy only)

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

                                                              Evaluation order; 1 = highest priority (segment strategy only)

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

                                                              Evaluation order; 1 = highest priority (segment strategy only)

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

                                                              The segment this allocation targets (segment strategy only)

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

                                                              The segment this allocation targets (segment strategy only)

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

                                                              Percentage weight for this allocation (percentage strategy only)

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

                                                              Percentage weight for this allocation (percentage strategy only)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "weight", nulls = Nulls.SKIP) + public _FinalStage weight(Optional weight) { + this.weight = weight; + return this; + } + + @java.lang.Override + public AllocationRequestItem build() { + return new AllocationRequestItem( + variationId, weight, segmentId, priority, isControl, isFallback, 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/AllocationStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/AllocationStrategyEnum.java new file mode 100644 index 00000000..b984d63d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AllocationStrategyEnum.java @@ -0,0 +1,84 @@ +/** + * 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 AllocationStrategyEnum { + public static final AllocationStrategyEnum SEGMENT = new AllocationStrategyEnum(Value.SEGMENT, "segment"); + + public static final AllocationStrategyEnum PERCENTAGE = new AllocationStrategyEnum(Value.PERCENTAGE, "percentage"); + + private final Value value; + + private final String string; + + AllocationStrategyEnum(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 AllocationStrategyEnum + && this.string.equals(((AllocationStrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SEGMENT: + return visitor.visitSegment(); + case PERCENTAGE: + return visitor.visitPercentage(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static AllocationStrategyEnum valueOf(String value) { + switch (value) { + case "segment": + return SEGMENT; + case "percentage": + return PERCENTAGE; + default: + return new AllocationStrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PERCENTAGE, + + SEGMENT, + + UNKNOWN + } + + public interface Visitor { + T visitPercentage(); + + T visitSegment(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/AnonymousSessions.java b/src/main/java/com/auth0/client/mgmt/types/AnonymousSessions.java new file mode 100644 index 00000000..74a13666 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AnonymousSessions.java @@ -0,0 +1,127 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AnonymousSessions.Builder.class) +public final class AnonymousSessions { + private final boolean active; + + private final Map additionalProperties; + + private AnonymousSessions(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return If set to true, this client is allowed to create anonymous sessions. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AnonymousSessions && equalTo((AnonymousSessions) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AnonymousSessions other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              If set to true, this client is allowed to create anonymous sessions.

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

                                                              If set to true, this client is allowed to create anonymous sessions.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public AnonymousSessions build() { + return new AnonymousSessions(active, 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/AsyncApprovalNotificationsChannelsEnum.java b/src/main/java/com/auth0/client/mgmt/types/AsyncApprovalNotificationsChannelsEnum.java index 84d74919..00512612 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AsyncApprovalNotificationsChannelsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/AsyncApprovalNotificationsChannelsEnum.java @@ -10,6 +10,9 @@ public final class AsyncApprovalNotificationsChannelsEnum { public static final AsyncApprovalNotificationsChannelsEnum EMAIL = new AsyncApprovalNotificationsChannelsEnum(Value.EMAIL, "email"); + public static final AsyncApprovalNotificationsChannelsEnum MY_ACCOUNT = + new AsyncApprovalNotificationsChannelsEnum(Value.MY_ACCOUNT, "my-account"); + public static final AsyncApprovalNotificationsChannelsEnum GUARDIAN_PUSH = new AsyncApprovalNotificationsChannelsEnum(Value.GUARDIAN_PUSH, "guardian-push"); @@ -48,6 +51,8 @@ public T visit(Visitor visitor) { switch (value) { case EMAIL: return visitor.visitEmail(); + case MY_ACCOUNT: + return visitor.visitMyAccount(); case GUARDIAN_PUSH: return visitor.visitGuardianPush(); case UNKNOWN: @@ -61,6 +66,8 @@ public static AsyncApprovalNotificationsChannelsEnum valueOf(String value) { switch (value) { case "email": return EMAIL; + case "my-account": + return MY_ACCOUNT; case "guardian-push": return GUARDIAN_PUSH; default: @@ -73,6 +80,8 @@ public enum Value { EMAIL, + MY_ACCOUNT, + UNKNOWN } @@ -81,6 +90,8 @@ public interface Visitor { T visitEmail(); + T visitMyAccount(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java index d3a28c44..57cb99eb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java @@ -98,7 +98,6 @@ public Builder from(AttackProtectionCaptchaAuthChallengeRequest other) { } /** - *

                                                              Whether the auth challenge should fail open.

                                                              *

                                                              Whether the auth challenge should fail open.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java index 1182984b..57a3f0d9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java @@ -195,7 +195,6 @@ public Builder from(AttackProtectionUpdateCaptchaArkose other) { } /** - *

                                                              The site key for the Arkose captcha provider.

                                                              *

                                                              The site key for the Arkose captcha provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -207,7 +206,6 @@ public SecretStage siteKey(@NotNull String siteKey) { } /** - *

                                                              The secret key for the Arkose captcha provider.

                                                              *

                                                              The secret key for the Arkose captcha provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java index 7d7fd077..ad51758e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java @@ -121,7 +121,6 @@ public Builder from(AttackProtectionUpdateCaptchaFriendlyCaptcha other) { } /** - *

                                                              The site key for the Friendly Captcha provider.

                                                              *

                                                              The site key for the Friendly Captcha provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public SecretStage siteKey(@NotNull String siteKey) { } /** - *

                                                              The secret key for the Friendly Captcha provider.

                                                              *

                                                              The secret key for the Friendly Captcha provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java index 6861b8d9..5234ffdb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java @@ -121,7 +121,6 @@ public Builder from(AttackProtectionUpdateCaptchaHcaptcha other) { } /** - *

                                                              The site key for the hCaptcha provider.

                                                              *

                                                              The site key for the hCaptcha provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public SecretStage siteKey(@NotNull String siteKey) { } /** - *

                                                              The secret key for the hCaptcha provider.

                                                              *

                                                              The secret key for the hCaptcha provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java index 474b142c..a3470f32 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java @@ -142,7 +142,6 @@ public Builder from(AttackProtectionUpdateCaptchaRecaptchaEnterprise other) { } /** - *

                                                              The site key for the reCAPTCHA Enterprise provider.

                                                              *

                                                              The site key for the reCAPTCHA Enterprise provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -154,7 +153,6 @@ public ApiKeyStage siteKey(@NotNull String siteKey) { } /** - *

                                                              The API key for the reCAPTCHA Enterprise provider.

                                                              *

                                                              The API key for the reCAPTCHA Enterprise provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -166,7 +164,6 @@ public ProjectIdStage apiKey(@NotNull String apiKey) { } /** - *

                                                              The project ID for the reCAPTCHA Enterprise provider.

                                                              *

                                                              The project ID for the reCAPTCHA Enterprise provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java index d440676b..59ff4d02 100644 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java +++ b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java @@ -121,7 +121,6 @@ public Builder from(AttackProtectionUpdateCaptchaRecaptchaV2 other) { } /** - *

                                                              The site key for the reCAPTCHA v2 provider.

                                                              *

                                                              The site key for the reCAPTCHA v2 provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public SecretStage siteKey(@NotNull String siteKey) { } /** - *

                                                              The secret key for the reCAPTCHA v2 provider.

                                                              *

                                                              The secret key for the reCAPTCHA v2 provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/AuthenticationFlowEnum.java b/src/main/java/com/auth0/client/mgmt/types/AuthenticationFlowEnum.java new file mode 100644 index 00000000..cb876e2e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/AuthenticationFlowEnum.java @@ -0,0 +1,129 @@ +/** + * 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 AuthenticationFlowEnum { + public static final AuthenticationFlowEnum AUTHENTICATION = + new AuthenticationFlowEnum(Value.AUTHENTICATION, "authentication"); + + public static final AuthenticationFlowEnum PASSKEY_ENROLLMENT = + new AuthenticationFlowEnum(Value.PASSKEY_ENROLLMENT, "passkey_enrollment"); + + public static final AuthenticationFlowEnum ALL = new AuthenticationFlowEnum(Value.ALL, "all"); + + public static final AuthenticationFlowEnum MFA_CHALLENGE = + new AuthenticationFlowEnum(Value.MFA_CHALLENGE, "mfa_challenge"); + + public static final AuthenticationFlowEnum MFA_ENROLLMENT = + new AuthenticationFlowEnum(Value.MFA_ENROLLMENT, "mfa_enrollment"); + + public static final AuthenticationFlowEnum PASSWORD_RESET = + new AuthenticationFlowEnum(Value.PASSWORD_RESET, "password_reset"); + + private final Value value; + + private final String string; + + AuthenticationFlowEnum(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 AuthenticationFlowEnum + && this.string.equals(((AuthenticationFlowEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTHENTICATION: + return visitor.visitAuthentication(); + case PASSKEY_ENROLLMENT: + return visitor.visitPasskeyEnrollment(); + case ALL: + return visitor.visitAll(); + case MFA_CHALLENGE: + return visitor.visitMfaChallenge(); + case MFA_ENROLLMENT: + return visitor.visitMfaEnrollment(); + case PASSWORD_RESET: + return visitor.visitPasswordReset(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static AuthenticationFlowEnum valueOf(String value) { + switch (value) { + case "authentication": + return AUTHENTICATION; + case "passkey_enrollment": + return PASSKEY_ENROLLMENT; + case "all": + return ALL; + case "mfa_challenge": + return MFA_CHALLENGE; + case "mfa_enrollment": + return MFA_ENROLLMENT; + case "password_reset": + return PASSWORD_RESET; + default: + return new AuthenticationFlowEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AUTHENTICATION, + + MFA_ENROLLMENT, + + MFA_CHALLENGE, + + PASSWORD_RESET, + + PASSKEY_ENROLLMENT, + + ALL, + + UNKNOWN + } + + public interface Visitor { + T visitAuthentication(); + + T visitMfaEnrollment(); + + T visitMfaChallenge(); + + T visitPasswordReset(); + + T visitPasskeyEnrollment(); + + T visitAll(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfiguration.java new file mode 100644 index 00000000..7ffadc64 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfiguration.java @@ -0,0 +1,137 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = B2BIntegrationConfiguration.Builder.class) +public final class B2BIntegrationConfiguration { + private final Optional> ssoProfiles; + + private final Optional integrationType; + + private final Map additionalProperties; + + private B2BIntegrationConfiguration( + Optional> ssoProfiles, + Optional integrationType, + Map additionalProperties) { + this.ssoProfiles = ssoProfiles; + this.integrationType = integrationType; + this.additionalProperties = additionalProperties; + } + + /** + * @return List of SSO profile IDs linked to this B2B integration client. Maximum 1 entry. + */ + @JsonProperty("sso_profiles") + public Optional> getSsoProfiles() { + return ssoProfiles; + } + + @JsonProperty("integration_type") + public Optional getIntegrationType() { + return integrationType; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof B2BIntegrationConfiguration && equalTo((B2BIntegrationConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(B2BIntegrationConfiguration other) { + return ssoProfiles.equals(other.ssoProfiles) && integrationType.equals(other.integrationType); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.ssoProfiles, this.integrationType); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> ssoProfiles = Optional.empty(); + + private Optional integrationType = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(B2BIntegrationConfiguration other) { + ssoProfiles(other.getSsoProfiles()); + integrationType(other.getIntegrationType()); + return this; + } + + /** + *

                                                              List of SSO profile IDs linked to this B2B integration client. Maximum 1 entry.

                                                              + */ + @JsonSetter(value = "sso_profiles", nulls = Nulls.SKIP) + public Builder ssoProfiles(Optional> ssoProfiles) { + this.ssoProfiles = ssoProfiles; + return this; + } + + public Builder ssoProfiles(List ssoProfiles) { + this.ssoProfiles = Optional.ofNullable(ssoProfiles); + return this; + } + + @JsonSetter(value = "integration_type", nulls = Nulls.SKIP) + public Builder integrationType(Optional integrationType) { + this.integrationType = integrationType; + return this; + } + + public Builder integrationType(B2BIntegrationConfigurationIntegrationTypeEnum integrationType) { + this.integrationType = Optional.ofNullable(integrationType); + return this; + } + + public B2BIntegrationConfiguration build() { + return new B2BIntegrationConfiguration(ssoProfiles, integrationType, additionalProperties); + } + + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map additionalProperties) { + this.additionalProperties.putAll(additionalProperties); + return this; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfigurationIntegrationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfigurationIntegrationTypeEnum.java new file mode 100644 index 00000000..c276229b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/B2BIntegrationConfigurationIntegrationTypeEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class B2BIntegrationConfigurationIntegrationTypeEnum { + public static final B2BIntegrationConfigurationIntegrationTypeEnum CUSTOM_AUTH_SERVER = + new B2BIntegrationConfigurationIntegrationTypeEnum(Value.CUSTOM_AUTH_SERVER, "custom_auth_server"); + + public static final B2BIntegrationConfigurationIntegrationTypeEnum APPLICATION = + new B2BIntegrationConfigurationIntegrationTypeEnum(Value.APPLICATION, "application"); + + public static final B2BIntegrationConfigurationIntegrationTypeEnum THIRD_PARTY = + new B2BIntegrationConfigurationIntegrationTypeEnum(Value.THIRD_PARTY, "third_party"); + + private final Value value; + + private final String string; + + B2BIntegrationConfigurationIntegrationTypeEnum(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof B2BIntegrationConfigurationIntegrationTypeEnum + && this.string.equals(((B2BIntegrationConfigurationIntegrationTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM_AUTH_SERVER: + return visitor.visitCustomAuthServer(); + case APPLICATION: + return visitor.visitApplication(); + case THIRD_PARTY: + return visitor.visitThirdParty(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static B2BIntegrationConfigurationIntegrationTypeEnum valueOf(String value) { + switch (value) { + case "custom_auth_server": + return CUSTOM_AUTH_SERVER; + case "application": + return APPLICATION; + case "third_party": + return THIRD_PARTY; + default: + return new B2BIntegrationConfigurationIntegrationTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM_AUTH_SERVER, + + THIRD_PARTY, + + APPLICATION, + + UNKNOWN + } + + public interface Visitor { + T visitCustomAuthServer(); + + T visitThirdParty(); + + T visitApplication(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBorders.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBorders.java index 9fc5795e..a24458a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBorders.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBorders.java @@ -291,7 +291,6 @@ public Builder from(BrandingThemeBorders other) { } /** - *

                                                              Button border radius

                                                              *

                                                              Button border radius

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -303,7 +302,6 @@ public ButtonBorderWeightStage buttonBorderRadius(double buttonBorderRadius) { } /** - *

                                                              Button border weight

                                                              *

                                                              Button border weight

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -322,7 +320,6 @@ public InputBorderRadiusStage buttonsStyle(@NotNull BrandingThemeBordersButtonsS } /** - *

                                                              Input border radius

                                                              *

                                                              Input border radius

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -334,7 +331,6 @@ public InputBorderWeightStage inputBorderRadius(double inputBorderRadius) { } /** - *

                                                              Input border weight

                                                              *

                                                              Input border weight

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -353,7 +349,6 @@ public ShowWidgetShadowStage inputsStyle(@NotNull BrandingThemeBordersInputsStyl } /** - *

                                                              Show widget shadow

                                                              *

                                                              Show widget shadow

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -365,7 +360,6 @@ public WidgetBorderWeightStage showWidgetShadow(boolean showWidgetShadow) { } /** - *

                                                              Widget border weight

                                                              *

                                                              Widget border weight

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -377,7 +371,6 @@ public WidgetCornerRadiusStage widgetBorderWeight(double widgetBorderWeight) { } /** - *

                                                              Widget corner radius

                                                              *

                                                              Widget corner radius

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java index 5c0435ed..d0e8fd3e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java @@ -570,7 +570,6 @@ public Builder from(BrandingThemeColors other) { } /** - *

                                                              Body text

                                                              *

                                                              Body text

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -582,7 +581,6 @@ public ErrorStage bodyText(@NotNull String bodyText) { } /** - *

                                                              Error

                                                              *

                                                              Error

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -594,7 +592,6 @@ public HeaderStage error(@NotNull String error) { } /** - *

                                                              Header

                                                              *

                                                              Header

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -606,7 +603,6 @@ public IconsStage header(@NotNull String header) { } /** - *

                                                              Icons

                                                              *

                                                              Icons

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -618,7 +614,6 @@ public InputBackgroundStage icons(@NotNull String icons) { } /** - *

                                                              Input background

                                                              *

                                                              Input background

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -630,7 +625,6 @@ public InputBorderStage inputBackground(@NotNull String inputBackground) { } /** - *

                                                              Input border

                                                              *

                                                              Input border

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -642,7 +636,6 @@ public InputFilledTextStage inputBorder(@NotNull String inputBorder) { } /** - *

                                                              Input filled text

                                                              *

                                                              Input filled text

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -654,7 +647,6 @@ public InputLabelsPlaceholdersStage inputFilledText(@NotNull String inputFilledT } /** - *

                                                              Input labels & placeholders

                                                              *

                                                              Input labels & placeholders

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -667,7 +659,6 @@ public LinksFocusedComponentsStage inputLabelsPlaceholders(@NotNull String input } /** - *

                                                              Links & focused components

                                                              *

                                                              Links & focused components

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -680,7 +671,6 @@ public PrimaryButtonStage linksFocusedComponents(@NotNull String linksFocusedCom } /** - *

                                                              Primary button

                                                              *

                                                              Primary button

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -692,7 +682,6 @@ public PrimaryButtonLabelStage primaryButton(@NotNull String primaryButton) { } /** - *

                                                              Primary button label

                                                              *

                                                              Primary button label

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -704,7 +693,6 @@ public SecondaryButtonBorderStage primaryButtonLabel(@NotNull String primaryButt } /** - *

                                                              Secondary button border

                                                              *

                                                              Secondary button border

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -717,7 +705,6 @@ public SecondaryButtonLabelStage secondaryButtonBorder(@NotNull String secondary } /** - *

                                                              Secondary button label

                                                              *

                                                              Secondary button label

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -730,7 +717,6 @@ public SuccessStage secondaryButtonLabel(@NotNull String secondaryButtonLabel) { } /** - *

                                                              Success

                                                              *

                                                              Success

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -742,7 +728,6 @@ public WidgetBackgroundStage success(@NotNull String success) { } /** - *

                                                              Widget background

                                                              *

                                                              Widget background

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -754,7 +739,6 @@ public WidgetBorderStage widgetBackground(@NotNull String widgetBackground) { } /** - *

                                                              Widget border

                                                              *

                                                              Widget border

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java index 7c99b687..6e9bb924 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java @@ -118,7 +118,6 @@ public Builder from(BrandingThemeFontBodyText other) { } /** - *

                                                              Body text bold

                                                              *

                                                              Body text bold

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,7 +129,6 @@ public SizeStage bold(boolean bold) { } /** - *

                                                              Body text size

                                                              *

                                                              Body text size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java index 48db81fa..f8cac7e0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java @@ -118,7 +118,6 @@ public Builder from(BrandingThemeFontButtonsText other) { } /** - *

                                                              Buttons text bold

                                                              *

                                                              Buttons text bold

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,7 +129,6 @@ public SizeStage bold(boolean bold) { } /** - *

                                                              Buttons text size

                                                              *

                                                              Buttons text size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java index 7e806c53..79a3ad5a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java @@ -118,7 +118,6 @@ public Builder from(BrandingThemeFontInputLabels other) { } /** - *

                                                              Input Labels bold

                                                              *

                                                              Input Labels bold

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,7 +129,6 @@ public SizeStage bold(boolean bold) { } /** - *

                                                              Input Labels size

                                                              *

                                                              Input Labels size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java index 3e627361..ddab6cf9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java @@ -118,7 +118,6 @@ public Builder from(BrandingThemeFontLinks other) { } /** - *

                                                              Links bold

                                                              *

                                                              Links bold

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,7 +129,6 @@ public SizeStage bold(boolean bold) { } /** - *

                                                              Links size

                                                              *

                                                              Links size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java index f1542e13..395d6526 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java @@ -118,7 +118,6 @@ public Builder from(BrandingThemeFontSubtitle other) { } /** - *

                                                              Subtitle bold

                                                              *

                                                              Subtitle bold

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,7 +129,6 @@ public SizeStage bold(boolean bold) { } /** - *

                                                              Subtitle size

                                                              *

                                                              Subtitle size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java index 095582ee..dfd809a5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java @@ -118,7 +118,6 @@ public Builder from(BrandingThemeFontTitle other) { } /** - *

                                                              Title bold

                                                              *

                                                              Title bold

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,7 +129,6 @@ public SizeStage bold(boolean bold) { } /** - *

                                                              Title size

                                                              *

                                                              Title size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java index d04e9b32..f9cca67f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java @@ -275,7 +275,6 @@ public FontUrlStage buttonsText(@NotNull BrandingThemeFontButtonsText buttonsTex } /** - *

                                                              Font URL

                                                              *

                                                              Font URL

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -308,7 +307,6 @@ public ReferenceTextSizeStage linksStyle(@NotNull BrandingThemeFontLinksStyleEnu } /** - *

                                                              Reference text size

                                                              *

                                                              Reference text size

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiers.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiers.java new file mode 100644 index 00000000..a6520b39 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiers.java @@ -0,0 +1,179 @@ +/** + * 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 = BrandingThemeIdentifiers.Builder.class) +public final class BrandingThemeIdentifiers { + private final BrandingThemeIdentifiersLoginDisplayEnum loginDisplay; + + private final boolean otpAutocomplete; + + private final BrandingThemeIdentifiersPhoneDisplay phoneDisplay; + + private final Map additionalProperties; + + private BrandingThemeIdentifiers( + BrandingThemeIdentifiersLoginDisplayEnum loginDisplay, + boolean otpAutocomplete, + BrandingThemeIdentifiersPhoneDisplay phoneDisplay, + Map additionalProperties) { + this.loginDisplay = loginDisplay; + this.otpAutocomplete = otpAutocomplete; + this.phoneDisplay = phoneDisplay; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("login_display") + public BrandingThemeIdentifiersLoginDisplayEnum getLoginDisplay() { + return loginDisplay; + } + + /** + * @return OTP autocomplete + */ + @JsonProperty("otp_autocomplete") + public boolean getOtpAutocomplete() { + return otpAutocomplete; + } + + @JsonProperty("phone_display") + public BrandingThemeIdentifiersPhoneDisplay getPhoneDisplay() { + return phoneDisplay; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BrandingThemeIdentifiers && equalTo((BrandingThemeIdentifiers) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(BrandingThemeIdentifiers other) { + return loginDisplay.equals(other.loginDisplay) + && otpAutocomplete == other.otpAutocomplete + && phoneDisplay.equals(other.phoneDisplay); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.loginDisplay, this.otpAutocomplete, this.phoneDisplay); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LoginDisplayStage builder() { + return new Builder(); + } + + public interface LoginDisplayStage { + OtpAutocompleteStage loginDisplay(@NotNull BrandingThemeIdentifiersLoginDisplayEnum loginDisplay); + + Builder from(BrandingThemeIdentifiers other); + } + + public interface OtpAutocompleteStage { + /** + *

                                                              OTP autocomplete

                                                              + */ + PhoneDisplayStage otpAutocomplete(boolean otpAutocomplete); + } + + public interface PhoneDisplayStage { + _FinalStage phoneDisplay(@NotNull BrandingThemeIdentifiersPhoneDisplay phoneDisplay); + } + + public interface _FinalStage { + BrandingThemeIdentifiers build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements LoginDisplayStage, OtpAutocompleteStage, PhoneDisplayStage, _FinalStage { + private BrandingThemeIdentifiersLoginDisplayEnum loginDisplay; + + private boolean otpAutocomplete; + + private BrandingThemeIdentifiersPhoneDisplay phoneDisplay; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(BrandingThemeIdentifiers other) { + loginDisplay(other.getLoginDisplay()); + otpAutocomplete(other.getOtpAutocomplete()); + phoneDisplay(other.getPhoneDisplay()); + return this; + } + + @java.lang.Override + @JsonSetter("login_display") + public OtpAutocompleteStage loginDisplay(@NotNull BrandingThemeIdentifiersLoginDisplayEnum loginDisplay) { + this.loginDisplay = Objects.requireNonNull(loginDisplay, "loginDisplay must not be null"); + return this; + } + + /** + *

                                                              OTP autocomplete

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_autocomplete") + public PhoneDisplayStage otpAutocomplete(boolean otpAutocomplete) { + this.otpAutocomplete = otpAutocomplete; + return this; + } + + @java.lang.Override + @JsonSetter("phone_display") + public _FinalStage phoneDisplay(@NotNull BrandingThemeIdentifiersPhoneDisplay phoneDisplay) { + this.phoneDisplay = Objects.requireNonNull(phoneDisplay, "phoneDisplay must not be null"); + return this; + } + + @java.lang.Override + public BrandingThemeIdentifiers build() { + return new BrandingThemeIdentifiers(loginDisplay, otpAutocomplete, phoneDisplay, 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/BrandingThemeIdentifiersLoginDisplayEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersLoginDisplayEnum.java new file mode 100644 index 00000000..74d74b51 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersLoginDisplayEnum.java @@ -0,0 +1,86 @@ +/** + * 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 BrandingThemeIdentifiersLoginDisplayEnum { + public static final BrandingThemeIdentifiersLoginDisplayEnum SEPARATE = + new BrandingThemeIdentifiersLoginDisplayEnum(Value.SEPARATE, "separate"); + + public static final BrandingThemeIdentifiersLoginDisplayEnum UNIFIED = + new BrandingThemeIdentifiersLoginDisplayEnum(Value.UNIFIED, "unified"); + + private final Value value; + + private final String string; + + BrandingThemeIdentifiersLoginDisplayEnum(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 BrandingThemeIdentifiersLoginDisplayEnum + && this.string.equals(((BrandingThemeIdentifiersLoginDisplayEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SEPARATE: + return visitor.visitSeparate(); + case UNIFIED: + return visitor.visitUnified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BrandingThemeIdentifiersLoginDisplayEnum valueOf(String value) { + switch (value) { + case "separate": + return SEPARATE; + case "unified": + return UNIFIED; + default: + return new BrandingThemeIdentifiersLoginDisplayEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SEPARATE, + + UNIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitSeparate(); + + T visitUnified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplay.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplay.java new file mode 100644 index 00000000..2bc87b1f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplay.java @@ -0,0 +1,144 @@ +/** + * 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 = BrandingThemeIdentifiersPhoneDisplay.Builder.class) +public final class BrandingThemeIdentifiersPhoneDisplay { + private final BrandingThemeIdentifiersPhoneDisplayFormattingEnum formatting; + + private final BrandingThemeIdentifiersPhoneDisplayMaskingEnum masking; + + private final Map additionalProperties; + + private BrandingThemeIdentifiersPhoneDisplay( + BrandingThemeIdentifiersPhoneDisplayFormattingEnum formatting, + BrandingThemeIdentifiersPhoneDisplayMaskingEnum masking, + Map additionalProperties) { + this.formatting = formatting; + this.masking = masking; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("formatting") + public BrandingThemeIdentifiersPhoneDisplayFormattingEnum getFormatting() { + return formatting; + } + + @JsonProperty("masking") + public BrandingThemeIdentifiersPhoneDisplayMaskingEnum getMasking() { + return masking; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BrandingThemeIdentifiersPhoneDisplay + && equalTo((BrandingThemeIdentifiersPhoneDisplay) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(BrandingThemeIdentifiersPhoneDisplay other) { + return formatting.equals(other.formatting) && masking.equals(other.masking); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.formatting, this.masking); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static FormattingStage builder() { + return new Builder(); + } + + public interface FormattingStage { + MaskingStage formatting(@NotNull BrandingThemeIdentifiersPhoneDisplayFormattingEnum formatting); + + Builder from(BrandingThemeIdentifiersPhoneDisplay other); + } + + public interface MaskingStage { + _FinalStage masking(@NotNull BrandingThemeIdentifiersPhoneDisplayMaskingEnum masking); + } + + public interface _FinalStage { + BrandingThemeIdentifiersPhoneDisplay build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements FormattingStage, MaskingStage, _FinalStage { + private BrandingThemeIdentifiersPhoneDisplayFormattingEnum formatting; + + private BrandingThemeIdentifiersPhoneDisplayMaskingEnum masking; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(BrandingThemeIdentifiersPhoneDisplay other) { + formatting(other.getFormatting()); + masking(other.getMasking()); + return this; + } + + @java.lang.Override + @JsonSetter("formatting") + public MaskingStage formatting(@NotNull BrandingThemeIdentifiersPhoneDisplayFormattingEnum formatting) { + this.formatting = Objects.requireNonNull(formatting, "formatting must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("masking") + public _FinalStage masking(@NotNull BrandingThemeIdentifiersPhoneDisplayMaskingEnum masking) { + this.masking = Objects.requireNonNull(masking, "masking must not be null"); + return this; + } + + @java.lang.Override + public BrandingThemeIdentifiersPhoneDisplay build() { + return new BrandingThemeIdentifiersPhoneDisplay(formatting, masking, 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/BrandingThemeIdentifiersPhoneDisplayFormattingEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplayFormattingEnum.java new file mode 100644 index 00000000..7d69d61d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplayFormattingEnum.java @@ -0,0 +1,86 @@ +/** + * 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 BrandingThemeIdentifiersPhoneDisplayFormattingEnum { + public static final BrandingThemeIdentifiersPhoneDisplayFormattingEnum REGIONAL = + new BrandingThemeIdentifiersPhoneDisplayFormattingEnum(Value.REGIONAL, "regional"); + + public static final BrandingThemeIdentifiersPhoneDisplayFormattingEnum INTERNATIONAL = + new BrandingThemeIdentifiersPhoneDisplayFormattingEnum(Value.INTERNATIONAL, "international"); + + private final Value value; + + private final String string; + + BrandingThemeIdentifiersPhoneDisplayFormattingEnum(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 BrandingThemeIdentifiersPhoneDisplayFormattingEnum + && this.string.equals(((BrandingThemeIdentifiersPhoneDisplayFormattingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case REGIONAL: + return visitor.visitRegional(); + case INTERNATIONAL: + return visitor.visitInternational(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BrandingThemeIdentifiersPhoneDisplayFormattingEnum valueOf(String value) { + switch (value) { + case "regional": + return REGIONAL; + case "international": + return INTERNATIONAL; + default: + return new BrandingThemeIdentifiersPhoneDisplayFormattingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + INTERNATIONAL, + + REGIONAL, + + UNKNOWN + } + + public interface Visitor { + T visitInternational(); + + T visitRegional(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplayMaskingEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplayMaskingEnum.java new file mode 100644 index 00000000..c3f1a307 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeIdentifiersPhoneDisplayMaskingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class BrandingThemeIdentifiersPhoneDisplayMaskingEnum { + public static final BrandingThemeIdentifiersPhoneDisplayMaskingEnum SHOW_ALL = + new BrandingThemeIdentifiersPhoneDisplayMaskingEnum(Value.SHOW_ALL, "show_all"); + + public static final BrandingThemeIdentifiersPhoneDisplayMaskingEnum MASK_DIGITS = + new BrandingThemeIdentifiersPhoneDisplayMaskingEnum(Value.MASK_DIGITS, "mask_digits"); + + public static final BrandingThemeIdentifiersPhoneDisplayMaskingEnum HIDE_COUNTRY_CODE = + new BrandingThemeIdentifiersPhoneDisplayMaskingEnum(Value.HIDE_COUNTRY_CODE, "hide_country_code"); + + private final Value value; + + private final String string; + + BrandingThemeIdentifiersPhoneDisplayMaskingEnum(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 BrandingThemeIdentifiersPhoneDisplayMaskingEnum + && this.string.equals(((BrandingThemeIdentifiersPhoneDisplayMaskingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHOW_ALL: + return visitor.visitShowAll(); + case MASK_DIGITS: + return visitor.visitMaskDigits(); + case HIDE_COUNTRY_CODE: + return visitor.visitHideCountryCode(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BrandingThemeIdentifiersPhoneDisplayMaskingEnum valueOf(String value) { + switch (value) { + case "show_all": + return SHOW_ALL; + case "mask_digits": + return MASK_DIGITS; + case "hide_country_code": + return HIDE_COUNTRY_CODE; + default: + return new BrandingThemeIdentifiersPhoneDisplayMaskingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + HIDE_COUNTRY_CODE, + + MASK_DIGITS, + + SHOW_ALL, + + UNKNOWN + } + + public interface Visitor { + T visitHideCountryCode(); + + T visitMaskDigits(); + + T visitShowAll(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java index 3571687a..d8c1706c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java @@ -141,7 +141,6 @@ public Builder from(BrandingThemePageBackground other) { } /** - *

                                                              Background color

                                                              *

                                                              Background color

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -153,7 +152,6 @@ public BackgroundImageUrlStage backgroundColor(@NotNull String backgroundColor) } /** - *

                                                              Background image url

                                                              *

                                                              Background image url

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java index 3a8f1562..ae26522c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java +++ b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java @@ -190,7 +190,6 @@ public LogoHeightStage headerTextAlignment( } /** - *

                                                              Logo height

                                                              *

                                                              Logo height

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -209,7 +208,6 @@ public LogoUrlStage logoPosition(@NotNull BrandingThemeWidgetLogoPositionEnum lo } /** - *

                                                              Logo url

                                                              *

                                                              Logo url

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionFormSubmissionModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionFormSubmissionModeEnum.java new file mode 100644 index 00000000..ebd7e162 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionFormSubmissionModeEnum.java @@ -0,0 +1,86 @@ +/** + * 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 BruteForceProtectionFormSubmissionModeEnum { + public static final BruteForceProtectionFormSubmissionModeEnum AUTO = + new BruteForceProtectionFormSubmissionModeEnum(Value.AUTO, "auto"); + + public static final BruteForceProtectionFormSubmissionModeEnum MANUAL = + new BruteForceProtectionFormSubmissionModeEnum(Value.MANUAL, "manual"); + + private final Value value; + + private final String string; + + BruteForceProtectionFormSubmissionModeEnum(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 BruteForceProtectionFormSubmissionModeEnum + && this.string.equals(((BruteForceProtectionFormSubmissionModeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTO: + return visitor.visitAuto(); + case MANUAL: + return visitor.visitManual(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static BruteForceProtectionFormSubmissionModeEnum valueOf(String value) { + switch (value) { + case "auto": + return AUTO; + case "manual": + return MANUAL; + default: + return new BruteForceProtectionFormSubmissionModeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + MANUAL, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitManual(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketIdentity.java b/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketIdentity.java index e2290af6..0a4853d6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketIdentity.java +++ b/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketIdentity.java @@ -142,7 +142,6 @@ public Builder from(ChangePasswordTicketIdentity other) { } /** - *

                                                              user_id of the identity.

                                                              *

                                                              user_id of the identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java index cff27402..628d8c8b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java @@ -99,7 +99,6 @@ public Builder from(ChangePasswordTicketResponseContent other) { } /** - *

                                                              URL representing the ticket.

                                                              *

                                                              URL representing the ticket.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CimdExternalMetadataCreatedByEnum.java b/src/main/java/com/auth0/client/mgmt/types/CimdExternalMetadataCreatedByEnum.java new file mode 100644 index 00000000..0ea61b4f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CimdExternalMetadataCreatedByEnum.java @@ -0,0 +1,86 @@ +/** + * 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 CimdExternalMetadataCreatedByEnum { + public static final CimdExternalMetadataCreatedByEnum ADMIN = + new CimdExternalMetadataCreatedByEnum(Value.ADMIN, "admin"); + + public static final CimdExternalMetadataCreatedByEnum CLIENT = + new CimdExternalMetadataCreatedByEnum(Value.CLIENT, "client"); + + private final Value value; + + private final String string; + + CimdExternalMetadataCreatedByEnum(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 CimdExternalMetadataCreatedByEnum + && this.string.equals(((CimdExternalMetadataCreatedByEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADMIN: + return visitor.visitAdmin(); + case CLIENT: + return visitor.visitClient(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static CimdExternalMetadataCreatedByEnum valueOf(String value) { + switch (value) { + case "admin": + return ADMIN; + case "client": + return CLIENT; + default: + return new CimdExternalMetadataCreatedByEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADMIN, + + CLIENT, + + UNKNOWN + } + + public interface Visitor { + T visitAdmin(); + + T visitClient(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/CimdMappedPrivateKeyJwtCredential.java b/src/main/java/com/auth0/client/mgmt/types/CimdMappedPrivateKeyJwtCredential.java index 073b89f9..c27f98c6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CimdMappedPrivateKeyJwtCredential.java +++ b/src/main/java/com/auth0/client/mgmt/types/CimdMappedPrivateKeyJwtCredential.java @@ -141,7 +141,6 @@ public Builder from(CimdMappedPrivateKeyJwtCredential other) { } /** - *

                                                              Type of credential (e.g., public_key)

                                                              *

                                                              Type of credential (e.g., public_key)

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -153,7 +152,6 @@ public KidStage credentialType(@NotNull String credentialType) { } /** - *

                                                              Key identifier from JWKS or calculated thumbprint

                                                              *

                                                              Key identifier from JWKS or calculated thumbprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -165,7 +163,6 @@ public AlgStage kid(@NotNull String kid) { } /** - *

                                                              Algorithm (e.g., RS256, RS384, PS256)

                                                              *

                                                              Algorithm (e.g., RS256, RS384, PS256)

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CimdValidationResult.java b/src/main/java/com/auth0/client/mgmt/types/CimdValidationResult.java index c3bfaf3f..b38ba312 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CimdValidationResult.java +++ b/src/main/java/com/auth0/client/mgmt/types/CimdValidationResult.java @@ -147,7 +147,6 @@ public Builder from(CimdValidationResult other) { } /** - *

                                                              Whether the metadata document passed validation

                                                              *

                                                              Whether the metadata document passed validation

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/Client.java b/src/main/java/com/auth0/client/mgmt/types/Client.java index 2963c66b..0c4b3856 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Client.java +++ b/src/main/java/com/auth0/client/mgmt/types/Client.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,6 +27,10 @@ public final class Client { private final Optional clientId; + private final Optional createdAt; + + private final Optional updatedAt; + private final Optional tenant; private final Optional name; @@ -132,10 +137,22 @@ public final class Client { private final Optional expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional googleAccountLinking; + + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional thirdPartySecurityMode; + private final Optional oidcSupport; + private final Optional redirectionPolicy; private final Optional resourceServerIdentifier; @@ -146,6 +163,10 @@ public final class Client { private final Optional externalMetadataCreatedBy; + private final Optional externalMetadataStatus; + + private final Optional agentId; + private final Optional externalClientId; private final Optional jwksUri; @@ -154,6 +175,8 @@ public final class Client { private Client( Optional clientId, + Optional createdAt, + Optional updatedAt, Optional tenant, Optional name, Optional description, @@ -207,17 +230,27 @@ private Client( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional b2BIntegrationConfiguration, Optional myOrganizationConfiguration, + Optional googleAccountLinking, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional thirdPartySecurityMode, + Optional oidcSupport, Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, Optional externalMetadataCreatedBy, + Optional externalMetadataStatus, + Optional agentId, Optional externalClientId, Optional jwksUri, Map additionalProperties) { this.clientId = clientId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; this.tenant = tenant; this.name = name; this.description = description; @@ -271,13 +304,21 @@ private Client( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.thirdPartySecurityMode = thirdPartySecurityMode; + this.oidcSupport = oidcSupport; this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.externalMetadataStatus = externalMetadataStatus; + this.agentId = agentId; this.externalClientId = externalClientId; this.jwksUri = jwksUri; this.additionalProperties = additionalProperties; @@ -291,6 +332,22 @@ public Optional getClientId() { return clientId; } + /** + * @return The ISO 8601 timestamp of when this client was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp of when this client was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + /** * @return Name of the tenant this client belongs to. */ @@ -680,16 +737,46 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonProperty("my_organization_configuration") public Optional getMyOrganizationConfiguration() { return myOrganizationConfiguration; } + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + @JsonProperty("third_party_security_mode") public Optional getThirdPartySecurityMode() { return thirdPartySecurityMode; } + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + @JsonProperty("redirection_policy") public Optional getRedirectionPolicy() { return redirectionPolicy; @@ -718,6 +805,19 @@ public Optional getExternalMetadataCreatedB return externalMetadataCreatedBy; } + @JsonProperty("external_metadata_status") + public Optional getExternalMetadataStatus() { + return externalMetadataStatus; + } + + /** + * @return ID of the agent associated with this client. + */ + @JsonProperty("agent_id") + public Optional getAgentId() { + return agentId; + } + /** * @return An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers. */ @@ -795,6 +895,8 @@ public Map getAdditionalProperties() { private boolean equalTo(Client other) { return clientId.equals(other.clientId) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) && tenant.equals(other.tenant) && name.equals(other.name) && description.equals(other.description) @@ -849,13 +951,21 @@ private boolean equalTo(Client other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && oidcSupport.equals(other.oidcSupport) && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) + && externalMetadataStatus.equals(other.externalMetadataStatus) + && agentId.equals(other.agentId) && externalClientId.equals(other.externalClientId) && jwksUri.equals(other.jwksUri); } @@ -864,6 +974,8 @@ private boolean equalTo(Client other) { public int hashCode() { return Objects.hash( this.clientId, + this.createdAt, + this.updatedAt, this.tenant, this.name, this.description, @@ -917,13 +1029,21 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, + this.googleAccountLinking, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.thirdPartySecurityMode, + this.oidcSupport, this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, this.externalMetadataCreatedBy, + this.externalMetadataStatus, + this.agentId, this.externalClientId, this.jwksUri); } @@ -941,6 +1061,10 @@ public static Builder builder() { public static final class Builder { private Optional clientId = Optional.empty(); + private Optional createdAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + private Optional tenant = Optional.empty(); private Optional name = Optional.empty(); @@ -1048,10 +1172,23 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional googleAccountLinking = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + private Optional thirdPartySecurityMode = Optional.empty(); + private Optional oidcSupport = Optional.empty(); + private Optional redirectionPolicy = Optional.empty(); private Optional resourceServerIdentifier = Optional.empty(); @@ -1063,6 +1200,10 @@ public static final class Builder { private Optional externalMetadataCreatedBy = Optional.empty(); + private Optional externalMetadataStatus = Optional.empty(); + + private Optional agentId = Optional.empty(); + private Optional externalClientId = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -1074,6 +1215,8 @@ private Builder() {} public Builder from(Client other) { clientId(other.getClientId()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); tenant(other.getTenant()); name(other.getName()); description(other.getDescription()); @@ -1127,13 +1270,21 @@ public Builder from(Client other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); + oidcSupport(other.getOidcSupport()); redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + externalMetadataStatus(other.getExternalMetadataStatus()); + agentId(other.getAgentId()); externalClientId(other.getExternalClientId()); jwksUri(other.getJwksUri()); return this; @@ -1153,6 +1304,34 @@ public Builder clientId(String clientId) { return this; } + /** + *

                                                              The ISO 8601 timestamp of when this client was created.

                                                              + */ + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public Builder createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was last updated.

                                                              + */ + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public Builder updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + /** *

                                                              Name of the tenant this client belongs to.

                                                              */ @@ -2000,6 +2179,17 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) public Builder myOrganizationConfiguration( Optional myOrganizationConfiguration) { @@ -2013,6 +2203,55 @@ public Builder myOrganizationConfiguration( return this; } + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking(Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfiguration googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + IdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(AnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { this.thirdPartySecurityMode = thirdPartySecurityMode; @@ -2024,6 +2263,17 @@ public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPart return this; } + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) public Builder redirectionPolicy(Optional redirectionPolicy) { this.redirectionPolicy = redirectionPolicy; @@ -2085,6 +2335,31 @@ public Builder externalMetadataCreatedBy(ClientExternalMetadataCreatedByEnum ext return this; } + @JsonSetter(value = "external_metadata_status", nulls = Nulls.SKIP) + public Builder externalMetadataStatus(Optional externalMetadataStatus) { + this.externalMetadataStatus = externalMetadataStatus; + return this; + } + + public Builder externalMetadataStatus(ClientExternalMetadataStatusEnum externalMetadataStatus) { + this.externalMetadataStatus = Optional.ofNullable(externalMetadataStatus); + return this; + } + + /** + *

                                                              ID of the agent associated with this client.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(Optional agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = Optional.ofNullable(agentId); + return this; + } + /** *

                                                              An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers.

                                                              */ @@ -2116,6 +2391,8 @@ public Builder jwksUri(String jwksUri) { public Client build() { return new Client( clientId, + createdAt, + updatedAt, tenant, name, description, @@ -2169,13 +2446,21 @@ public Client build() { parRequestExpiry, tokenQuota, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, thirdPartySecurityMode, + oidcSupport, redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, externalMetadataCreatedBy, + externalMetadataStatus, + agentId, externalClientId, jwksUri, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonLayer.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonLayer.java index cf3a8a9f..6bad2c43 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonLayer.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientAddonLayer.java @@ -194,7 +194,6 @@ public Builder from(ClientAddonLayer other) { } /** - *

                                                              Provider ID of your Layer account

                                                              *

                                                              Provider ID of your Layer account

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -206,7 +205,6 @@ public KeyIdStage providerId(@NotNull String providerId) { } /** - *

                                                              Authentication Key identifier used to sign the Layer token.

                                                              *

                                                              Authentication Key identifier used to sign the Layer token.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -218,7 +216,6 @@ public PrivateKeyStage keyId(@NotNull String keyId) { } /** - *

                                                              Private key for signing the Layer token.

                                                              *

                                                              Private key for signing the Layer token.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java index 7cc03c9c..3494015c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java @@ -98,7 +98,6 @@ public Builder from(ClientAddonMscrm other) { } /** - *

                                                              Microsoft Dynamics CRM application URL.

                                                              *

                                                              Microsoft Dynamics CRM application URL.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java index 9e3b5c23..7f50df6d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java @@ -98,7 +98,6 @@ public Builder from(ClientAddonRms other) { } /** - *

                                                              URL of your Rights Management Server. It can be internal or external, but users will have to be able to reach it.

                                                              *

                                                              URL of your Rights Management Server. It can be internal or external, but users will have to be able to reach it.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSlack.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSlack.java index 90b340c3..f688eb54 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSlack.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSlack.java @@ -98,7 +98,6 @@ public Builder from(ClientAddonSlack other) { } /** - *

                                                              Slack team name.

                                                              *

                                                              Slack team name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAnonymousSessionTransferNetworkBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientAnonymousSessionTransferNetworkBindingEnum.java new file mode 100644 index 00000000..c030a61d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientAnonymousSessionTransferNetworkBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class ClientAnonymousSessionTransferNetworkBindingEnum { + public static final ClientAnonymousSessionTransferNetworkBindingEnum ASN = + new ClientAnonymousSessionTransferNetworkBindingEnum(Value.ASN, "asn"); + + public static final ClientAnonymousSessionTransferNetworkBindingEnum IP = + new ClientAnonymousSessionTransferNetworkBindingEnum(Value.IP, "ip"); + + public static final ClientAnonymousSessionTransferNetworkBindingEnum NONE = + new ClientAnonymousSessionTransferNetworkBindingEnum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + ClientAnonymousSessionTransferNetworkBindingEnum(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 ClientAnonymousSessionTransferNetworkBindingEnum + && this.string.equals(((ClientAnonymousSessionTransferNetworkBindingEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ASN: + return visitor.visitAsn(); + case IP: + return visitor.visitIp(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientAnonymousSessionTransferNetworkBindingEnum valueOf(String value) { + switch (value) { + case "asn": + return ASN; + case "ip": + return IP; + case "none": + return NONE; + default: + return new ClientAnonymousSessionTransferNetworkBindingEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + IP, + + ASN, + + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitIp(); + + T visitAsn(); + + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java index 47510a99..b2ce170a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java @@ -7,8 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ClientCredentialAlgorithmEnum { + public static final ClientCredentialAlgorithmEnum PS384 = new ClientCredentialAlgorithmEnum(Value.PS384, "PS384"); + public static final ClientCredentialAlgorithmEnum PS256 = new ClientCredentialAlgorithmEnum(Value.PS256, "PS256"); + public static final ClientCredentialAlgorithmEnum ES256 = new ClientCredentialAlgorithmEnum(Value.ES256, "ES256"); + public static final ClientCredentialAlgorithmEnum RS384 = new ClientCredentialAlgorithmEnum(Value.RS384, "RS384"); public static final ClientCredentialAlgorithmEnum RS256 = new ClientCredentialAlgorithmEnum(Value.RS256, "RS256"); @@ -46,8 +50,12 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case PS384: + return visitor.visitPs384(); case PS256: return visitor.visitPs256(); + case ES256: + return visitor.visitEs256(); case RS384: return visitor.visitRs384(); case RS256: @@ -61,8 +69,12 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ClientCredentialAlgorithmEnum valueOf(String value) { switch (value) { + case "PS384": + return PS384; case "PS256": return PS256; + case "ES256": + return ES256; case "RS384": return RS384; case "RS256": @@ -79,6 +91,10 @@ public enum Value { PS256, + ES256, + + PS384, + UNKNOWN } @@ -89,6 +105,10 @@ public interface Visitor { T visitPs256(); + T visitEs256(); + + T visitPs384(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganization.java b/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganization.java index 5cd722c8..35d33426 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganization.java @@ -127,7 +127,6 @@ public Builder from(ClientDefaultOrganization other) { } /** - *

                                                              The default Organization ID to be used

                                                              *

                                                              The default Organization ID to be used

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientExternalMetadataStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientExternalMetadataStatusEnum.java new file mode 100644 index 00000000..8e006a83 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientExternalMetadataStatusEnum.java @@ -0,0 +1,86 @@ +/** + * 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 ClientExternalMetadataStatusEnum { + public static final ClientExternalMetadataStatusEnum AVAILABLE = + new ClientExternalMetadataStatusEnum(Value.AVAILABLE, "available"); + + public static final ClientExternalMetadataStatusEnum UNAVAILABLE = + new ClientExternalMetadataStatusEnum(Value.UNAVAILABLE, "unavailable"); + + private final Value value; + + private final String string; + + ClientExternalMetadataStatusEnum(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 ClientExternalMetadataStatusEnum + && this.string.equals(((ClientExternalMetadataStatusEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AVAILABLE: + return visitor.visitAvailable(); + case UNAVAILABLE: + return visitor.visitUnavailable(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientExternalMetadataStatusEnum valueOf(String value) { + switch (value) { + case "available": + return AVAILABLE; + case "unavailable": + return UNAVAILABLE; + default: + return new ClientExternalMetadataStatusEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AVAILABLE, + + UNAVAILABLE, + + UNKNOWN + } + + public interface Visitor { + T visitAvailable(); + + T visitUnavailable(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientGrantSortFieldEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantSortFieldEnum.java new file mode 100644 index 00000000..cc83e193 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientGrantSortFieldEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class ClientGrantSortFieldEnum { + public static final ClientGrantSortFieldEnum AUDIENCE = new ClientGrantSortFieldEnum(Value.AUDIENCE, "audience"); + + public static final ClientGrantSortFieldEnum UPDATED_AT = + new ClientGrantSortFieldEnum(Value.UPDATED_AT, "updated_at"); + + private final Value value; + + private final String string; + + ClientGrantSortFieldEnum(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 ClientGrantSortFieldEnum + && this.string.equals(((ClientGrantSortFieldEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUDIENCE: + return visitor.visitAudience(); + case UPDATED_AT: + return visitor.visitUpdatedAt(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientGrantSortFieldEnum valueOf(String value) { + switch (value) { + case "audience": + return AUDIENCE; + case "updated_at": + return UPDATED_AT; + default: + return new ClientGrantSortFieldEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AUDIENCE, + + UPDATED_AT, + + UNKNOWN + } + + public interface Visitor { + T visitAudience(); + + T visitUpdatedAt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java index 7ea37cc4..0fbc8ad4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java @@ -9,6 +9,9 @@ public final class ClientGrantSubjectTypeEnum { public static final ClientGrantSubjectTypeEnum USER = new ClientGrantSubjectTypeEnum(Value.USER, "user"); + public static final ClientGrantSubjectTypeEnum ANONYMOUS_USER = + new ClientGrantSubjectTypeEnum(Value.ANONYMOUS_USER, "anonymous_user"); + public static final ClientGrantSubjectTypeEnum CLIENT = new ClientGrantSubjectTypeEnum(Value.CLIENT, "client"); private final Value value; @@ -46,6 +49,8 @@ public T visit(Visitor visitor) { switch (value) { case USER: return visitor.visitUser(); + case ANONYMOUS_USER: + return visitor.visitAnonymousUser(); case CLIENT: return visitor.visitClient(); case UNKNOWN: @@ -59,6 +64,8 @@ public static ClientGrantSubjectTypeEnum valueOf(String value) { switch (value) { case "user": return USER; + case "anonymous_user": + return ANONYMOUS_USER; case "client": return CLIENT; default: @@ -71,6 +78,8 @@ public enum Value { USER, + ANONYMOUS_USER, + UNKNOWN } @@ -79,6 +88,8 @@ public interface Visitor { T visitUser(); + T visitAnonymousUser(); + T visitUnknown(String unknownType); } } 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 00000000..126b585e --- /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 00000000..b005240b --- /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 e55af4a1..07c9dad4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPatchConfiguration.java @@ -29,24 +29,36 @@ public final class ClientMyOrganizationPatchConfiguration { private final List allowedStrategies; + private final Optional thirdPartyClientAccess; + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; private final Optional invitationLandingClientId; + private final Optional enforcePermissionCeiling; + + private final Optional enforceSelfAssignmentRestriction; + private final Map additionalProperties; private ClientMyOrganizationPatchConfiguration( Optional connectionProfileId, Optional userAttributeProfileId, List allowedStrategies, + Optional thirdPartyClientAccess, ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, Optional invitationLandingClientId, + Optional enforcePermissionCeiling, + Optional enforceSelfAssignmentRestriction, Map additionalProperties) { this.connectionProfileId = connectionProfileId; this.userAttributeProfileId = userAttributeProfileId; this.allowedStrategies = allowedStrategies; + this.thirdPartyClientAccess = thirdPartyClientAccess; this.connectionDeletionBehavior = connectionDeletionBehavior; this.invitationLandingClientId = invitationLandingClientId; + this.enforcePermissionCeiling = enforcePermissionCeiling; + this.enforceSelfAssignmentRestriction = enforceSelfAssignmentRestriction; this.additionalProperties = additionalProperties; } @@ -74,6 +86,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; @@ -87,6 +104,22 @@ public Optional getInvitationLandingClientId() { return invitationLandingClientId; } + /** + * @return When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves. + */ + @JsonProperty("enforce_permission_ceiling") + public Optional getEnforcePermissionCeiling() { + return enforcePermissionCeiling; + } + + /** + * @return When true, prevents organization admins from assigning permissions to themselves. + */ + @JsonProperty("enforce_self_assignment_restriction") + public Optional getEnforceSelfAssignmentRestriction() { + return enforceSelfAssignmentRestriction; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,8 +136,11 @@ 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); + && invitationLandingClientId.equals(other.invitationLandingClientId) + && enforcePermissionCeiling.equals(other.enforcePermissionCeiling) + && enforceSelfAssignmentRestriction.equals(other.enforceSelfAssignmentRestriction); } @java.lang.Override @@ -113,8 +149,11 @@ public int hashCode() { this.connectionProfileId, this.userAttributeProfileId, this.allowedStrategies, + this.thirdPartyClientAccess, this.connectionDeletionBehavior, - this.invitationLandingClientId); + this.invitationLandingClientId, + this.enforcePermissionCeiling, + this.enforceSelfAssignmentRestriction); } @java.lang.Override @@ -164,20 +203,47 @@ 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.

                                                              */ _FinalStage invitationLandingClientId(Optional invitationLandingClientId); _FinalStage invitationLandingClientId(String invitationLandingClientId); + + /** + *

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

                                                              When true, prevents organization admins from assigning permissions to themselves.

                                                              + */ + _FinalStage enforceSelfAssignmentRestriction(Optional enforceSelfAssignmentRestriction); + + _FinalStage enforceSelfAssignmentRestriction(Boolean enforceSelfAssignmentRestriction); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ConnectionDeletionBehaviorStage, _FinalStage { private ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + private Optional enforceSelfAssignmentRestriction = Optional.empty(); + + private Optional enforcePermissionCeiling = Optional.empty(); + private Optional invitationLandingClientId = Optional.empty(); + private Optional thirdPartyClientAccess = + Optional.empty(); + private List allowedStrategies = new ArrayList<>(); private Optional userAttributeProfileId = Optional.empty(); @@ -194,8 +260,11 @@ public Builder from(ClientMyOrganizationPatchConfiguration other) { connectionProfileId(other.getConnectionProfileId()); userAttributeProfileId(other.getUserAttributeProfileId()); allowedStrategies(other.getAllowedStrategies()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); connectionDeletionBehavior(other.getConnectionDeletionBehavior()); invitationLandingClientId(other.getInvitationLandingClientId()); + enforcePermissionCeiling(other.getEnforcePermissionCeiling()); + enforceSelfAssignmentRestriction(other.getEnforceSelfAssignmentRestriction()); return this; } @@ -208,6 +277,46 @@ public _FinalStage connectionDeletionBehavior( return this; } + /** + *

                                                              When true, prevents organization admins from assigning permissions to themselves.

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

                                                              When true, prevents organization admins from assigning permissions to themselves.

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

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

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

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -228,6 +337,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,8 +436,11 @@ public ClientMyOrganizationPatchConfiguration build() { connectionProfileId, userAttributeProfileId, allowedStrategies, + thirdPartyClientAccess, connectionDeletionBehavior, invitationLandingClientId, + enforcePermissionCeiling, + enforceSelfAssignmentRestriction, 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 893627af..4abb78e3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationPostConfiguration.java @@ -29,24 +29,36 @@ public final class ClientMyOrganizationPostConfiguration { private final List allowedStrategies; + private final Optional thirdPartyClientAccess; + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; private final Optional invitationLandingClientId; + private final Optional enforcePermissionCeiling; + + private final Optional enforceSelfAssignmentRestriction; + private final Map additionalProperties; private ClientMyOrganizationPostConfiguration( Optional connectionProfileId, Optional userAttributeProfileId, List allowedStrategies, + Optional thirdPartyClientAccess, ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, Optional invitationLandingClientId, + Optional enforcePermissionCeiling, + Optional enforceSelfAssignmentRestriction, Map additionalProperties) { this.connectionProfileId = connectionProfileId; this.userAttributeProfileId = userAttributeProfileId; this.allowedStrategies = allowedStrategies; + this.thirdPartyClientAccess = thirdPartyClientAccess; this.connectionDeletionBehavior = connectionDeletionBehavior; this.invitationLandingClientId = invitationLandingClientId; + this.enforcePermissionCeiling = enforcePermissionCeiling; + this.enforceSelfAssignmentRestriction = enforceSelfAssignmentRestriction; this.additionalProperties = additionalProperties; } @@ -74,6 +86,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; @@ -87,6 +104,22 @@ public Optional getInvitationLandingClientId() { return invitationLandingClientId; } + /** + * @return When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves. + */ + @JsonProperty("enforce_permission_ceiling") + public Optional getEnforcePermissionCeiling() { + return enforcePermissionCeiling; + } + + /** + * @return When true, prevents organization admins from assigning permissions to themselves. + */ + @JsonProperty("enforce_self_assignment_restriction") + public Optional getEnforceSelfAssignmentRestriction() { + return enforceSelfAssignmentRestriction; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,8 +136,11 @@ 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); + && invitationLandingClientId.equals(other.invitationLandingClientId) + && enforcePermissionCeiling.equals(other.enforcePermissionCeiling) + && enforceSelfAssignmentRestriction.equals(other.enforceSelfAssignmentRestriction); } @java.lang.Override @@ -113,8 +149,11 @@ public int hashCode() { this.connectionProfileId, this.userAttributeProfileId, this.allowedStrategies, + this.thirdPartyClientAccess, this.connectionDeletionBehavior, - this.invitationLandingClientId); + this.invitationLandingClientId, + this.enforcePermissionCeiling, + this.enforceSelfAssignmentRestriction); } @java.lang.Override @@ -164,20 +203,47 @@ 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.

                                                              */ _FinalStage invitationLandingClientId(Optional invitationLandingClientId); _FinalStage invitationLandingClientId(String invitationLandingClientId); + + /** + *

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

                                                              When true, prevents organization admins from assigning permissions to themselves.

                                                              + */ + _FinalStage enforceSelfAssignmentRestriction(Optional enforceSelfAssignmentRestriction); + + _FinalStage enforceSelfAssignmentRestriction(Boolean enforceSelfAssignmentRestriction); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ConnectionDeletionBehaviorStage, _FinalStage { private ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + private Optional enforceSelfAssignmentRestriction = Optional.empty(); + + private Optional enforcePermissionCeiling = Optional.empty(); + private Optional invitationLandingClientId = Optional.empty(); + private Optional thirdPartyClientAccess = + Optional.empty(); + private List allowedStrategies = new ArrayList<>(); private Optional userAttributeProfileId = Optional.empty(); @@ -194,8 +260,11 @@ public Builder from(ClientMyOrganizationPostConfiguration other) { connectionProfileId(other.getConnectionProfileId()); userAttributeProfileId(other.getUserAttributeProfileId()); allowedStrategies(other.getAllowedStrategies()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); connectionDeletionBehavior(other.getConnectionDeletionBehavior()); invitationLandingClientId(other.getInvitationLandingClientId()); + enforcePermissionCeiling(other.getEnforcePermissionCeiling()); + enforceSelfAssignmentRestriction(other.getEnforceSelfAssignmentRestriction()); return this; } @@ -208,6 +277,46 @@ public _FinalStage connectionDeletionBehavior( return this; } + /** + *

                                                              When true, prevents organization admins from assigning permissions to themselves.

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

                                                              When true, prevents organization admins from assigning permissions to themselves.

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

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

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

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -228,6 +337,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,8 +436,11 @@ public ClientMyOrganizationPostConfiguration build() { connectionProfileId, userAttributeProfileId, allowedStrategies, + thirdPartyClientAccess, connectionDeletionBehavior, invitationLandingClientId, + enforcePermissionCeiling, + enforceSelfAssignmentRestriction, 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 f7db3abe..1e8df76a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientMyOrganizationResponseConfiguration.java @@ -29,24 +29,36 @@ public final class ClientMyOrganizationResponseConfiguration { private final List allowedStrategies; + private final Optional thirdPartyClientAccess; + private final ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; private final Optional invitationLandingClientId; + private final Optional enforcePermissionCeiling; + + private final Optional enforceSelfAssignmentRestriction; + private final Map additionalProperties; private ClientMyOrganizationResponseConfiguration( Optional connectionProfileId, Optional userAttributeProfileId, List allowedStrategies, + Optional thirdPartyClientAccess, ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior, Optional invitationLandingClientId, + Optional enforcePermissionCeiling, + Optional enforceSelfAssignmentRestriction, Map additionalProperties) { this.connectionProfileId = connectionProfileId; this.userAttributeProfileId = userAttributeProfileId; this.allowedStrategies = allowedStrategies; + this.thirdPartyClientAccess = thirdPartyClientAccess; this.connectionDeletionBehavior = connectionDeletionBehavior; this.invitationLandingClientId = invitationLandingClientId; + this.enforcePermissionCeiling = enforcePermissionCeiling; + this.enforceSelfAssignmentRestriction = enforceSelfAssignmentRestriction; this.additionalProperties = additionalProperties; } @@ -74,6 +86,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; @@ -87,6 +104,22 @@ public Optional getInvitationLandingClientId() { return invitationLandingClientId; } + /** + * @return When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves. + */ + @JsonProperty("enforce_permission_ceiling") + public Optional getEnforcePermissionCeiling() { + return enforcePermissionCeiling; + } + + /** + * @return When true, prevents organization admins from assigning permissions to themselves. + */ + @JsonProperty("enforce_self_assignment_restriction") + public Optional getEnforceSelfAssignmentRestriction() { + return enforceSelfAssignmentRestriction; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,8 +136,11 @@ 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); + && invitationLandingClientId.equals(other.invitationLandingClientId) + && enforcePermissionCeiling.equals(other.enforcePermissionCeiling) + && enforceSelfAssignmentRestriction.equals(other.enforceSelfAssignmentRestriction); } @java.lang.Override @@ -113,8 +149,11 @@ public int hashCode() { this.connectionProfileId, this.userAttributeProfileId, this.allowedStrategies, + this.thirdPartyClientAccess, this.connectionDeletionBehavior, - this.invitationLandingClientId); + this.invitationLandingClientId, + this.enforcePermissionCeiling, + this.enforceSelfAssignmentRestriction); } @java.lang.Override @@ -164,20 +203,47 @@ 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.

                                                              */ _FinalStage invitationLandingClientId(Optional invitationLandingClientId); _FinalStage invitationLandingClientId(String invitationLandingClientId); + + /** + *

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

                                                              When true, prevents organization admins from assigning permissions to themselves.

                                                              + */ + _FinalStage enforceSelfAssignmentRestriction(Optional enforceSelfAssignmentRestriction); + + _FinalStage enforceSelfAssignmentRestriction(Boolean enforceSelfAssignmentRestriction); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ConnectionDeletionBehaviorStage, _FinalStage { private ClientMyOrganizationDeletionBehaviorEnum connectionDeletionBehavior; + private Optional enforceSelfAssignmentRestriction = Optional.empty(); + + private Optional enforcePermissionCeiling = Optional.empty(); + private Optional invitationLandingClientId = Optional.empty(); + private Optional thirdPartyClientAccess = + Optional.empty(); + private List allowedStrategies = new ArrayList<>(); private Optional userAttributeProfileId = Optional.empty(); @@ -194,8 +260,11 @@ public Builder from(ClientMyOrganizationResponseConfiguration other) { connectionProfileId(other.getConnectionProfileId()); userAttributeProfileId(other.getUserAttributeProfileId()); allowedStrategies(other.getAllowedStrategies()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); connectionDeletionBehavior(other.getConnectionDeletionBehavior()); invitationLandingClientId(other.getInvitationLandingClientId()); + enforcePermissionCeiling(other.getEnforcePermissionCeiling()); + enforceSelfAssignmentRestriction(other.getEnforceSelfAssignmentRestriction()); return this; } @@ -208,6 +277,46 @@ public _FinalStage connectionDeletionBehavior( return this; } + /** + *

                                                              When true, prevents organization admins from assigning permissions to themselves.

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

                                                              When true, prevents organization admins from assigning permissions to themselves.

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

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

                                                              When true, limits the permissions that organization admins can assign to members to only those held by the admin themselves.

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

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

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -228,6 +337,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,8 +436,11 @@ public ClientMyOrganizationResponseConfiguration build() { connectionProfileId, userAttributeProfileId, allowedStrategies, + thirdPartyClientAccess, connectionDeletionBehavior, invitationLandingClientId, + enforcePermissionCeiling, + enforceSelfAssignmentRestriction, 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 00000000..b26011d3 --- /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/ClientOidcBackchannelLogoutInitiatorsEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java index e48d62b2..6f45107b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java @@ -22,6 +22,9 @@ public final class ClientOidcBackchannelLogoutInitiatorsEnum { public static final ClientOidcBackchannelLogoutInitiatorsEnum IDP_LOGOUT = new ClientOidcBackchannelLogoutInitiatorsEnum(Value.IDP_LOGOUT, "idp-logout"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum PROFILE_CHANGED = + new ClientOidcBackchannelLogoutInitiatorsEnum(Value.PROFILE_CHANGED, "profile-changed"); + public static final ClientOidcBackchannelLogoutInitiatorsEnum RP_LOGOUT = new ClientOidcBackchannelLogoutInitiatorsEnum(Value.RP_LOGOUT, "rp-logout"); @@ -77,6 +80,8 @@ public T visit(Visitor visitor) { return visitor.visitAccountDeactivated(); case IDP_LOGOUT: return visitor.visitIdpLogout(); + case PROFILE_CHANGED: + return visitor.visitProfileChanged(); case RP_LOGOUT: return visitor.visitRpLogout(); case PASSWORD_CHANGED: @@ -104,6 +109,8 @@ public static ClientOidcBackchannelLogoutInitiatorsEnum valueOf(String value) { return ACCOUNT_DEACTIVATED; case "idp-logout": return IDP_LOGOUT; + case "profile-changed": + return PROFILE_CHANGED; case "rp-logout": return RP_LOGOUT; case "password-changed": @@ -136,6 +143,8 @@ public enum Value { ACCOUNT_DEACTIVATED, + PROFILE_CHANGED, + UNKNOWN } @@ -158,6 +167,8 @@ public interface Visitor { T visitAccountDeactivated(); + T visitProfileChanged(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupport.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupport.java new file mode 100644 index 00000000..c928d43c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupport.java @@ -0,0 +1,174 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientOidcSupport.Builder.class) +public final class ClientOidcSupport { + private final Optional isAllowed; + + private final Optional allowAllScopes; + + private final Optional> allowedScopes; + + private final Map additionalProperties; + + private ClientOidcSupport( + Optional isAllowed, + Optional allowAllScopes, + Optional> allowedScopes, + Map additionalProperties) { + this.isAllowed = isAllowed; + this.allowAllScopes = allowAllScopes; + this.allowedScopes = allowedScopes; + this.additionalProperties = additionalProperties; + } + + /** + * @return Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint. + */ + @JsonProperty("is_allowed") + public Optional getIsAllowed() { + return isAllowed; + } + + /** + * @return Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes. + */ + @JsonProperty("allow_all_scopes") + public Optional getAllowAllScopes() { + return allowAllScopes; + } + + /** + * @return OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes. + */ + @JsonProperty("allowed_scopes") + public Optional> getAllowedScopes() { + return allowedScopes; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientOidcSupport && equalTo((ClientOidcSupport) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientOidcSupport other) { + return isAllowed.equals(other.isAllowed) + && allowAllScopes.equals(other.allowAllScopes) + && allowedScopes.equals(other.allowedScopes); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isAllowed, this.allowAllScopes, this.allowedScopes); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional isAllowed = Optional.empty(); + + private Optional allowAllScopes = Optional.empty(); + + private Optional> allowedScopes = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientOidcSupport other) { + isAllowed(other.getIsAllowed()); + allowAllScopes(other.getAllowAllScopes()); + allowedScopes(other.getAllowedScopes()); + return this; + } + + /** + *

                                                              Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + */ + @JsonSetter(value = "is_allowed", nulls = Nulls.SKIP) + public Builder isAllowed(Optional isAllowed) { + this.isAllowed = isAllowed; + return this; + } + + public Builder isAllowed(Boolean isAllowed) { + this.isAllowed = Optional.ofNullable(isAllowed); + return this; + } + + /** + *

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

                                                              + */ + @JsonSetter(value = "allow_all_scopes", nulls = Nulls.SKIP) + public Builder allowAllScopes(Optional allowAllScopes) { + this.allowAllScopes = allowAllScopes; + return this; + } + + public Builder allowAllScopes(Boolean allowAllScopes) { + this.allowAllScopes = Optional.ofNullable(allowAllScopes); + return this; + } + + /** + *

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

                                                              + */ + @JsonSetter(value = "allowed_scopes", nulls = Nulls.SKIP) + public Builder allowedScopes(Optional> allowedScopes) { + this.allowedScopes = allowedScopes; + return this; + } + + public Builder allowedScopes(List allowedScopes) { + this.allowedScopes = Optional.ofNullable(allowedScopes); + return this; + } + + public ClientOidcSupport build() { + return new ClientOidcSupport(isAllowed, allowAllScopes, allowedScopes, 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/ClientOidcSupportAllowedScopesEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportAllowedScopesEnum.java new file mode 100644 index 00000000..a75deb96 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportAllowedScopesEnum.java @@ -0,0 +1,108 @@ +/** + * 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 ClientOidcSupportAllowedScopesEnum { + public static final ClientOidcSupportAllowedScopesEnum EMAIL = + new ClientOidcSupportAllowedScopesEnum(Value.EMAIL, "email"); + + public static final ClientOidcSupportAllowedScopesEnum PHONE = + new ClientOidcSupportAllowedScopesEnum(Value.PHONE, "phone"); + + public static final ClientOidcSupportAllowedScopesEnum PROFILE = + new ClientOidcSupportAllowedScopesEnum(Value.PROFILE, "profile"); + + public static final ClientOidcSupportAllowedScopesEnum ADDRESS = + new ClientOidcSupportAllowedScopesEnum(Value.ADDRESS, "address"); + + private final Value value; + + private final String string; + + ClientOidcSupportAllowedScopesEnum(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 ClientOidcSupportAllowedScopesEnum + && this.string.equals(((ClientOidcSupportAllowedScopesEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case PHONE: + return visitor.visitPhone(); + case PROFILE: + return visitor.visitProfile(); + case ADDRESS: + return visitor.visitAddress(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientOidcSupportAllowedScopesEnum valueOf(String value) { + switch (value) { + case "email": + return EMAIL; + case "phone": + return PHONE; + case "profile": + return PROFILE; + case "address": + return ADDRESS; + default: + return new ClientOidcSupportAllowedScopesEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PROFILE, + + EMAIL, + + ADDRESS, + + PHONE, + + UNKNOWN + } + + public interface Visitor { + T visitProfile(); + + T visitEmail(); + + T visitAddress(); + + T visitPhone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportPatch.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportPatch.java new file mode 100644 index 00000000..964c4850 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportPatch.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientOidcSupportPatch.Builder.class) +public final class ClientOidcSupportPatch { + private final boolean isAllowed; + + private final Optional allowAllScopes; + + private final Optional> allowedScopes; + + private final Map additionalProperties; + + private ClientOidcSupportPatch( + boolean isAllowed, + Optional allowAllScopes, + Optional> allowedScopes, + Map additionalProperties) { + this.isAllowed = isAllowed; + this.allowAllScopes = allowAllScopes; + this.allowedScopes = allowedScopes; + this.additionalProperties = additionalProperties; + } + + /** + * @return Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint. + */ + @JsonProperty("is_allowed") + public boolean getIsAllowed() { + return isAllowed; + } + + /** + * @return Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes. + */ + @JsonProperty("allow_all_scopes") + public Optional getAllowAllScopes() { + return allowAllScopes; + } + + /** + * @return OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes. + */ + @JsonProperty("allowed_scopes") + public Optional> getAllowedScopes() { + return allowedScopes; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientOidcSupportPatch && equalTo((ClientOidcSupportPatch) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientOidcSupportPatch other) { + return isAllowed == other.isAllowed + && allowAllScopes.equals(other.allowAllScopes) + && allowedScopes.equals(other.allowedScopes); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isAllowed, this.allowAllScopes, this.allowedScopes); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IsAllowedStage builder() { + return new Builder(); + } + + public interface IsAllowedStage { + /** + *

                                                              Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + */ + _FinalStage isAllowed(boolean isAllowed); + + Builder from(ClientOidcSupportPatch other); + } + + public interface _FinalStage { + ClientOidcSupportPatch build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

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

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

                                                              + */ + _FinalStage allowedScopes(Optional> allowedScopes); + + _FinalStage allowedScopes(List allowedScopes); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IsAllowedStage, _FinalStage { + private boolean isAllowed; + + private Optional> allowedScopes = Optional.empty(); + + private Optional allowAllScopes = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientOidcSupportPatch other) { + isAllowed(other.getIsAllowed()); + allowAllScopes(other.getAllowAllScopes()); + allowedScopes(other.getAllowedScopes()); + return this; + } + + /** + *

                                                              Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_allowed") + public _FinalStage isAllowed(boolean isAllowed) { + this.isAllowed = isAllowed; + return this; + } + + /** + *

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

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

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

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

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

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

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_all_scopes", nulls = Nulls.SKIP) + public _FinalStage allowAllScopes(Optional allowAllScopes) { + this.allowAllScopes = allowAllScopes; + return this; + } + + @java.lang.Override + public ClientOidcSupportPatch build() { + return new ClientOidcSupportPatch(isAllowed, allowAllScopes, allowedScopes, 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/ClientOidcSupportPost.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportPost.java new file mode 100644 index 00000000..c43e6a8d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientOidcSupportPost.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientOidcSupportPost.Builder.class) +public final class ClientOidcSupportPost { + private final boolean isAllowed; + + private final Optional allowAllScopes; + + private final Optional> allowedScopes; + + private final Map additionalProperties; + + private ClientOidcSupportPost( + boolean isAllowed, + Optional allowAllScopes, + Optional> allowedScopes, + Map additionalProperties) { + this.isAllowed = isAllowed; + this.allowAllScopes = allowAllScopes; + this.allowedScopes = allowedScopes; + this.additionalProperties = additionalProperties; + } + + /** + * @return Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint. + */ + @JsonProperty("is_allowed") + public boolean getIsAllowed() { + return isAllowed; + } + + /** + * @return Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes. + */ + @JsonProperty("allow_all_scopes") + public Optional getAllowAllScopes() { + return allowAllScopes; + } + + /** + * @return OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes. + */ + @JsonProperty("allowed_scopes") + public Optional> getAllowedScopes() { + return allowedScopes; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientOidcSupportPost && equalTo((ClientOidcSupportPost) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientOidcSupportPost other) { + return isAllowed == other.isAllowed + && allowAllScopes.equals(other.allowAllScopes) + && allowedScopes.equals(other.allowedScopes); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isAllowed, this.allowAllScopes, this.allowedScopes); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IsAllowedStage builder() { + return new Builder(); + } + + public interface IsAllowedStage { + /** + *

                                                              Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + */ + _FinalStage isAllowed(boolean isAllowed); + + Builder from(ClientOidcSupportPost other); + } + + public interface _FinalStage { + ClientOidcSupportPost build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

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

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

                                                              + */ + _FinalStage allowedScopes(Optional> allowedScopes); + + _FinalStage allowedScopes(List allowedScopes); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IsAllowedStage, _FinalStage { + private boolean isAllowed; + + private Optional> allowedScopes = Optional.empty(); + + private Optional allowAllScopes = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientOidcSupportPost other) { + isAllowed(other.getIsAllowed()); + allowAllScopes(other.getAllowAllScopes()); + allowedScopes(other.getAllowedScopes()); + return this; + } + + /** + *

                                                              Allows the client to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_allowed") + public _FinalStage isAllowed(boolean isAllowed) { + this.isAllowed = isAllowed; + return this; + } + + /** + *

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

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

                                                              OIDC scopes the client may request (profile, email, address, and phone), which determine the user profile information it can access. Mutually exclusive with allow_all_scopes.

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

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

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

                                                              Allows the client to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_all_scopes", nulls = Nulls.SKIP) + public _FinalStage allowAllScopes(Optional allowAllScopes) { + this.allowAllScopes = allowAllScopes; + return this; + } + + @java.lang.Override + public ClientOidcSupportPost build() { + return new ClientOidcSupportPost(isAllowed, allowAllScopes, allowedScopes, 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/ClientProfile.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfile.java new file mode 100644 index 00000000..f4881671 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfile.java @@ -0,0 +1,367 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfile.Builder.class) +public final class ClientProfile { + private final String id; + + private final String name; + + private final OptionalNullable description; + + private final ClientProfileClientConfiguration clientConfiguration; + + private final ClientProfileApplyPolicy applyPolicy; + + private final Optional createdAt; + + private final Optional updatedAt; + + private final Map additionalProperties; + + private ClientProfile( + String id, + String name, + OptionalNullable description, + ClientProfileClientConfiguration clientConfiguration, + ClientProfileApplyPolicy applyPolicy, + Optional createdAt, + Optional updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.clientConfiguration = clientConfiguration; + this.applyPolicy = applyPolicy; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + @JsonProperty("client_configuration") + public ClientProfileClientConfiguration getClientConfiguration() { + return clientConfiguration; + } + + @JsonProperty("apply_policy") + public ClientProfileApplyPolicy getApplyPolicy() { + return applyPolicy; + } + + /** + * @return Timestamp of creation. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return Timestamp of last update. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfile && equalTo((ClientProfile) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfile other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && clientConfiguration.equals(other.clientConfiguration) + && applyPolicy.equals(other.applyPolicy) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.clientConfiguration, + this.applyPolicy, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(ClientProfile other); + } + + public interface NameStage { + ClientConfigurationStage name(@NotNull String name); + } + + public interface ClientConfigurationStage { + ApplyPolicyStage clientConfiguration(@NotNull ClientProfileClientConfiguration clientConfiguration); + } + + public interface ApplyPolicyStage { + _FinalStage applyPolicy(@NotNull ClientProfileApplyPolicy applyPolicy); + } + + public interface _FinalStage { + ClientProfile build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(@Nullable OptionalNullable description); + + _FinalStage description(String description); + + _FinalStage description(Optional description); + + _FinalStage description(com.auth0.client.mgmt.core.Nullable description); + + /** + *

                                                              Timestamp of creation.

                                                              + */ + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + /** + *

                                                              Timestamp of last update.

                                                              + */ + _FinalStage updatedAt(Optional updatedAt); + + _FinalStage updatedAt(OffsetDateTime updatedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, ClientConfigurationStage, ApplyPolicyStage, _FinalStage { + private String id; + + private String name; + + private ClientProfileClientConfiguration clientConfiguration; + + private ClientProfileApplyPolicy applyPolicy; + + private Optional updatedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientProfile other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + clientConfiguration(other.getClientConfiguration()); + applyPolicy(other.getApplyPolicy()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public ClientConfigurationStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("client_configuration") + public ApplyPolicyStage clientConfiguration(@NotNull ClientProfileClientConfiguration clientConfiguration) { + this.clientConfiguration = + Objects.requireNonNull(clientConfiguration, "clientConfiguration must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("apply_policy") + public _FinalStage applyPolicy(@NotNull ClientProfileApplyPolicy applyPolicy) { + this.applyPolicy = Objects.requireNonNull(applyPolicy, "applyPolicy must not be null"); + return this; + } + + /** + *

                                                              Timestamp of last update.

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

                                                              Timestamp of last update.

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

                                                              Timestamp of creation.

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

                                                              Timestamp of creation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public _FinalStage createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + @java.lang.Override + public _FinalStage description(com.auth0.client.mgmt.core.Nullable description) { + if (description.isNull()) { + this.description = OptionalNullable.ofNull(); + } else if (description.isEmpty()) { + this.description = OptionalNullable.absent(); + } else { + this.description = OptionalNullable.of(description.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage description(Optional description) { + if (description.isPresent()) { + this.description = OptionalNullable.of(description.get()); + } else { + this.description = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = OptionalNullable.of(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(@Nullable OptionalNullable description) { + this.description = description; + return this; + } + + @java.lang.Override + public ClientProfile build() { + return new ClientProfile( + id, + name, + description, + clientConfiguration, + applyPolicy, + 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/ClientProfileApplyPolicy.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicy.java new file mode 100644 index 00000000..afe2a9ae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicy.java @@ -0,0 +1,151 @@ +/** + * 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 = ClientProfileApplyPolicy.Builder.class) +public final class ClientProfileApplyPolicy { + private final ClientProfileApplyPolicyExternalMetadataTypeEnum externalMetadataType; + + private final ClientProfileApplyPolicyExternalMetadataCreatedByEnum externalMetadataCreatedBy; + + private final Map additionalProperties; + + private ClientProfileApplyPolicy( + ClientProfileApplyPolicyExternalMetadataTypeEnum externalMetadataType, + ClientProfileApplyPolicyExternalMetadataCreatedByEnum externalMetadataCreatedBy, + Map additionalProperties) { + this.externalMetadataType = externalMetadataType; + this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("external_metadata_type") + public ClientProfileApplyPolicyExternalMetadataTypeEnum getExternalMetadataType() { + return externalMetadataType; + } + + @JsonProperty("external_metadata_created_by") + public ClientProfileApplyPolicyExternalMetadataCreatedByEnum getExternalMetadataCreatedBy() { + return externalMetadataCreatedBy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileApplyPolicy && equalTo((ClientProfileApplyPolicy) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileApplyPolicy other) { + return externalMetadataType.equals(other.externalMetadataType) + && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.externalMetadataType, this.externalMetadataCreatedBy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ExternalMetadataTypeStage builder() { + return new Builder(); + } + + public interface ExternalMetadataTypeStage { + ExternalMetadataCreatedByStage externalMetadataType( + @NotNull ClientProfileApplyPolicyExternalMetadataTypeEnum externalMetadataType); + + Builder from(ClientProfileApplyPolicy other); + } + + public interface ExternalMetadataCreatedByStage { + _FinalStage externalMetadataCreatedBy( + @NotNull ClientProfileApplyPolicyExternalMetadataCreatedByEnum externalMetadataCreatedBy); + } + + public interface _FinalStage { + ClientProfileApplyPolicy build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ExternalMetadataTypeStage, ExternalMetadataCreatedByStage, _FinalStage { + private ClientProfileApplyPolicyExternalMetadataTypeEnum externalMetadataType; + + private ClientProfileApplyPolicyExternalMetadataCreatedByEnum externalMetadataCreatedBy; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientProfileApplyPolicy other) { + externalMetadataType(other.getExternalMetadataType()); + externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + return this; + } + + @java.lang.Override + @JsonSetter("external_metadata_type") + public ExternalMetadataCreatedByStage externalMetadataType( + @NotNull ClientProfileApplyPolicyExternalMetadataTypeEnum externalMetadataType) { + this.externalMetadataType = + Objects.requireNonNull(externalMetadataType, "externalMetadataType must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("external_metadata_created_by") + public _FinalStage externalMetadataCreatedBy( + @NotNull ClientProfileApplyPolicyExternalMetadataCreatedByEnum externalMetadataCreatedBy) { + this.externalMetadataCreatedBy = + Objects.requireNonNull(externalMetadataCreatedBy, "externalMetadataCreatedBy must not be null"); + return this; + } + + @java.lang.Override + public ClientProfileApplyPolicy build() { + return new ClientProfileApplyPolicy(externalMetadataType, externalMetadataCreatedBy, 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/ClientProfileApplyPolicyExternalMetadataCreatedByEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicyExternalMetadataCreatedByEnum.java new file mode 100644 index 00000000..1558ec8b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicyExternalMetadataCreatedByEnum.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 ClientProfileApplyPolicyExternalMetadataCreatedByEnum { + public static final ClientProfileApplyPolicyExternalMetadataCreatedByEnum CLIENT = + new ClientProfileApplyPolicyExternalMetadataCreatedByEnum(Value.CLIENT, "client"); + + private final Value value; + + private final String string; + + ClientProfileApplyPolicyExternalMetadataCreatedByEnum(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 ClientProfileApplyPolicyExternalMetadataCreatedByEnum + && this.string.equals(((ClientProfileApplyPolicyExternalMetadataCreatedByEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CLIENT: + return visitor.visitClient(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientProfileApplyPolicyExternalMetadataCreatedByEnum valueOf(String value) { + switch (value) { + case "client": + return CLIENT; + default: + return new ClientProfileApplyPolicyExternalMetadataCreatedByEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT, + + UNKNOWN + } + + public interface Visitor { + T visitClient(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicyExternalMetadataTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicyExternalMetadataTypeEnum.java new file mode 100644 index 00000000..e234dbc7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileApplyPolicyExternalMetadataTypeEnum.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 ClientProfileApplyPolicyExternalMetadataTypeEnum { + public static final ClientProfileApplyPolicyExternalMetadataTypeEnum CIMD = + new ClientProfileApplyPolicyExternalMetadataTypeEnum(Value.CIMD, "cimd"); + + private final Value value; + + private final String string; + + ClientProfileApplyPolicyExternalMetadataTypeEnum(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 ClientProfileApplyPolicyExternalMetadataTypeEnum + && this.string.equals(((ClientProfileApplyPolicyExternalMetadataTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CIMD: + return visitor.visitCimd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientProfileApplyPolicyExternalMetadataTypeEnum valueOf(String value) { + switch (value) { + case "cimd": + return CIMD; + default: + return new ClientProfileApplyPolicyExternalMetadataTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CIMD, + + UNKNOWN + } + + public interface Visitor { + T visitCimd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfiguration.java new file mode 100644 index 00000000..4b9e8ee7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfiguration.java @@ -0,0 +1,250 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfiguration.Builder.class) +public final class ClientProfileClientConfiguration { + private final Optional refreshToken; + + private final Optional organizationUsage; + + private final Optional organizationRequireBehavior; + + private final Optional organizationDiscoveryMethods; + + private final Optional requireProofOfPossession; + + private final Optional oidcSupport; + + private final Map additionalProperties; + + private ClientProfileClientConfiguration( + Optional refreshToken, + Optional organizationUsage, + Optional organizationRequireBehavior, + Optional organizationDiscoveryMethods, + Optional requireProofOfPossession, + Optional oidcSupport, + Map additionalProperties) { + this.refreshToken = refreshToken; + this.organizationUsage = organizationUsage; + this.organizationRequireBehavior = organizationRequireBehavior; + this.organizationDiscoveryMethods = organizationDiscoveryMethods; + this.requireProofOfPossession = requireProofOfPossession; + this.oidcSupport = oidcSupport; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("refresh_token") + public Optional getRefreshToken() { + return refreshToken; + } + + @JsonProperty("organization_usage") + public Optional getOrganizationUsage() { + return organizationUsage; + } + + @JsonProperty("organization_require_behavior") + public Optional getOrganizationRequireBehavior() { + return organizationRequireBehavior; + } + + @JsonProperty("organization_discovery_methods") + public Optional getOrganizationDiscoveryMethods() { + return organizationDiscoveryMethods; + } + + @JsonProperty("require_proof_of_possession") + public Optional getRequireProofOfPossession() { + return requireProofOfPossession; + } + + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfiguration && equalTo((ClientProfileClientConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfiguration other) { + return refreshToken.equals(other.refreshToken) + && organizationUsage.equals(other.organizationUsage) + && organizationRequireBehavior.equals(other.organizationRequireBehavior) + && organizationDiscoveryMethods.equals(other.organizationDiscoveryMethods) + && requireProofOfPossession.equals(other.requireProofOfPossession) + && oidcSupport.equals(other.oidcSupport); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.refreshToken, + this.organizationUsage, + this.organizationRequireBehavior, + this.organizationDiscoveryMethods, + this.requireProofOfPossession, + this.oidcSupport); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional refreshToken = Optional.empty(); + + private Optional organizationUsage = Optional.empty(); + + private Optional organizationRequireBehavior = + Optional.empty(); + + private Optional organizationDiscoveryMethods = + Optional.empty(); + + private Optional requireProofOfPossession = + Optional.empty(); + + private Optional oidcSupport = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileClientConfiguration other) { + refreshToken(other.getRefreshToken()); + organizationUsage(other.getOrganizationUsage()); + organizationRequireBehavior(other.getOrganizationRequireBehavior()); + organizationDiscoveryMethods(other.getOrganizationDiscoveryMethods()); + requireProofOfPossession(other.getRequireProofOfPossession()); + oidcSupport(other.getOidcSupport()); + return this; + } + + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) + public Builder refreshToken(Optional refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + public Builder refreshToken(ClientProfileClientConfigurationRefreshToken refreshToken) { + this.refreshToken = Optional.ofNullable(refreshToken); + return this; + } + + @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) + public Builder organizationUsage( + Optional organizationUsage) { + this.organizationUsage = organizationUsage; + return this; + } + + public Builder organizationUsage(ClientProfileClientConfigurationOrganizationUsage organizationUsage) { + this.organizationUsage = Optional.ofNullable(organizationUsage); + return this; + } + + @JsonSetter(value = "organization_require_behavior", nulls = Nulls.SKIP) + public Builder organizationRequireBehavior( + Optional organizationRequireBehavior) { + this.organizationRequireBehavior = organizationRequireBehavior; + return this; + } + + public Builder organizationRequireBehavior( + ClientProfileClientConfigurationOrganizationRequireBehavior organizationRequireBehavior) { + this.organizationRequireBehavior = Optional.ofNullable(organizationRequireBehavior); + return this; + } + + @JsonSetter(value = "organization_discovery_methods", nulls = Nulls.SKIP) + public Builder organizationDiscoveryMethods( + Optional organizationDiscoveryMethods) { + this.organizationDiscoveryMethods = organizationDiscoveryMethods; + return this; + } + + public Builder organizationDiscoveryMethods( + ClientProfileClientConfigurationOrganizationDiscoveryMethods organizationDiscoveryMethods) { + this.organizationDiscoveryMethods = Optional.ofNullable(organizationDiscoveryMethods); + return this; + } + + @JsonSetter(value = "require_proof_of_possession", nulls = Nulls.SKIP) + public Builder requireProofOfPossession( + Optional requireProofOfPossession) { + this.requireProofOfPossession = requireProofOfPossession; + return this; + } + + public Builder requireProofOfPossession( + ClientProfileClientConfigurationRequireProofOfPossession requireProofOfPossession) { + this.requireProofOfPossession = Optional.ofNullable(requireProofOfPossession); + return this; + } + + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientProfileClientConfigurationOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + + public ClientProfileClientConfiguration build() { + return new ClientProfileClientConfiguration( + refreshToken, + organizationUsage, + organizationRequireBehavior, + organizationDiscoveryMethods, + requireProofOfPossession, + oidcSupport, + 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/ClientProfileClientConfigurationOidcSupport.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupport.java new file mode 100644 index 00000000..68d16406 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupport.java @@ -0,0 +1,121 @@ +/** + * 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 = ClientProfileClientConfigurationOidcSupport.Builder.class) +public final class ClientProfileClientConfigurationOidcSupport { + private final ClientProfileClientConfigurationOidcSupportDefaultValue defaultValue; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationOidcSupport( + ClientProfileClientConfigurationOidcSupportDefaultValue defaultValue, + Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public ClientProfileClientConfigurationOidcSupportDefaultValue getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationOidcSupport + && equalTo((ClientProfileClientConfigurationOidcSupport) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationOidcSupport other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DefaultValueStage builder() { + return new Builder(); + } + + public interface DefaultValueStage { + _FinalStage defaultValue(@NotNull ClientProfileClientConfigurationOidcSupportDefaultValue defaultValue); + + Builder from(ClientProfileClientConfigurationOidcSupport other); + } + + public interface _FinalStage { + ClientProfileClientConfigurationOidcSupport build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements DefaultValueStage, _FinalStage { + private ClientProfileClientConfigurationOidcSupportDefaultValue defaultValue; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientProfileClientConfigurationOidcSupport other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @java.lang.Override + @JsonSetter("default_value") + public _FinalStage defaultValue(@NotNull ClientProfileClientConfigurationOidcSupportDefaultValue defaultValue) { + this.defaultValue = Objects.requireNonNull(defaultValue, "defaultValue must not be null"); + return this; + } + + @java.lang.Override + public ClientProfileClientConfigurationOidcSupport build() { + return new ClientProfileClientConfigurationOidcSupport(defaultValue, 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/ClientProfileClientConfigurationOidcSupportAllowedScopesEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupportAllowedScopesEnum.java new file mode 100644 index 00000000..7732bf13 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupportAllowedScopesEnum.java @@ -0,0 +1,109 @@ +/** + * 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 ClientProfileClientConfigurationOidcSupportAllowedScopesEnum { + public static final ClientProfileClientConfigurationOidcSupportAllowedScopesEnum EMAIL = + new ClientProfileClientConfigurationOidcSupportAllowedScopesEnum(Value.EMAIL, "email"); + + public static final ClientProfileClientConfigurationOidcSupportAllowedScopesEnum PHONE = + new ClientProfileClientConfigurationOidcSupportAllowedScopesEnum(Value.PHONE, "phone"); + + public static final ClientProfileClientConfigurationOidcSupportAllowedScopesEnum PROFILE = + new ClientProfileClientConfigurationOidcSupportAllowedScopesEnum(Value.PROFILE, "profile"); + + public static final ClientProfileClientConfigurationOidcSupportAllowedScopesEnum ADDRESS = + new ClientProfileClientConfigurationOidcSupportAllowedScopesEnum(Value.ADDRESS, "address"); + + private final Value value; + + private final String string; + + ClientProfileClientConfigurationOidcSupportAllowedScopesEnum(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 ClientProfileClientConfigurationOidcSupportAllowedScopesEnum + && this.string.equals( + ((ClientProfileClientConfigurationOidcSupportAllowedScopesEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case PHONE: + return visitor.visitPhone(); + case PROFILE: + return visitor.visitProfile(); + case ADDRESS: + return visitor.visitAddress(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientProfileClientConfigurationOidcSupportAllowedScopesEnum valueOf(String value) { + switch (value) { + case "email": + return EMAIL; + case "phone": + return PHONE; + case "profile": + return PROFILE; + case "address": + return ADDRESS; + default: + return new ClientProfileClientConfigurationOidcSupportAllowedScopesEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PROFILE, + + EMAIL, + + ADDRESS, + + PHONE, + + UNKNOWN + } + + public interface Visitor { + T visitProfile(); + + T visitEmail(); + + T visitAddress(); + + T visitPhone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupportDefaultValue.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupportDefaultValue.java new file mode 100644 index 00000000..d4c2bfed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOidcSupportDefaultValue.java @@ -0,0 +1,224 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfigurationOidcSupportDefaultValue.Builder.class) +public final class ClientProfileClientConfigurationOidcSupportDefaultValue { + private final boolean isAllowed; + + private final Optional allowAllScopes; + + private final Optional> allowedScopes; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationOidcSupportDefaultValue( + boolean isAllowed, + Optional allowAllScopes, + Optional> allowedScopes, + Map additionalProperties) { + this.isAllowed = isAllowed; + this.allowAllScopes = allowAllScopes; + this.allowedScopes = allowedScopes; + this.additionalProperties = additionalProperties; + } + + /** + * @return Allows matched clients to use OIDC, including receiving ID tokens and calling the UserInfo endpoint. + */ + @JsonProperty("is_allowed") + public boolean getIsAllowed() { + return isAllowed; + } + + /** + * @return Allows matched clients to request all supported OIDC scopes. Mutually exclusive with allowed_scopes. + */ + @JsonProperty("allow_all_scopes") + public Optional getAllowAllScopes() { + return allowAllScopes; + } + + /** + * @return OIDC scopes matched clients may request (profile, email, address, and phone), which determine the user profile information they can access. Mutually exclusive with allow_all_scopes. + */ + @JsonProperty("allowed_scopes") + public Optional> getAllowedScopes() { + return allowedScopes; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationOidcSupportDefaultValue + && equalTo((ClientProfileClientConfigurationOidcSupportDefaultValue) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationOidcSupportDefaultValue other) { + return isAllowed == other.isAllowed + && allowAllScopes.equals(other.allowAllScopes) + && allowedScopes.equals(other.allowedScopes); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isAllowed, this.allowAllScopes, this.allowedScopes); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IsAllowedStage builder() { + return new Builder(); + } + + public interface IsAllowedStage { + /** + *

                                                              Allows matched clients to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + */ + _FinalStage isAllowed(boolean isAllowed); + + Builder from(ClientProfileClientConfigurationOidcSupportDefaultValue other); + } + + public interface _FinalStage { + ClientProfileClientConfigurationOidcSupportDefaultValue build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Allows matched clients to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

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

                                                              OIDC scopes matched clients may request (profile, email, address, and phone), which determine the user profile information they can access. Mutually exclusive with allow_all_scopes.

                                                              + */ + _FinalStage allowedScopes( + Optional> allowedScopes); + + _FinalStage allowedScopes(List allowedScopes); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IsAllowedStage, _FinalStage { + private boolean isAllowed; + + private Optional> allowedScopes = + Optional.empty(); + + private Optional allowAllScopes = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ClientProfileClientConfigurationOidcSupportDefaultValue other) { + isAllowed(other.getIsAllowed()); + allowAllScopes(other.getAllowAllScopes()); + allowedScopes(other.getAllowedScopes()); + return this; + } + + /** + *

                                                              Allows matched clients to use OIDC, including receiving ID tokens and calling the UserInfo endpoint.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_allowed") + public _FinalStage isAllowed(boolean isAllowed) { + this.isAllowed = isAllowed; + return this; + } + + /** + *

                                                              OIDC scopes matched clients may request (profile, email, address, and phone), which determine the user profile information they can access. Mutually exclusive with allow_all_scopes.

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

                                                              OIDC scopes matched clients may request (profile, email, address, and phone), which determine the user profile information they can access. Mutually exclusive with allow_all_scopes.

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

                                                              Allows matched clients to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

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

                                                              Allows matched clients to request all supported OIDC scopes. Mutually exclusive with allowed_scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_all_scopes", nulls = Nulls.SKIP) + public _FinalStage allowAllScopes(Optional allowAllScopes) { + this.allowAllScopes = allowAllScopes; + return this; + } + + @java.lang.Override + public ClientProfileClientConfigurationOidcSupportDefaultValue build() { + return new ClientProfileClientConfigurationOidcSupportDefaultValue( + isAllowed, allowAllScopes, allowedScopes, 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/ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum.java new file mode 100644 index 00000000..70ec60f6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum.java @@ -0,0 +1,88 @@ +/** + * 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 ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum { + public static final ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum EMAIL = + new ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum(Value.EMAIL, "email"); + + public static final ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum ORGANIZATION_NAME = + new ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum( + Value.ORGANIZATION_NAME, "organization_name"); + + private final Value value; + + private final String string; + + ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum(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 ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum + && this.string.equals( + ((ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case ORGANIZATION_NAME: + return visitor.visitOrganizationName(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum valueOf(String value) { + switch (value) { + case "email": + return EMAIL; + case "organization_name": + return ORGANIZATION_NAME; + default: + return new ClientProfileClientConfigurationOrganizationDiscoveryMethodEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + ORGANIZATION_NAME, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitOrganizationName(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationDiscoveryMethods.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationDiscoveryMethods.java new file mode 100644 index 00000000..947b58b1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationDiscoveryMethods.java @@ -0,0 +1,112 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfigurationOrganizationDiscoveryMethods.Builder.class) +public final class ClientProfileClientConfigurationOrganizationDiscoveryMethods { + private final Optional> defaultValue; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationOrganizationDiscoveryMethods( + Optional> defaultValue, + Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional> getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationOrganizationDiscoveryMethods + && equalTo((ClientProfileClientConfigurationOrganizationDiscoveryMethods) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationOrganizationDiscoveryMethods other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> defaultValue = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileClientConfigurationOrganizationDiscoveryMethods other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue( + Optional> defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue( + List defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileClientConfigurationOrganizationDiscoveryMethods build() { + return new ClientProfileClientConfigurationOrganizationDiscoveryMethods(defaultValue, 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/ClientProfileClientConfigurationOrganizationRequireBehavior.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationRequireBehavior.java new file mode 100644 index 00000000..ba6323e5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationRequireBehavior.java @@ -0,0 +1,110 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfigurationOrganizationRequireBehavior.Builder.class) +public final class ClientProfileClientConfigurationOrganizationRequireBehavior { + private final Optional defaultValue; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationOrganizationRequireBehavior( + Optional defaultValue, + Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationOrganizationRequireBehavior + && equalTo((ClientProfileClientConfigurationOrganizationRequireBehavior) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationOrganizationRequireBehavior other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional defaultValue = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileClientConfigurationOrganizationRequireBehavior other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue( + Optional defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue(ClientProfileClientConfigurationOrganizationRequireBehaviorEnum defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileClientConfigurationOrganizationRequireBehavior build() { + return new ClientProfileClientConfigurationOrganizationRequireBehavior(defaultValue, 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/ClientProfileClientConfigurationOrganizationRequireBehaviorEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationRequireBehaviorEnum.java new file mode 100644 index 00000000..827fccea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationRequireBehaviorEnum.java @@ -0,0 +1,100 @@ +/** + * 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 ClientProfileClientConfigurationOrganizationRequireBehaviorEnum { + public static final ClientProfileClientConfigurationOrganizationRequireBehaviorEnum POST_LOGIN_PROMPT = + new ClientProfileClientConfigurationOrganizationRequireBehaviorEnum( + Value.POST_LOGIN_PROMPT, "post_login_prompt"); + + public static final ClientProfileClientConfigurationOrganizationRequireBehaviorEnum PRE_LOGIN_PROMPT = + new ClientProfileClientConfigurationOrganizationRequireBehaviorEnum( + Value.PRE_LOGIN_PROMPT, "pre_login_prompt"); + + public static final ClientProfileClientConfigurationOrganizationRequireBehaviorEnum NO_PROMPT = + new ClientProfileClientConfigurationOrganizationRequireBehaviorEnum(Value.NO_PROMPT, "no_prompt"); + + private final Value value; + + private final String string; + + ClientProfileClientConfigurationOrganizationRequireBehaviorEnum(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 ClientProfileClientConfigurationOrganizationRequireBehaviorEnum + && this.string.equals( + ((ClientProfileClientConfigurationOrganizationRequireBehaviorEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case POST_LOGIN_PROMPT: + return visitor.visitPostLoginPrompt(); + case PRE_LOGIN_PROMPT: + return visitor.visitPreLoginPrompt(); + case NO_PROMPT: + return visitor.visitNoPrompt(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientProfileClientConfigurationOrganizationRequireBehaviorEnum valueOf(String value) { + switch (value) { + case "post_login_prompt": + return POST_LOGIN_PROMPT; + case "pre_login_prompt": + return PRE_LOGIN_PROMPT; + case "no_prompt": + return NO_PROMPT; + default: + return new ClientProfileClientConfigurationOrganizationRequireBehaviorEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + NO_PROMPT, + + PRE_LOGIN_PROMPT, + + POST_LOGIN_PROMPT, + + UNKNOWN + } + + public interface Visitor { + T visitNoPrompt(); + + T visitPreLoginPrompt(); + + T visitPostLoginPrompt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationUsage.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationUsage.java new file mode 100644 index 00000000..a94e8b9d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationUsage.java @@ -0,0 +1,108 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfigurationOrganizationUsage.Builder.class) +public final class ClientProfileClientConfigurationOrganizationUsage { + private final Optional defaultValue; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationOrganizationUsage( + Optional defaultValue, + Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationOrganizationUsage + && equalTo((ClientProfileClientConfigurationOrganizationUsage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationOrganizationUsage other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional defaultValue = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileClientConfigurationOrganizationUsage other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue(Optional defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue(ClientProfileClientConfigurationOrganizationUsageEnum defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileClientConfigurationOrganizationUsage build() { + return new ClientProfileClientConfigurationOrganizationUsage(defaultValue, 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/ClientProfileClientConfigurationOrganizationUsageEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationUsageEnum.java new file mode 100644 index 00000000..9b4f525a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationOrganizationUsageEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class ClientProfileClientConfigurationOrganizationUsageEnum { + public static final ClientProfileClientConfigurationOrganizationUsageEnum ALLOW = + new ClientProfileClientConfigurationOrganizationUsageEnum(Value.ALLOW, "allow"); + + public static final ClientProfileClientConfigurationOrganizationUsageEnum REQUIRE = + new ClientProfileClientConfigurationOrganizationUsageEnum(Value.REQUIRE, "require"); + + public static final ClientProfileClientConfigurationOrganizationUsageEnum DENY = + new ClientProfileClientConfigurationOrganizationUsageEnum(Value.DENY, "deny"); + + private final Value value; + + private final String string; + + ClientProfileClientConfigurationOrganizationUsageEnum(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 ClientProfileClientConfigurationOrganizationUsageEnum + && this.string.equals(((ClientProfileClientConfigurationOrganizationUsageEnum) 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 REQUIRE: + return visitor.visitRequire(); + case DENY: + return visitor.visitDeny(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientProfileClientConfigurationOrganizationUsageEnum valueOf(String value) { + switch (value) { + case "allow": + return ALLOW; + case "require": + return REQUIRE; + case "deny": + return DENY; + default: + return new ClientProfileClientConfigurationOrganizationUsageEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DENY, + + ALLOW, + + REQUIRE, + + UNKNOWN + } + + public interface Visitor { + T visitDeny(); + + T visitAllow(); + + T visitRequire(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationRefreshToken.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationRefreshToken.java new file mode 100644 index 00000000..55272eb7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationRefreshToken.java @@ -0,0 +1,157 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfigurationRefreshToken.Builder.class) +public final class ClientProfileClientConfigurationRefreshToken { + private final Optional tokenLifetime; + + private final Optional idleTokenLifetime; + + private final Optional leeway; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationRefreshToken( + Optional tokenLifetime, + Optional idleTokenLifetime, + Optional leeway, + Map additionalProperties) { + this.tokenLifetime = tokenLifetime; + this.idleTokenLifetime = idleTokenLifetime; + this.leeway = leeway; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("token_lifetime") + public Optional getTokenLifetime() { + return tokenLifetime; + } + + @JsonProperty("idle_token_lifetime") + public Optional getIdleTokenLifetime() { + return idleTokenLifetime; + } + + @JsonProperty("leeway") + public Optional getLeeway() { + return leeway; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationRefreshToken + && equalTo((ClientProfileClientConfigurationRefreshToken) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationRefreshToken other) { + return tokenLifetime.equals(other.tokenLifetime) + && idleTokenLifetime.equals(other.idleTokenLifetime) + && leeway.equals(other.leeway); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.tokenLifetime, this.idleTokenLifetime, this.leeway); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional tokenLifetime = Optional.empty(); + + private Optional idleTokenLifetime = Optional.empty(); + + private Optional leeway = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileClientConfigurationRefreshToken other) { + tokenLifetime(other.getTokenLifetime()); + idleTokenLifetime(other.getIdleTokenLifetime()); + leeway(other.getLeeway()); + return this; + } + + @JsonSetter(value = "token_lifetime", nulls = Nulls.SKIP) + public Builder tokenLifetime(Optional tokenLifetime) { + this.tokenLifetime = tokenLifetime; + return this; + } + + public Builder tokenLifetime(ClientProfileRefreshTokenTokenLifetime tokenLifetime) { + this.tokenLifetime = Optional.ofNullable(tokenLifetime); + return this; + } + + @JsonSetter(value = "idle_token_lifetime", nulls = Nulls.SKIP) + public Builder idleTokenLifetime(Optional idleTokenLifetime) { + this.idleTokenLifetime = idleTokenLifetime; + return this; + } + + public Builder idleTokenLifetime(ClientProfileRefreshTokenIdleTokenLifetime idleTokenLifetime) { + this.idleTokenLifetime = Optional.ofNullable(idleTokenLifetime); + return this; + } + + @JsonSetter(value = "leeway", nulls = Nulls.SKIP) + public Builder leeway(Optional leeway) { + this.leeway = leeway; + return this; + } + + public Builder leeway(ClientProfileRefreshTokenLeeway leeway) { + this.leeway = Optional.ofNullable(leeway); + return this; + } + + public ClientProfileClientConfigurationRefreshToken build() { + return new ClientProfileClientConfigurationRefreshToken( + tokenLifetime, idleTokenLifetime, leeway, 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/ClientProfileClientConfigurationRequireProofOfPossession.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationRequireProofOfPossession.java new file mode 100644 index 00000000..f7966c07 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileClientConfigurationRequireProofOfPossession.java @@ -0,0 +1,107 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileClientConfigurationRequireProofOfPossession.Builder.class) +public final class ClientProfileClientConfigurationRequireProofOfPossession { + private final Optional defaultValue; + + private final Map additionalProperties; + + private ClientProfileClientConfigurationRequireProofOfPossession( + Optional defaultValue, Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileClientConfigurationRequireProofOfPossession + && equalTo((ClientProfileClientConfigurationRequireProofOfPossession) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileClientConfigurationRequireProofOfPossession other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional defaultValue = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileClientConfigurationRequireProofOfPossession other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue(Optional defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue(Boolean defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileClientConfigurationRequireProofOfPossession build() { + return new ClientProfileClientConfigurationRequireProofOfPossession(defaultValue, 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/ClientProfileRefreshTokenIdleTokenLifetime.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileRefreshTokenIdleTokenLifetime.java new file mode 100644 index 00000000..9a085832 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileRefreshTokenIdleTokenLifetime.java @@ -0,0 +1,107 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileRefreshTokenIdleTokenLifetime.Builder.class) +public final class ClientProfileRefreshTokenIdleTokenLifetime { + private final Optional defaultValue; + + private final Map additionalProperties; + + private ClientProfileRefreshTokenIdleTokenLifetime( + Optional defaultValue, Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileRefreshTokenIdleTokenLifetime + && equalTo((ClientProfileRefreshTokenIdleTokenLifetime) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileRefreshTokenIdleTokenLifetime other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional defaultValue = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileRefreshTokenIdleTokenLifetime other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue(Optional defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue(Integer defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileRefreshTokenIdleTokenLifetime build() { + return new ClientProfileRefreshTokenIdleTokenLifetime(defaultValue, 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/ClientProfileRefreshTokenLeeway.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileRefreshTokenLeeway.java new file mode 100644 index 00000000..3b6fa995 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileRefreshTokenLeeway.java @@ -0,0 +1,105 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileRefreshTokenLeeway.Builder.class) +public final class ClientProfileRefreshTokenLeeway { + private final Optional defaultValue; + + private final Map additionalProperties; + + private ClientProfileRefreshTokenLeeway(Optional defaultValue, Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileRefreshTokenLeeway && equalTo((ClientProfileRefreshTokenLeeway) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileRefreshTokenLeeway other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional defaultValue = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileRefreshTokenLeeway other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue(Optional defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue(Integer defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileRefreshTokenLeeway build() { + return new ClientProfileRefreshTokenLeeway(defaultValue, 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/ClientProfileRefreshTokenTokenLifetime.java b/src/main/java/com/auth0/client/mgmt/types/ClientProfileRefreshTokenTokenLifetime.java new file mode 100644 index 00000000..7ef1d9f3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientProfileRefreshTokenTokenLifetime.java @@ -0,0 +1,107 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientProfileRefreshTokenTokenLifetime.Builder.class) +public final class ClientProfileRefreshTokenTokenLifetime { + private final Optional defaultValue; + + private final Map additionalProperties; + + private ClientProfileRefreshTokenTokenLifetime( + Optional defaultValue, Map additionalProperties) { + this.defaultValue = defaultValue; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default_value") + public Optional getDefaultValue() { + return defaultValue; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientProfileRefreshTokenTokenLifetime + && equalTo((ClientProfileRefreshTokenTokenLifetime) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientProfileRefreshTokenTokenLifetime other) { + return defaultValue.equals(other.defaultValue); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.defaultValue); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional defaultValue = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientProfileRefreshTokenTokenLifetime other) { + defaultValue(other.getDefaultValue()); + return this; + } + + @JsonSetter(value = "default_value", nulls = Nulls.SKIP) + public Builder defaultValue(Optional defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public Builder defaultValue(Integer defaultValue) { + this.defaultValue = Optional.ofNullable(defaultValue); + return this; + } + + public ClientProfileRefreshTokenTokenLifetime build() { + return new ClientProfileRefreshTokenTokenLifetime(defaultValue, 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/ClientRefreshTokenPolicy.java b/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenPolicy.java index 27f41220..641092b2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenPolicy.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenPolicy.java @@ -124,7 +124,6 @@ public Builder from(ClientRefreshTokenPolicy other) { } /** - *

                                                              The identifier of the resource server to which the Multi Resource Refresh Token Policy applies

                                                              *

                                                              The identifier of the resource server to which the Multi Resource Refresh Token Policy applies

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSearchResponse.java b/src/main/java/com/auth0/client/mgmt/types/ClientSearchResponse.java new file mode 100644 index 00000000..5320aeb6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSearchResponse.java @@ -0,0 +1,2309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ClientSearchResponse.Builder.class) +public final class ClientSearchResponse { + private final Optional clientId; + + private final Optional createdAt; + + private final Optional updatedAt; + + private final Optional tenant; + + private final Optional name; + + private final Optional description; + + private final Optional global; + + private final Optional appType; + + private final Optional logoUri; + + private final Optional isFirstParty; + + private final Optional oidcConformant; + + private final Optional> callbacks; + + private final Optional> allowedOrigins; + + private final Optional> webOrigins; + + private final Optional> clientAliases; + + private final Optional> allowedClients; + + private final Optional> allowedLogoutUrls; + + private final OptionalNullable sessionTransfer; + + private final Optional oidcLogout; + + private final Optional> grantTypes; + + private final Optional jwtConfiguration; + + private final Optional sso; + + private final Optional ssoDisabled; + + private final Optional crossOriginAuthentication; + + private final Optional crossOriginLoc; + + private final Optional customLoginPageOn; + + private final Optional customLoginPage; + + private final Optional customLoginPagePreview; + + private final Optional formTemplate; + + private final Optional tokenEndpointAuthMethod; + + private final Optional isTokenEndpointIpHeaderTrusted; + + private final Optional> clientMetadata; + + private final Optional mobile; + + private final Optional initiateLoginUri; + + private final Optional nativeSocialLogin; + + private final Optional fedcmLogin; + + private final OptionalNullable refreshToken; + + private final OptionalNullable defaultOrganization; + + private final Optional organizationUsage; + + private final Optional organizationRequireBehavior; + + private final Optional> organizationDiscoveryMethods; + + private final OptionalNullable clientAuthenticationMethods; + + private final Optional requirePushedAuthorizationRequests; + + private final Optional requireProofOfPossession; + + private final Optional signedRequestObject; + + private final Optional tokenVaultPrivilegedAccess; + + private final OptionalNullable complianceLevel; + + private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; + + private final Optional tokenExchange; + + private final OptionalNullable parRequestExpiry; + + private final Optional tokenQuota; + + private final Optional expressConfiguration; + + private final Optional b2BIntegrationConfiguration; + + private final Optional myOrganizationConfiguration; + + private final Optional googleAccountLinking; + + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + + private final Optional thirdPartySecurityMode; + + private final Optional oidcSupport; + + private final Optional redirectionPolicy; + + private final Optional resourceServerIdentifier; + + private final Optional> asyncApprovalNotificationChannels; + + private final Optional externalMetadataType; + + private final Optional externalMetadataCreatedBy; + + private final Optional externalMetadataStatus; + + private final Optional agentId; + + private final Optional externalClientId; + + private final Optional jwksUri; + + private final Map additionalProperties; + + private ClientSearchResponse( + Optional clientId, + Optional createdAt, + Optional updatedAt, + Optional tenant, + Optional name, + Optional description, + Optional global, + Optional appType, + Optional logoUri, + Optional isFirstParty, + Optional oidcConformant, + Optional> callbacks, + Optional> allowedOrigins, + Optional> webOrigins, + Optional> clientAliases, + Optional> allowedClients, + Optional> allowedLogoutUrls, + OptionalNullable sessionTransfer, + Optional oidcLogout, + Optional> grantTypes, + Optional jwtConfiguration, + Optional sso, + Optional ssoDisabled, + Optional crossOriginAuthentication, + Optional crossOriginLoc, + Optional customLoginPageOn, + Optional customLoginPage, + Optional customLoginPagePreview, + Optional formTemplate, + Optional tokenEndpointAuthMethod, + Optional isTokenEndpointIpHeaderTrusted, + Optional> clientMetadata, + Optional mobile, + Optional initiateLoginUri, + Optional nativeSocialLogin, + Optional fedcmLogin, + OptionalNullable refreshToken, + OptionalNullable defaultOrganization, + Optional organizationUsage, + Optional organizationRequireBehavior, + Optional> organizationDiscoveryMethods, + OptionalNullable clientAuthenticationMethods, + Optional requirePushedAuthorizationRequests, + Optional requireProofOfPossession, + Optional signedRequestObject, + Optional tokenVaultPrivilegedAccess, + OptionalNullable complianceLevel, + Optional skipNonVerifiableCallbackUriConfirmationPrompt, + Optional tokenExchange, + OptionalNullable parRequestExpiry, + Optional tokenQuota, + Optional expressConfiguration, + Optional b2BIntegrationConfiguration, + Optional myOrganizationConfiguration, + Optional googleAccountLinking, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, + Optional thirdPartySecurityMode, + Optional oidcSupport, + Optional redirectionPolicy, + Optional resourceServerIdentifier, + Optional> asyncApprovalNotificationChannels, + Optional externalMetadataType, + Optional externalMetadataCreatedBy, + Optional externalMetadataStatus, + Optional agentId, + Optional externalClientId, + Optional jwksUri, + Map additionalProperties) { + this.clientId = clientId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.tenant = tenant; + this.name = name; + this.description = description; + this.global = global; + this.appType = appType; + this.logoUri = logoUri; + this.isFirstParty = isFirstParty; + this.oidcConformant = oidcConformant; + this.callbacks = callbacks; + this.allowedOrigins = allowedOrigins; + this.webOrigins = webOrigins; + this.clientAliases = clientAliases; + this.allowedClients = allowedClients; + this.allowedLogoutUrls = allowedLogoutUrls; + this.sessionTransfer = sessionTransfer; + this.oidcLogout = oidcLogout; + this.grantTypes = grantTypes; + this.jwtConfiguration = jwtConfiguration; + this.sso = sso; + this.ssoDisabled = ssoDisabled; + this.crossOriginAuthentication = crossOriginAuthentication; + this.crossOriginLoc = crossOriginLoc; + this.customLoginPageOn = customLoginPageOn; + this.customLoginPage = customLoginPage; + this.customLoginPagePreview = customLoginPagePreview; + this.formTemplate = formTemplate; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; + this.clientMetadata = clientMetadata; + this.mobile = mobile; + this.initiateLoginUri = initiateLoginUri; + this.nativeSocialLogin = nativeSocialLogin; + this.fedcmLogin = fedcmLogin; + this.refreshToken = refreshToken; + this.defaultOrganization = defaultOrganization; + this.organizationUsage = organizationUsage; + this.organizationRequireBehavior = organizationRequireBehavior; + this.organizationDiscoveryMethods = organizationDiscoveryMethods; + this.clientAuthenticationMethods = clientAuthenticationMethods; + this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; + this.requireProofOfPossession = requireProofOfPossession; + this.signedRequestObject = signedRequestObject; + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + this.complianceLevel = complianceLevel; + this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; + this.tokenExchange = tokenExchange; + this.parRequestExpiry = parRequestExpiry; + this.tokenQuota = tokenQuota; + this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + this.thirdPartySecurityMode = thirdPartySecurityMode; + this.oidcSupport = oidcSupport; + this.redirectionPolicy = redirectionPolicy; + this.resourceServerIdentifier = resourceServerIdentifier; + this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; + this.externalMetadataType = externalMetadataType; + this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.externalMetadataStatus = externalMetadataStatus; + this.agentId = agentId; + this.externalClientId = externalClientId; + this.jwksUri = jwksUri; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of this client. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + /** + * @return The ISO 8601 timestamp of when this client was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp of when this client was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + + /** + * @return Name of the tenant this client belongs to. + */ + @JsonProperty("tenant") + public Optional getTenant() { + return tenant; + } + + /** + * @return Name of this client (min length: 1 character, does not allow < or >). + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Free text description of this client (max length: 140 characters). + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false). + */ + @JsonProperty("global") + public Optional getGlobal() { + return global; + } + + @JsonProperty("app_type") + public Optional getAppType() { + return appType; + } + + /** + * @return URL of the logo to display for this client. Recommended size is 150x150 pixels. + */ + @JsonProperty("logo_uri") + public Optional getLogoUri() { + return logoUri; + } + + /** + * @return Whether this client a first party client (true) or not (false). + */ + @JsonProperty("is_first_party") + public Optional getIsFirstParty() { + return isFirstParty; + } + + /** + * @return Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false). + */ + @JsonProperty("oidc_conformant") + public Optional getOidcConformant() { + return oidcConformant; + } + + /** + * @return Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication. + */ + @JsonProperty("callbacks") + public Optional> getCallbacks() { + return callbacks; + } + + /** + * @return Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs. + */ + @JsonProperty("allowed_origins") + public Optional> getAllowedOrigins() { + return allowedOrigins; + } + + /** + * @return Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode. + */ + @JsonProperty("web_origins") + public Optional> getWebOrigins() { + return webOrigins; + } + + /** + * @return List of audiences/realms for SAML protocol. Used by the wsfed addon. + */ + @JsonProperty("client_aliases") + public Optional> getClientAliases() { + return clientAliases; + } + + /** + * @return List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed. + */ + @JsonProperty("allowed_clients") + public Optional> getAllowedClients() { + return allowedClients; + } + + /** + * @return Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. + */ + @JsonProperty("allowed_logout_urls") + public Optional> getAllowedLogoutUrls() { + return allowedLogoutUrls; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("session_transfer") + public OptionalNullable getSessionTransfer() { + if (sessionTransfer == null) { + return OptionalNullable.absent(); + } + return sessionTransfer; + } + + @JsonProperty("oidc_logout") + public Optional getOidcLogout() { + return oidcLogout; + } + + /** + * @return List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, urn:ietf:params:oauth:grant-type:device_code, and urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token. + */ + @JsonProperty("grant_types") + public Optional> getGrantTypes() { + return grantTypes; + } + + @JsonProperty("jwt_configuration") + public Optional getJwtConfiguration() { + return jwtConfiguration; + } + + /** + * @return Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). + */ + @JsonProperty("sso") + public Optional getSso() { + return sso; + } + + /** + * @return Whether Single Sign On is disabled (true) or enabled (true). Defaults to true. + */ + @JsonProperty("sso_disabled") + public Optional getSsoDisabled() { + return ssoDisabled; + } + + /** + * @return Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). + */ + @JsonProperty("cross_origin_authentication") + public Optional getCrossOriginAuthentication() { + return crossOriginAuthentication; + } + + /** + * @return URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page. + */ + @JsonProperty("cross_origin_loc") + public Optional getCrossOriginLoc() { + return crossOriginLoc; + } + + /** + * @return Whether a custom login page is to be used (true) or the default provided login page (false). + */ + @JsonProperty("custom_login_page_on") + public Optional getCustomLoginPageOn() { + return customLoginPageOn; + } + + /** + * @return The content (HTML, CSS, JS) of the custom login page. + */ + @JsonProperty("custom_login_page") + public Optional getCustomLoginPage() { + return customLoginPage; + } + + /** + * @return The content (HTML, CSS, JS) of the custom login page. (Used on Previews) + */ + @JsonProperty("custom_login_page_preview") + public Optional getCustomLoginPagePreview() { + return customLoginPagePreview; + } + + /** + * @return HTML form template to be used for WS-Federation. + */ + @JsonProperty("form_template") + public Optional getFormTemplate() { + return formTemplate; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + /** + * @return If true, trust that the IP specified in the auth0-forwarded-for header is the end-user's IP for brute-force-protection on token endpoint. + */ + @JsonProperty("is_token_endpoint_ip_header_trusted") + public Optional getIsTokenEndpointIpHeaderTrusted() { + return isTokenEndpointIpHeaderTrusted; + } + + @JsonProperty("client_metadata") + public Optional> getClientMetadata() { + return clientMetadata; + } + + @JsonProperty("mobile") + public Optional getMobile() { + return mobile; + } + + /** + * @return Initiate login uri, must be https + */ + @JsonProperty("initiate_login_uri") + public Optional getInitiateLoginUri() { + return initiateLoginUri; + } + + @JsonProperty("native_social_login") + public Optional getNativeSocialLogin() { + return nativeSocialLogin; + } + + @JsonProperty("fedcm_login") + public Optional getFedcmLogin() { + return fedcmLogin; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("refresh_token") + public OptionalNullable getRefreshToken() { + if (refreshToken == null) { + return OptionalNullable.absent(); + } + return refreshToken; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_organization") + public OptionalNullable getDefaultOrganization() { + if (defaultOrganization == null) { + return OptionalNullable.absent(); + } + return defaultOrganization; + } + + @JsonProperty("organization_usage") + public Optional getOrganizationUsage() { + return organizationUsage; + } + + @JsonProperty("organization_require_behavior") + public Optional getOrganizationRequireBehavior() { + return organizationRequireBehavior; + } + + /** + * @return Defines the available methods for organization discovery during the pre_login_prompt. Users can discover their organization either by email, organization_name or both. + */ + @JsonProperty("organization_discovery_methods") + public Optional> getOrganizationDiscoveryMethods() { + return organizationDiscoveryMethods; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_authentication_methods") + public OptionalNullable getClientAuthenticationMethods() { + if (clientAuthenticationMethods == null) { + return OptionalNullable.absent(); + } + return clientAuthenticationMethods; + } + + /** + * @return Makes the use of Pushed Authorization Requests mandatory for this client + */ + @JsonProperty("require_pushed_authorization_requests") + public Optional getRequirePushedAuthorizationRequests() { + return requirePushedAuthorizationRequests; + } + + /** + * @return Makes the use of Proof-of-Possession mandatory for this client + */ + @JsonProperty("require_proof_of_possession") + public Optional getRequireProofOfPossession() { + return requireProofOfPossession; + } + + @JsonProperty("signed_request_object") + public Optional getSignedRequestObject() { + return signedRequestObject; + } + + @JsonProperty("token_vault_privileged_access") + public Optional getTokenVaultPrivilegedAccess() { + return tokenVaultPrivilegedAccess; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("compliance_level") + public OptionalNullable getComplianceLevel() { + if (complianceLevel == null) { + return OptionalNullable.absent(); + } + return complianceLevel; + } + + /** + * @return Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") + public Optional getSkipNonVerifiableCallbackUriConfirmationPrompt() { + return skipNonVerifiableCallbackUriConfirmationPrompt; + } + + @JsonProperty("token_exchange") + public Optional getTokenExchange() { + return tokenExchange; + } + + /** + * @return Specifies how long, in seconds, a Pushed Authorization Request URI remains valid + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("par_request_expiry") + public OptionalNullable getParRequestExpiry() { + if (parRequestExpiry == null) { + return OptionalNullable.absent(); + } + return parRequestExpiry; + } + + @JsonProperty("token_quota") + public Optional getTokenQuota() { + return tokenQuota; + } + + @JsonProperty("express_configuration") + public Optional getExpressConfiguration() { + return expressConfiguration; + } + + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + + @JsonProperty("my_organization_configuration") + public Optional getMyOrganizationConfiguration() { + return myOrganizationConfiguration; + } + + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + + @JsonProperty("third_party_security_mode") + public Optional getThirdPartySecurityMode() { + return thirdPartySecurityMode; + } + + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + + @JsonProperty("redirection_policy") + public Optional getRedirectionPolicy() { + return redirectionPolicy; + } + + /** + * @return The identifier of the resource server that this client is linked to. + */ + @JsonProperty("resource_server_identifier") + public Optional getResourceServerIdentifier() { + return resourceServerIdentifier; + } + + @JsonProperty("async_approval_notification_channels") + public Optional> getAsyncApprovalNotificationChannels() { + return asyncApprovalNotificationChannels; + } + + @JsonProperty("external_metadata_type") + public Optional getExternalMetadataType() { + return externalMetadataType; + } + + @JsonProperty("external_metadata_created_by") + public Optional getExternalMetadataCreatedBy() { + return externalMetadataCreatedBy; + } + + @JsonProperty("external_metadata_status") + public Optional getExternalMetadataStatus() { + return externalMetadataStatus; + } + + /** + * @return ID of the agent associated with this client. + */ + @JsonProperty("agent_id") + public Optional getAgentId() { + return agentId; + } + + /** + * @return An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers. + */ + @JsonProperty("external_client_id") + public Optional getExternalClientId() { + return externalClientId; + } + + /** + * @return URL for the JSON Web Key Set (JWKS) containing the public keys used for private_key_jwt authentication. Only present for CIMD clients using private_key_jwt authentication. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("session_transfer") + private OptionalNullable _getSessionTransfer() { + return sessionTransfer; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("refresh_token") + private OptionalNullable _getRefreshToken() { + return refreshToken; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_organization") + private OptionalNullable _getDefaultOrganization() { + return defaultOrganization; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_authentication_methods") + private OptionalNullable _getClientAuthenticationMethods() { + return clientAuthenticationMethods; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("compliance_level") + private OptionalNullable _getComplianceLevel() { + return complianceLevel; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("par_request_expiry") + private OptionalNullable _getParRequestExpiry() { + return parRequestExpiry; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ClientSearchResponse && equalTo((ClientSearchResponse) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ClientSearchResponse other) { + return clientId.equals(other.clientId) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && tenant.equals(other.tenant) + && name.equals(other.name) + && description.equals(other.description) + && global.equals(other.global) + && appType.equals(other.appType) + && logoUri.equals(other.logoUri) + && isFirstParty.equals(other.isFirstParty) + && oidcConformant.equals(other.oidcConformant) + && callbacks.equals(other.callbacks) + && allowedOrigins.equals(other.allowedOrigins) + && webOrigins.equals(other.webOrigins) + && clientAliases.equals(other.clientAliases) + && allowedClients.equals(other.allowedClients) + && allowedLogoutUrls.equals(other.allowedLogoutUrls) + && sessionTransfer.equals(other.sessionTransfer) + && oidcLogout.equals(other.oidcLogout) + && grantTypes.equals(other.grantTypes) + && jwtConfiguration.equals(other.jwtConfiguration) + && sso.equals(other.sso) + && ssoDisabled.equals(other.ssoDisabled) + && crossOriginAuthentication.equals(other.crossOriginAuthentication) + && crossOriginLoc.equals(other.crossOriginLoc) + && customLoginPageOn.equals(other.customLoginPageOn) + && customLoginPage.equals(other.customLoginPage) + && customLoginPagePreview.equals(other.customLoginPagePreview) + && formTemplate.equals(other.formTemplate) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) + && clientMetadata.equals(other.clientMetadata) + && mobile.equals(other.mobile) + && initiateLoginUri.equals(other.initiateLoginUri) + && nativeSocialLogin.equals(other.nativeSocialLogin) + && fedcmLogin.equals(other.fedcmLogin) + && refreshToken.equals(other.refreshToken) + && defaultOrganization.equals(other.defaultOrganization) + && organizationUsage.equals(other.organizationUsage) + && organizationRequireBehavior.equals(other.organizationRequireBehavior) + && organizationDiscoveryMethods.equals(other.organizationDiscoveryMethods) + && clientAuthenticationMethods.equals(other.clientAuthenticationMethods) + && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) + && requireProofOfPossession.equals(other.requireProofOfPossession) + && signedRequestObject.equals(other.signedRequestObject) + && tokenVaultPrivilegedAccess.equals(other.tokenVaultPrivilegedAccess) + && complianceLevel.equals(other.complianceLevel) + && skipNonVerifiableCallbackUriConfirmationPrompt.equals( + other.skipNonVerifiableCallbackUriConfirmationPrompt) + && tokenExchange.equals(other.tokenExchange) + && parRequestExpiry.equals(other.parRequestExpiry) + && tokenQuota.equals(other.tokenQuota) + && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) + && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) + && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && oidcSupport.equals(other.oidcSupport) + && redirectionPolicy.equals(other.redirectionPolicy) + && resourceServerIdentifier.equals(other.resourceServerIdentifier) + && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) + && externalMetadataType.equals(other.externalMetadataType) + && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) + && externalMetadataStatus.equals(other.externalMetadataStatus) + && agentId.equals(other.agentId) + && externalClientId.equals(other.externalClientId) + && jwksUri.equals(other.jwksUri); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.clientId, + this.createdAt, + this.updatedAt, + this.tenant, + this.name, + this.description, + this.global, + this.appType, + this.logoUri, + this.isFirstParty, + this.oidcConformant, + this.callbacks, + this.allowedOrigins, + this.webOrigins, + this.clientAliases, + this.allowedClients, + this.allowedLogoutUrls, + this.sessionTransfer, + this.oidcLogout, + this.grantTypes, + this.jwtConfiguration, + this.sso, + this.ssoDisabled, + this.crossOriginAuthentication, + this.crossOriginLoc, + this.customLoginPageOn, + this.customLoginPage, + this.customLoginPagePreview, + this.formTemplate, + this.tokenEndpointAuthMethod, + this.isTokenEndpointIpHeaderTrusted, + this.clientMetadata, + this.mobile, + this.initiateLoginUri, + this.nativeSocialLogin, + this.fedcmLogin, + this.refreshToken, + this.defaultOrganization, + this.organizationUsage, + this.organizationRequireBehavior, + this.organizationDiscoveryMethods, + this.clientAuthenticationMethods, + this.requirePushedAuthorizationRequests, + this.requireProofOfPossession, + this.signedRequestObject, + this.tokenVaultPrivilegedAccess, + this.complianceLevel, + this.skipNonVerifiableCallbackUriConfirmationPrompt, + this.tokenExchange, + this.parRequestExpiry, + this.tokenQuota, + this.expressConfiguration, + this.b2BIntegrationConfiguration, + this.myOrganizationConfiguration, + this.googleAccountLinking, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, + this.thirdPartySecurityMode, + this.oidcSupport, + this.redirectionPolicy, + this.resourceServerIdentifier, + this.asyncApprovalNotificationChannels, + this.externalMetadataType, + this.externalMetadataCreatedBy, + this.externalMetadataStatus, + this.agentId, + this.externalClientId, + this.jwksUri); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientId = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional tenant = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional global = Optional.empty(); + + private Optional appType = Optional.empty(); + + private Optional logoUri = Optional.empty(); + + private Optional isFirstParty = Optional.empty(); + + private Optional oidcConformant = Optional.empty(); + + private Optional> callbacks = Optional.empty(); + + private Optional> allowedOrigins = Optional.empty(); + + private Optional> webOrigins = Optional.empty(); + + private Optional> clientAliases = Optional.empty(); + + private Optional> allowedClients = Optional.empty(); + + private Optional> allowedLogoutUrls = Optional.empty(); + + private OptionalNullable sessionTransfer = OptionalNullable.absent(); + + private Optional oidcLogout = Optional.empty(); + + private Optional> grantTypes = Optional.empty(); + + private Optional jwtConfiguration = Optional.empty(); + + private Optional sso = Optional.empty(); + + private Optional ssoDisabled = Optional.empty(); + + private Optional crossOriginAuthentication = Optional.empty(); + + private Optional crossOriginLoc = Optional.empty(); + + private Optional customLoginPageOn = Optional.empty(); + + private Optional customLoginPage = Optional.empty(); + + private Optional customLoginPagePreview = Optional.empty(); + + private Optional formTemplate = Optional.empty(); + + private Optional tokenEndpointAuthMethod = Optional.empty(); + + private Optional isTokenEndpointIpHeaderTrusted = Optional.empty(); + + private Optional> clientMetadata = Optional.empty(); + + private Optional mobile = Optional.empty(); + + private Optional initiateLoginUri = Optional.empty(); + + private Optional nativeSocialLogin = Optional.empty(); + + private Optional fedcmLogin = Optional.empty(); + + private OptionalNullable refreshToken = OptionalNullable.absent(); + + private OptionalNullable defaultOrganization = OptionalNullable.absent(); + + private Optional organizationUsage = Optional.empty(); + + private Optional organizationRequireBehavior = Optional.empty(); + + private Optional> organizationDiscoveryMethods = Optional.empty(); + + private OptionalNullable clientAuthenticationMethods = OptionalNullable.absent(); + + private Optional requirePushedAuthorizationRequests = Optional.empty(); + + private Optional requireProofOfPossession = Optional.empty(); + + private Optional signedRequestObject = Optional.empty(); + + private Optional tokenVaultPrivilegedAccess = + Optional.empty(); + + private OptionalNullable complianceLevel = OptionalNullable.absent(); + + private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); + + private Optional tokenExchange = Optional.empty(); + + private OptionalNullable parRequestExpiry = OptionalNullable.absent(); + + private Optional tokenQuota = Optional.empty(); + + private Optional expressConfiguration = Optional.empty(); + + private Optional b2BIntegrationConfiguration = Optional.empty(); + + private Optional myOrganizationConfiguration = Optional.empty(); + + private Optional googleAccountLinking = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + + private Optional thirdPartySecurityMode = Optional.empty(); + + private Optional oidcSupport = Optional.empty(); + + private Optional redirectionPolicy = Optional.empty(); + + private Optional resourceServerIdentifier = Optional.empty(); + + private Optional> asyncApprovalNotificationChannels = + Optional.empty(); + + private Optional externalMetadataType = Optional.empty(); + + private Optional externalMetadataCreatedBy = Optional.empty(); + + private Optional externalMetadataStatus = Optional.empty(); + + private Optional agentId = Optional.empty(); + + private Optional externalClientId = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ClientSearchResponse other) { + clientId(other.getClientId()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + tenant(other.getTenant()); + name(other.getName()); + description(other.getDescription()); + global(other.getGlobal()); + appType(other.getAppType()); + logoUri(other.getLogoUri()); + isFirstParty(other.getIsFirstParty()); + oidcConformant(other.getOidcConformant()); + callbacks(other.getCallbacks()); + allowedOrigins(other.getAllowedOrigins()); + webOrigins(other.getWebOrigins()); + clientAliases(other.getClientAliases()); + allowedClients(other.getAllowedClients()); + allowedLogoutUrls(other.getAllowedLogoutUrls()); + sessionTransfer(other.getSessionTransfer()); + oidcLogout(other.getOidcLogout()); + grantTypes(other.getGrantTypes()); + jwtConfiguration(other.getJwtConfiguration()); + sso(other.getSso()); + ssoDisabled(other.getSsoDisabled()); + crossOriginAuthentication(other.getCrossOriginAuthentication()); + crossOriginLoc(other.getCrossOriginLoc()); + customLoginPageOn(other.getCustomLoginPageOn()); + customLoginPage(other.getCustomLoginPage()); + customLoginPagePreview(other.getCustomLoginPagePreview()); + formTemplate(other.getFormTemplate()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); + clientMetadata(other.getClientMetadata()); + mobile(other.getMobile()); + initiateLoginUri(other.getInitiateLoginUri()); + nativeSocialLogin(other.getNativeSocialLogin()); + fedcmLogin(other.getFedcmLogin()); + refreshToken(other.getRefreshToken()); + defaultOrganization(other.getDefaultOrganization()); + organizationUsage(other.getOrganizationUsage()); + organizationRequireBehavior(other.getOrganizationRequireBehavior()); + organizationDiscoveryMethods(other.getOrganizationDiscoveryMethods()); + clientAuthenticationMethods(other.getClientAuthenticationMethods()); + requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); + requireProofOfPossession(other.getRequireProofOfPossession()); + signedRequestObject(other.getSignedRequestObject()); + tokenVaultPrivilegedAccess(other.getTokenVaultPrivilegedAccess()); + complianceLevel(other.getComplianceLevel()); + skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); + tokenExchange(other.getTokenExchange()); + parRequestExpiry(other.getParRequestExpiry()); + tokenQuota(other.getTokenQuota()); + expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); + myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); + thirdPartySecurityMode(other.getThirdPartySecurityMode()); + oidcSupport(other.getOidcSupport()); + redirectionPolicy(other.getRedirectionPolicy()); + resourceServerIdentifier(other.getResourceServerIdentifier()); + asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); + externalMetadataType(other.getExternalMetadataType()); + externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + externalMetadataStatus(other.getExternalMetadataStatus()); + agentId(other.getAgentId()); + externalClientId(other.getExternalClientId()); + jwksUri(other.getJwksUri()); + return this; + } + + /** + *

                                                              ID of this client.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was created.

                                                              + */ + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public Builder createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was last updated.

                                                              + */ + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public Builder updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + *

                                                              Name of the tenant this client belongs to.

                                                              + */ + @JsonSetter(value = "tenant", nulls = Nulls.SKIP) + public Builder tenant(Optional tenant) { + this.tenant = tenant; + return this; + } + + public Builder tenant(String tenant) { + this.tenant = Optional.ofNullable(tenant); + return this; + } + + /** + *

                                                              Name of this client (min length: 1 character, does not allow < or >).

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Free text description of this client (max length: 140 characters).

                                                              + */ + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; + return this; + } + + public Builder description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + /** + *

                                                              Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false).

                                                              + */ + @JsonSetter(value = "global", nulls = Nulls.SKIP) + public Builder global(Optional global) { + this.global = global; + return this; + } + + public Builder global(Boolean global) { + this.global = Optional.ofNullable(global); + return this; + } + + @JsonSetter(value = "app_type", nulls = Nulls.SKIP) + public Builder appType(Optional appType) { + this.appType = appType; + return this; + } + + public Builder appType(ClientAppTypeEnum appType) { + this.appType = Optional.ofNullable(appType); + return this; + } + + /** + *

                                                              URL of the logo to display for this client. Recommended size is 150x150 pixels.

                                                              + */ + @JsonSetter(value = "logo_uri", nulls = Nulls.SKIP) + public Builder logoUri(Optional logoUri) { + this.logoUri = logoUri; + return this; + } + + public Builder logoUri(String logoUri) { + this.logoUri = Optional.ofNullable(logoUri); + return this; + } + + /** + *

                                                              Whether this client a first party client (true) or not (false).

                                                              + */ + @JsonSetter(value = "is_first_party", nulls = Nulls.SKIP) + public Builder isFirstParty(Optional isFirstParty) { + this.isFirstParty = isFirstParty; + return this; + } + + public Builder isFirstParty(Boolean isFirstParty) { + this.isFirstParty = Optional.ofNullable(isFirstParty); + return this; + } + + /** + *

                                                              Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false).

                                                              + */ + @JsonSetter(value = "oidc_conformant", nulls = Nulls.SKIP) + public Builder oidcConformant(Optional oidcConformant) { + this.oidcConformant = oidcConformant; + return this; + } + + public Builder oidcConformant(Boolean oidcConformant) { + this.oidcConformant = Optional.ofNullable(oidcConformant); + return this; + } + + /** + *

                                                              Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.

                                                              + */ + @JsonSetter(value = "callbacks", nulls = Nulls.SKIP) + public Builder callbacks(Optional> callbacks) { + this.callbacks = callbacks; + return this; + } + + public Builder callbacks(List callbacks) { + this.callbacks = Optional.ofNullable(callbacks); + return this; + } + + /** + *

                                                              Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs.

                                                              + */ + @JsonSetter(value = "allowed_origins", nulls = Nulls.SKIP) + public Builder allowedOrigins(Optional> allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + public Builder allowedOrigins(List allowedOrigins) { + this.allowedOrigins = Optional.ofNullable(allowedOrigins); + return this; + } + + /** + *

                                                              Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode.

                                                              + */ + @JsonSetter(value = "web_origins", nulls = Nulls.SKIP) + public Builder webOrigins(Optional> webOrigins) { + this.webOrigins = webOrigins; + return this; + } + + public Builder webOrigins(List webOrigins) { + this.webOrigins = Optional.ofNullable(webOrigins); + return this; + } + + /** + *

                                                              List of audiences/realms for SAML protocol. Used by the wsfed addon.

                                                              + */ + @JsonSetter(value = "client_aliases", nulls = Nulls.SKIP) + public Builder clientAliases(Optional> clientAliases) { + this.clientAliases = clientAliases; + return this; + } + + public Builder clientAliases(List clientAliases) { + this.clientAliases = Optional.ofNullable(clientAliases); + return this; + } + + /** + *

                                                              List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.

                                                              + */ + @JsonSetter(value = "allowed_clients", nulls = Nulls.SKIP) + public Builder allowedClients(Optional> allowedClients) { + this.allowedClients = allowedClients; + return this; + } + + public Builder allowedClients(List allowedClients) { + this.allowedClients = Optional.ofNullable(allowedClients); + return this; + } + + /** + *

                                                              Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.

                                                              + */ + @JsonSetter(value = "allowed_logout_urls", nulls = Nulls.SKIP) + public Builder allowedLogoutUrls(Optional> allowedLogoutUrls) { + this.allowedLogoutUrls = allowedLogoutUrls; + return this; + } + + public Builder allowedLogoutUrls(List allowedLogoutUrls) { + this.allowedLogoutUrls = Optional.ofNullable(allowedLogoutUrls); + return this; + } + + @JsonSetter(value = "session_transfer", nulls = Nulls.SKIP) + public Builder sessionTransfer(@Nullable OptionalNullable sessionTransfer) { + this.sessionTransfer = sessionTransfer; + return this; + } + + public Builder sessionTransfer(ClientSessionTransferConfiguration sessionTransfer) { + this.sessionTransfer = OptionalNullable.of(sessionTransfer); + return this; + } + + public Builder sessionTransfer(Optional sessionTransfer) { + if (sessionTransfer.isPresent()) { + this.sessionTransfer = OptionalNullable.of(sessionTransfer.get()); + } else { + this.sessionTransfer = OptionalNullable.absent(); + } + return this; + } + + public Builder sessionTransfer( + com.auth0.client.mgmt.core.Nullable sessionTransfer) { + if (sessionTransfer.isNull()) { + this.sessionTransfer = OptionalNullable.ofNull(); + } else if (sessionTransfer.isEmpty()) { + this.sessionTransfer = OptionalNullable.absent(); + } else { + this.sessionTransfer = OptionalNullable.of(sessionTransfer.get()); + } + return this; + } + + @JsonSetter(value = "oidc_logout", nulls = Nulls.SKIP) + public Builder oidcLogout(Optional oidcLogout) { + this.oidcLogout = oidcLogout; + return this; + } + + public Builder oidcLogout(ClientOidcBackchannelLogoutSettings oidcLogout) { + this.oidcLogout = Optional.ofNullable(oidcLogout); + return this; + } + + /** + *

                                                              List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, urn:ietf:params:oauth:grant-type:device_code, and urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token.

                                                              + */ + @JsonSetter(value = "grant_types", nulls = Nulls.SKIP) + public Builder grantTypes(Optional> grantTypes) { + this.grantTypes = grantTypes; + return this; + } + + public Builder grantTypes(List grantTypes) { + this.grantTypes = Optional.ofNullable(grantTypes); + return this; + } + + @JsonSetter(value = "jwt_configuration", nulls = Nulls.SKIP) + public Builder jwtConfiguration(Optional jwtConfiguration) { + this.jwtConfiguration = jwtConfiguration; + return this; + } + + public Builder jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { + this.jwtConfiguration = Optional.ofNullable(jwtConfiguration); + return this; + } + + /** + *

                                                              Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).

                                                              + */ + @JsonSetter(value = "sso", nulls = Nulls.SKIP) + public Builder sso(Optional sso) { + this.sso = sso; + return this; + } + + public Builder sso(Boolean sso) { + this.sso = Optional.ofNullable(sso); + return this; + } + + /** + *

                                                              Whether Single Sign On is disabled (true) or enabled (true). Defaults to true.

                                                              + */ + @JsonSetter(value = "sso_disabled", nulls = Nulls.SKIP) + public Builder ssoDisabled(Optional ssoDisabled) { + this.ssoDisabled = ssoDisabled; + return this; + } + + public Builder ssoDisabled(Boolean ssoDisabled) { + this.ssoDisabled = Optional.ofNullable(ssoDisabled); + return this; + } + + /** + *

                                                              Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).

                                                              + */ + @JsonSetter(value = "cross_origin_authentication", nulls = Nulls.SKIP) + public Builder crossOriginAuthentication(Optional crossOriginAuthentication) { + this.crossOriginAuthentication = crossOriginAuthentication; + return this; + } + + public Builder crossOriginAuthentication(Boolean crossOriginAuthentication) { + this.crossOriginAuthentication = Optional.ofNullable(crossOriginAuthentication); + return this; + } + + /** + *

                                                              URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page.

                                                              + */ + @JsonSetter(value = "cross_origin_loc", nulls = Nulls.SKIP) + public Builder crossOriginLoc(Optional crossOriginLoc) { + this.crossOriginLoc = crossOriginLoc; + return this; + } + + public Builder crossOriginLoc(String crossOriginLoc) { + this.crossOriginLoc = Optional.ofNullable(crossOriginLoc); + return this; + } + + /** + *

                                                              Whether a custom login page is to be used (true) or the default provided login page (false).

                                                              + */ + @JsonSetter(value = "custom_login_page_on", nulls = Nulls.SKIP) + public Builder customLoginPageOn(Optional customLoginPageOn) { + this.customLoginPageOn = customLoginPageOn; + return this; + } + + public Builder customLoginPageOn(Boolean customLoginPageOn) { + this.customLoginPageOn = Optional.ofNullable(customLoginPageOn); + return this; + } + + /** + *

                                                              The content (HTML, CSS, JS) of the custom login page.

                                                              + */ + @JsonSetter(value = "custom_login_page", nulls = Nulls.SKIP) + public Builder customLoginPage(Optional customLoginPage) { + this.customLoginPage = customLoginPage; + return this; + } + + public Builder customLoginPage(String customLoginPage) { + this.customLoginPage = Optional.ofNullable(customLoginPage); + return this; + } + + /** + *

                                                              The content (HTML, CSS, JS) of the custom login page. (Used on Previews)

                                                              + */ + @JsonSetter(value = "custom_login_page_preview", nulls = Nulls.SKIP) + public Builder customLoginPagePreview(Optional customLoginPagePreview) { + this.customLoginPagePreview = customLoginPagePreview; + return this; + } + + public Builder customLoginPagePreview(String customLoginPagePreview) { + this.customLoginPagePreview = Optional.ofNullable(customLoginPagePreview); + return this; + } + + /** + *

                                                              HTML form template to be used for WS-Federation.

                                                              + */ + @JsonSetter(value = "form_template", nulls = Nulls.SKIP) + public Builder formTemplate(Optional formTemplate) { + this.formTemplate = formTemplate; + return this; + } + + public Builder formTemplate(String formTemplate) { + this.formTemplate = Optional.ofNullable(formTemplate); + return this; + } + + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthMethod(Optional tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + public Builder tokenEndpointAuthMethod(ClientTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + /** + *

                                                              If true, trust that the IP specified in the auth0-forwarded-for header is the end-user's IP for brute-force-protection on token endpoint.

                                                              + */ + @JsonSetter(value = "is_token_endpoint_ip_header_trusted", nulls = Nulls.SKIP) + public Builder isTokenEndpointIpHeaderTrusted(Optional isTokenEndpointIpHeaderTrusted) { + this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; + return this; + } + + public Builder isTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) { + this.isTokenEndpointIpHeaderTrusted = Optional.ofNullable(isTokenEndpointIpHeaderTrusted); + return this; + } + + @JsonSetter(value = "client_metadata", nulls = Nulls.SKIP) + public Builder clientMetadata(Optional> clientMetadata) { + this.clientMetadata = clientMetadata; + return this; + } + + public Builder clientMetadata(Map clientMetadata) { + this.clientMetadata = Optional.ofNullable(clientMetadata); + return this; + } + + @JsonSetter(value = "mobile", nulls = Nulls.SKIP) + public Builder mobile(Optional mobile) { + this.mobile = mobile; + return this; + } + + public Builder mobile(ClientMobile mobile) { + this.mobile = Optional.ofNullable(mobile); + return this; + } + + /** + *

                                                              Initiate login uri, must be https

                                                              + */ + @JsonSetter(value = "initiate_login_uri", nulls = Nulls.SKIP) + public Builder initiateLoginUri(Optional initiateLoginUri) { + this.initiateLoginUri = initiateLoginUri; + return this; + } + + public Builder initiateLoginUri(String initiateLoginUri) { + this.initiateLoginUri = Optional.ofNullable(initiateLoginUri); + return this; + } + + @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) + public Builder nativeSocialLogin(Optional nativeSocialLogin) { + this.nativeSocialLogin = nativeSocialLogin; + return this; + } + + public Builder nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { + this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); + return this; + } + + @JsonSetter(value = "fedcm_login", nulls = Nulls.SKIP) + public Builder fedcmLogin(Optional fedcmLogin) { + this.fedcmLogin = fedcmLogin; + return this; + } + + public Builder fedcmLogin(FedCmLogin fedcmLogin) { + this.fedcmLogin = Optional.ofNullable(fedcmLogin); + return this; + } + + @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) + public Builder refreshToken(@Nullable OptionalNullable refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + public Builder refreshToken(ClientRefreshTokenConfiguration refreshToken) { + this.refreshToken = OptionalNullable.of(refreshToken); + return this; + } + + public Builder refreshToken(Optional refreshToken) { + if (refreshToken.isPresent()) { + this.refreshToken = OptionalNullable.of(refreshToken.get()); + } else { + this.refreshToken = OptionalNullable.absent(); + } + return this; + } + + public Builder refreshToken(com.auth0.client.mgmt.core.Nullable refreshToken) { + if (refreshToken.isNull()) { + this.refreshToken = OptionalNullable.ofNull(); + } else if (refreshToken.isEmpty()) { + this.refreshToken = OptionalNullable.absent(); + } else { + this.refreshToken = OptionalNullable.of(refreshToken.get()); + } + return this; + } + + @JsonSetter(value = "default_organization", nulls = Nulls.SKIP) + public Builder defaultOrganization(@Nullable OptionalNullable defaultOrganization) { + this.defaultOrganization = defaultOrganization; + return this; + } + + public Builder defaultOrganization(ClientDefaultOrganization defaultOrganization) { + this.defaultOrganization = OptionalNullable.of(defaultOrganization); + return this; + } + + public Builder defaultOrganization(Optional defaultOrganization) { + if (defaultOrganization.isPresent()) { + this.defaultOrganization = OptionalNullable.of(defaultOrganization.get()); + } else { + this.defaultOrganization = OptionalNullable.absent(); + } + return this; + } + + public Builder defaultOrganization( + com.auth0.client.mgmt.core.Nullable defaultOrganization) { + if (defaultOrganization.isNull()) { + this.defaultOrganization = OptionalNullable.ofNull(); + } else if (defaultOrganization.isEmpty()) { + this.defaultOrganization = OptionalNullable.absent(); + } else { + this.defaultOrganization = OptionalNullable.of(defaultOrganization.get()); + } + return this; + } + + @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) + public Builder organizationUsage(Optional organizationUsage) { + this.organizationUsage = organizationUsage; + return this; + } + + public Builder organizationUsage(ClientOrganizationUsageEnum organizationUsage) { + this.organizationUsage = Optional.ofNullable(organizationUsage); + return this; + } + + @JsonSetter(value = "organization_require_behavior", nulls = Nulls.SKIP) + public Builder organizationRequireBehavior( + Optional organizationRequireBehavior) { + this.organizationRequireBehavior = organizationRequireBehavior; + return this; + } + + public Builder organizationRequireBehavior(ClientOrganizationRequireBehaviorEnum organizationRequireBehavior) { + this.organizationRequireBehavior = Optional.ofNullable(organizationRequireBehavior); + return this; + } + + /** + *

                                                              Defines the available methods for organization discovery during the pre_login_prompt. Users can discover their organization either by email, organization_name or both.

                                                              + */ + @JsonSetter(value = "organization_discovery_methods", nulls = Nulls.SKIP) + public Builder organizationDiscoveryMethods( + Optional> organizationDiscoveryMethods) { + this.organizationDiscoveryMethods = organizationDiscoveryMethods; + return this; + } + + public Builder organizationDiscoveryMethods( + List organizationDiscoveryMethods) { + this.organizationDiscoveryMethods = Optional.ofNullable(organizationDiscoveryMethods); + return this; + } + + @JsonSetter(value = "client_authentication_methods", nulls = Nulls.SKIP) + public Builder clientAuthenticationMethods( + @Nullable OptionalNullable clientAuthenticationMethods) { + this.clientAuthenticationMethods = clientAuthenticationMethods; + return this; + } + + public Builder clientAuthenticationMethods(ClientAuthenticationMethod clientAuthenticationMethods) { + this.clientAuthenticationMethods = OptionalNullable.of(clientAuthenticationMethods); + return this; + } + + public Builder clientAuthenticationMethods(Optional clientAuthenticationMethods) { + if (clientAuthenticationMethods.isPresent()) { + this.clientAuthenticationMethods = OptionalNullable.of(clientAuthenticationMethods.get()); + } else { + this.clientAuthenticationMethods = OptionalNullable.absent(); + } + return this; + } + + public Builder clientAuthenticationMethods( + com.auth0.client.mgmt.core.Nullable clientAuthenticationMethods) { + if (clientAuthenticationMethods.isNull()) { + this.clientAuthenticationMethods = OptionalNullable.ofNull(); + } else if (clientAuthenticationMethods.isEmpty()) { + this.clientAuthenticationMethods = OptionalNullable.absent(); + } else { + this.clientAuthenticationMethods = OptionalNullable.of(clientAuthenticationMethods.get()); + } + return this; + } + + /** + *

                                                              Makes the use of Pushed Authorization Requests mandatory for this client

                                                              + */ + @JsonSetter(value = "require_pushed_authorization_requests", nulls = Nulls.SKIP) + public Builder requirePushedAuthorizationRequests(Optional requirePushedAuthorizationRequests) { + this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; + return this; + } + + public Builder requirePushedAuthorizationRequests(Boolean requirePushedAuthorizationRequests) { + this.requirePushedAuthorizationRequests = Optional.ofNullable(requirePushedAuthorizationRequests); + return this; + } + + /** + *

                                                              Makes the use of Proof-of-Possession mandatory for this client

                                                              + */ + @JsonSetter(value = "require_proof_of_possession", nulls = Nulls.SKIP) + public Builder requireProofOfPossession(Optional requireProofOfPossession) { + this.requireProofOfPossession = requireProofOfPossession; + return this; + } + + public Builder requireProofOfPossession(Boolean requireProofOfPossession) { + this.requireProofOfPossession = Optional.ofNullable(requireProofOfPossession); + return this; + } + + @JsonSetter(value = "signed_request_object", nulls = Nulls.SKIP) + public Builder signedRequestObject(Optional signedRequestObject) { + this.signedRequestObject = signedRequestObject; + return this; + } + + public Builder signedRequestObject(ClientSignedRequestObjectWithCredentialId signedRequestObject) { + this.signedRequestObject = Optional.ofNullable(signedRequestObject); + return this; + } + + @JsonSetter(value = "token_vault_privileged_access", nulls = Nulls.SKIP) + public Builder tokenVaultPrivilegedAccess( + Optional tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = tokenVaultPrivilegedAccess; + return this; + } + + public Builder tokenVaultPrivilegedAccess( + ClientTokenVaultPrivilegedAccessWithCredentialId tokenVaultPrivilegedAccess) { + this.tokenVaultPrivilegedAccess = Optional.ofNullable(tokenVaultPrivilegedAccess); + return this; + } + + @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) + public Builder complianceLevel(@Nullable OptionalNullable complianceLevel) { + this.complianceLevel = complianceLevel; + return this; + } + + public Builder complianceLevel(ClientComplianceLevelEnum complianceLevel) { + this.complianceLevel = OptionalNullable.of(complianceLevel); + return this; + } + + public Builder complianceLevel(Optional complianceLevel) { + if (complianceLevel.isPresent()) { + this.complianceLevel = OptionalNullable.of(complianceLevel.get()); + } else { + this.complianceLevel = OptionalNullable.absent(); + } + return this; + } + + public Builder complianceLevel(com.auth0.client.mgmt.core.Nullable complianceLevel) { + if (complianceLevel.isNull()) { + this.complianceLevel = OptionalNullable.ofNull(); + } else if (complianceLevel.isEmpty()) { + this.complianceLevel = OptionalNullable.absent(); + } else { + this.complianceLevel = OptionalNullable.of(complianceLevel.get()); + } + return this; + } + + /** + *

                                                              Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information.

                                                              + */ + @JsonSetter(value = "skip_non_verifiable_callback_uri_confirmation_prompt", nulls = Nulls.SKIP) + public Builder skipNonVerifiableCallbackUriConfirmationPrompt( + Optional skipNonVerifiableCallbackUriConfirmationPrompt) { + this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; + return this; + } + + public Builder skipNonVerifiableCallbackUriConfirmationPrompt( + Boolean skipNonVerifiableCallbackUriConfirmationPrompt) { + this.skipNonVerifiableCallbackUriConfirmationPrompt = + Optional.ofNullable(skipNonVerifiableCallbackUriConfirmationPrompt); + return this; + } + + @JsonSetter(value = "token_exchange", nulls = Nulls.SKIP) + public Builder tokenExchange(Optional tokenExchange) { + this.tokenExchange = tokenExchange; + return this; + } + + public Builder tokenExchange(ClientTokenExchangeConfiguration tokenExchange) { + this.tokenExchange = Optional.ofNullable(tokenExchange); + return this; + } + + /** + *

                                                              Specifies how long, in seconds, a Pushed Authorization Request URI remains valid

                                                              + */ + @JsonSetter(value = "par_request_expiry", nulls = Nulls.SKIP) + public Builder parRequestExpiry(@Nullable OptionalNullable parRequestExpiry) { + this.parRequestExpiry = parRequestExpiry; + return this; + } + + public Builder parRequestExpiry(Integer parRequestExpiry) { + this.parRequestExpiry = OptionalNullable.of(parRequestExpiry); + return this; + } + + public Builder parRequestExpiry(Optional parRequestExpiry) { + if (parRequestExpiry.isPresent()) { + this.parRequestExpiry = OptionalNullable.of(parRequestExpiry.get()); + } else { + this.parRequestExpiry = OptionalNullable.absent(); + } + return this; + } + + public Builder parRequestExpiry(com.auth0.client.mgmt.core.Nullable parRequestExpiry) { + if (parRequestExpiry.isNull()) { + this.parRequestExpiry = OptionalNullable.ofNull(); + } else if (parRequestExpiry.isEmpty()) { + this.parRequestExpiry = OptionalNullable.absent(); + } else { + this.parRequestExpiry = OptionalNullable.of(parRequestExpiry.get()); + } + return this; + } + + @JsonSetter(value = "token_quota", nulls = Nulls.SKIP) + public Builder tokenQuota(Optional tokenQuota) { + this.tokenQuota = tokenQuota; + return this; + } + + public Builder tokenQuota(TokenQuota tokenQuota) { + this.tokenQuota = Optional.ofNullable(tokenQuota); + return this; + } + + @JsonSetter(value = "express_configuration", nulls = Nulls.SKIP) + public Builder expressConfiguration(Optional expressConfiguration) { + this.expressConfiguration = expressConfiguration; + return this; + } + + public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { + this.expressConfiguration = Optional.ofNullable(expressConfiguration); + return this; + } + + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) + public Builder myOrganizationConfiguration( + Optional myOrganizationConfiguration) { + this.myOrganizationConfiguration = myOrganizationConfiguration; + return this; + } + + public Builder myOrganizationConfiguration( + ClientMyOrganizationResponseConfiguration myOrganizationConfiguration) { + this.myOrganizationConfiguration = Optional.ofNullable(myOrganizationConfiguration); + return this; + } + + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking(Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfiguration googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + IdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(AnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) + public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { + this.thirdPartySecurityMode = thirdPartySecurityMode; + return this; + } + + public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode) { + this.thirdPartySecurityMode = Optional.ofNullable(thirdPartySecurityMode); + return this; + } + + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) + public Builder redirectionPolicy(Optional redirectionPolicy) { + this.redirectionPolicy = redirectionPolicy; + return this; + } + + public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) { + this.redirectionPolicy = Optional.ofNullable(redirectionPolicy); + return this; + } + + /** + *

                                                              The identifier of the resource server that this client is linked to.

                                                              + */ + @JsonSetter(value = "resource_server_identifier", nulls = Nulls.SKIP) + public Builder resourceServerIdentifier(Optional resourceServerIdentifier) { + this.resourceServerIdentifier = resourceServerIdentifier; + return this; + } + + public Builder resourceServerIdentifier(String resourceServerIdentifier) { + this.resourceServerIdentifier = Optional.ofNullable(resourceServerIdentifier); + return this; + } + + @JsonSetter(value = "async_approval_notification_channels", nulls = Nulls.SKIP) + public Builder asyncApprovalNotificationChannels( + Optional> asyncApprovalNotificationChannels) { + this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; + return this; + } + + public Builder asyncApprovalNotificationChannels( + List asyncApprovalNotificationChannels) { + this.asyncApprovalNotificationChannels = Optional.ofNullable(asyncApprovalNotificationChannels); + return this; + } + + @JsonSetter(value = "external_metadata_type", nulls = Nulls.SKIP) + public Builder externalMetadataType(Optional externalMetadataType) { + this.externalMetadataType = externalMetadataType; + return this; + } + + public Builder externalMetadataType(ClientExternalMetadataTypeEnum externalMetadataType) { + this.externalMetadataType = Optional.ofNullable(externalMetadataType); + return this; + } + + @JsonSetter(value = "external_metadata_created_by", nulls = Nulls.SKIP) + public Builder externalMetadataCreatedBy( + Optional externalMetadataCreatedBy) { + this.externalMetadataCreatedBy = externalMetadataCreatedBy; + return this; + } + + public Builder externalMetadataCreatedBy(ClientExternalMetadataCreatedByEnum externalMetadataCreatedBy) { + this.externalMetadataCreatedBy = Optional.ofNullable(externalMetadataCreatedBy); + return this; + } + + @JsonSetter(value = "external_metadata_status", nulls = Nulls.SKIP) + public Builder externalMetadataStatus(Optional externalMetadataStatus) { + this.externalMetadataStatus = externalMetadataStatus; + return this; + } + + public Builder externalMetadataStatus(ClientExternalMetadataStatusEnum externalMetadataStatus) { + this.externalMetadataStatus = Optional.ofNullable(externalMetadataStatus); + return this; + } + + /** + *

                                                              ID of the agent associated with this client.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(Optional agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = Optional.ofNullable(agentId); + return this; + } + + /** + *

                                                              An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers.

                                                              + */ + @JsonSetter(value = "external_client_id", nulls = Nulls.SKIP) + public Builder externalClientId(Optional externalClientId) { + this.externalClientId = externalClientId; + return this; + } + + public Builder externalClientId(String externalClientId) { + this.externalClientId = Optional.ofNullable(externalClientId); + return this; + } + + /** + *

                                                              URL for the JSON Web Key Set (JWKS) containing the public keys used for private_key_jwt authentication. Only present for CIMD clients using private_key_jwt authentication.

                                                              + */ + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public Builder jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + public Builder jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + public ClientSearchResponse build() { + return new ClientSearchResponse( + clientId, + createdAt, + updatedAt, + tenant, + name, + description, + global, + appType, + logoUri, + isFirstParty, + oidcConformant, + callbacks, + allowedOrigins, + webOrigins, + clientAliases, + allowedClients, + allowedLogoutUrls, + sessionTransfer, + oidcLogout, + grantTypes, + jwtConfiguration, + sso, + ssoDisabled, + crossOriginAuthentication, + crossOriginLoc, + customLoginPageOn, + customLoginPage, + customLoginPagePreview, + formTemplate, + tokenEndpointAuthMethod, + isTokenEndpointIpHeaderTrusted, + clientMetadata, + mobile, + initiateLoginUri, + nativeSocialLogin, + fedcmLogin, + refreshToken, + defaultOrganization, + organizationUsage, + organizationRequireBehavior, + organizationDiscoveryMethods, + clientAuthenticationMethods, + requirePushedAuthorizationRequests, + requireProofOfPossession, + signedRequestObject, + tokenVaultPrivilegedAccess, + complianceLevel, + skipNonVerifiableCallbackUriConfirmationPrompt, + tokenExchange, + parRequestExpiry, + tokenQuota, + expressConfiguration, + b2BIntegrationConfiguration, + myOrganizationConfiguration, + googleAccountLinking, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, + thirdPartySecurityMode, + oidcSupport, + redirectionPolicy, + resourceServerIdentifier, + asyncApprovalNotificationChannels, + externalMetadataType, + externalMetadataCreatedBy, + externalMetadataStatus, + agentId, + externalClientId, + jwksUri, + 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/ClientSessionTransferDelegationDeviceBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationDeviceBindingEnum.java index cd0c1ed0..b7669906 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationDeviceBindingEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDelegationDeviceBindingEnum.java @@ -7,9 +7,6 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ClientSessionTransferDelegationDeviceBindingEnum { - public static final ClientSessionTransferDelegationDeviceBindingEnum ASN = - new ClientSessionTransferDelegationDeviceBindingEnum(Value.ASN, "asn"); - public static final ClientSessionTransferDelegationDeviceBindingEnum IP = new ClientSessionTransferDelegationDeviceBindingEnum(Value.IP, "ip"); @@ -46,8 +43,6 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case ASN: - return visitor.visitAsn(); case IP: return visitor.visitIp(); case UNKNOWN: @@ -59,8 +54,6 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ClientSessionTransferDelegationDeviceBindingEnum valueOf(String value) { switch (value) { - case "asn": - return ASN; case "ip": return IP; default: @@ -71,16 +64,12 @@ public static ClientSessionTransferDelegationDeviceBindingEnum valueOf(String va public enum Value { IP, - ASN, - UNKNOWN } public interface Visitor { T visitIp(); - T visitAsn(); - T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSortFieldEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientSortFieldEnum.java new file mode 100644 index 00000000..83dbe47e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ClientSortFieldEnum.java @@ -0,0 +1,83 @@ +/** + * 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 ClientSortFieldEnum { + public static final ClientSortFieldEnum UPDATED_AT = new ClientSortFieldEnum(Value.UPDATED_AT, "updated_at"); + + public static final ClientSortFieldEnum NAME = new ClientSortFieldEnum(Value.NAME, "name"); + + private final Value value; + + private final String string; + + ClientSortFieldEnum(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 ClientSortFieldEnum && this.string.equals(((ClientSortFieldEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case UPDATED_AT: + return visitor.visitUpdatedAt(); + case NAME: + return visitor.visitName(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ClientSortFieldEnum valueOf(String value) { + switch (value) { + case "updated_at": + return UPDATED_AT; + case "name": + return NAME; + default: + return new ClientSortFieldEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + NAME, + + UPDATED_AT, + + UNKNOWN + } + + public interface Visitor { + T visitName(); + + T visitUpdatedAt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java index cc745541..45f8ad9c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithCredentialId.java @@ -26,14 +26,18 @@ public final class ClientTokenVaultPrivilegedAccessWithCredentialId { private final Optional> ipAllowlist; + private final Optional> grants; + private final Map additionalProperties; private ClientTokenVaultPrivilegedAccessWithCredentialId( List credentials, Optional> ipAllowlist, + Optional> grants, Map additionalProperties) { this.credentials = credentials; this.ipAllowlist = ipAllowlist; + this.grants = grants; this.additionalProperties = additionalProperties; } @@ -47,6 +51,11 @@ public Optional> getIpAllowlist() { return ipAllowlist; } + @JsonProperty("grants") + public Optional> getGrants() { + return grants; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -60,12 +69,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(ClientTokenVaultPrivilegedAccessWithCredentialId other) { - return credentials.equals(other.credentials) && ipAllowlist.equals(other.ipAllowlist); + return credentials.equals(other.credentials) + && ipAllowlist.equals(other.ipAllowlist) + && grants.equals(other.grants); } @java.lang.Override public int hashCode() { - return Objects.hash(this.credentials, this.ipAllowlist); + return Objects.hash(this.credentials, this.ipAllowlist, this.grants); } @java.lang.Override @@ -83,6 +94,8 @@ public static final class Builder { private Optional> ipAllowlist = Optional.empty(); + private Optional> grants = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -91,6 +104,7 @@ private Builder() {} public Builder from(ClientTokenVaultPrivilegedAccessWithCredentialId other) { credentials(other.getCredentials()); ipAllowlist(other.getIpAllowlist()); + grants(other.getGrants()); return this; } @@ -126,8 +140,20 @@ public Builder ipAllowlist(List ipAllowlist) { return this; } + @JsonSetter(value = "grants", nulls = Nulls.SKIP) + public Builder grants(Optional> grants) { + this.grants = grants; + return this; + } + + public Builder grants(List grants) { + this.grants = Optional.ofNullable(grants); + return this; + } + public ClientTokenVaultPrivilegedAccessWithCredentialId build() { - return new ClientTokenVaultPrivilegedAccessWithCredentialId(credentials, ipAllowlist, additionalProperties); + return new ClientTokenVaultPrivilegedAccessWithCredentialId( + credentials, ipAllowlist, grants, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java index 9a2f2f7a..75962e03 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/ClientTokenVaultPrivilegedAccessWithPublicKey.java @@ -26,14 +26,18 @@ public final class ClientTokenVaultPrivilegedAccessWithPublicKey { private final Optional> ipAllowlist; + private final Optional> grants; + private final Map additionalProperties; private ClientTokenVaultPrivilegedAccessWithPublicKey( List credentials, Optional> ipAllowlist, + Optional> grants, Map additionalProperties) { this.credentials = credentials; this.ipAllowlist = ipAllowlist; + this.grants = grants; this.additionalProperties = additionalProperties; } @@ -47,6 +51,11 @@ public Optional> getIpAllowlist() { return ipAllowlist; } + @JsonProperty("grants") + public Optional> getGrants() { + return grants; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -60,12 +69,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(ClientTokenVaultPrivilegedAccessWithPublicKey other) { - return credentials.equals(other.credentials) && ipAllowlist.equals(other.ipAllowlist); + return credentials.equals(other.credentials) + && ipAllowlist.equals(other.ipAllowlist) + && grants.equals(other.grants); } @java.lang.Override public int hashCode() { - return Objects.hash(this.credentials, this.ipAllowlist); + return Objects.hash(this.credentials, this.ipAllowlist, this.grants); } @java.lang.Override @@ -83,6 +94,8 @@ public static final class Builder { private Optional> ipAllowlist = Optional.empty(); + private Optional> grants = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -91,6 +104,7 @@ private Builder() {} public Builder from(ClientTokenVaultPrivilegedAccessWithPublicKey other) { credentials(other.getCredentials()); ipAllowlist(other.getIpAllowlist()); + grants(other.getGrants()); return this; } @@ -126,8 +140,20 @@ public Builder ipAllowlist(List ipAllowlist) { return this; } + @JsonSetter(value = "grants", nulls = Nulls.SKIP) + public Builder grants(Optional> grants) { + this.grants = grants; + return this; + } + + public Builder grants(List grants) { + this.grants = Optional.ofNullable(grants); + return this; + } + public ClientTokenVaultPrivilegedAccessWithPublicKey build() { - return new ClientTokenVaultPrivilegedAccessWithPublicKey(credentials, ipAllowlist, additionalProperties); + return new ClientTokenVaultPrivilegedAccessWithPublicKey( + credentials, ipAllowlist, grants, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ConflictSchema.java b/src/main/java/com/auth0/client/mgmt/types/ConflictSchema.java new file mode 100644 index 00000000..3e7c8229 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConflictSchema.java @@ -0,0 +1,163 @@ +/** + * 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 = ConflictSchema.Builder.class) +public final class ConflictSchema { + private final String message; + + private final String statusCode; + + private final ConflictSchemaError error; + + private final Map additionalProperties; + + private ConflictSchema( + String message, String statusCode, ConflictSchemaError error, Map additionalProperties) { + this.message = message; + this.statusCode = statusCode; + this.error = error; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("message") + public String getMessage() { + return message; + } + + @JsonProperty("statusCode") + public String getStatusCode() { + return statusCode; + } + + @JsonProperty("error") + public ConflictSchemaError getError() { + return error; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConflictSchema && equalTo((ConflictSchema) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConflictSchema other) { + return message.equals(other.message) && statusCode.equals(other.statusCode) && error.equals(other.error); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.message, this.statusCode, this.error); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MessageStage builder() { + return new Builder(); + } + + public interface MessageStage { + StatusCodeStage message(@NotNull String message); + + Builder from(ConflictSchema other); + } + + public interface StatusCodeStage { + ErrorStage statusCode(@NotNull String statusCode); + } + + public interface ErrorStage { + _FinalStage error(@NotNull ConflictSchemaError error); + } + + public interface _FinalStage { + ConflictSchema build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MessageStage, StatusCodeStage, ErrorStage, _FinalStage { + private String message; + + private String statusCode; + + private ConflictSchemaError error; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConflictSchema other) { + message(other.getMessage()); + statusCode(other.getStatusCode()); + error(other.getError()); + return this; + } + + @java.lang.Override + @JsonSetter("message") + public StatusCodeStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("statusCode") + public ErrorStage statusCode(@NotNull String statusCode) { + this.statusCode = Objects.requireNonNull(statusCode, "statusCode must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("error") + public _FinalStage error(@NotNull ConflictSchemaError error) { + this.error = Objects.requireNonNull(error, "error must not be null"); + return this; + } + + @java.lang.Override + public ConflictSchema build() { + return new ConflictSchema(message, statusCode, error, 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/ConflictSchemaError.java b/src/main/java/com/auth0/client/mgmt/types/ConflictSchemaError.java new file mode 100644 index 00000000..f833031f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConflictSchemaError.java @@ -0,0 +1,73 @@ +/** + * 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 ConflictSchemaError { + public static final ConflictSchemaError CONFLICT = new ConflictSchemaError(Value.CONFLICT, "Conflict"); + + private final Value value; + + private final String string; + + ConflictSchemaError(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 ConflictSchemaError && this.string.equals(((ConflictSchemaError) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONFLICT: + return visitor.visitConflict(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ConflictSchemaError valueOf(String value) { + switch (value) { + case "Conflict": + return CONFLICT; + default: + return new ConflictSchemaError(Value.UNKNOWN, value); + } + } + + public enum Value { + CONFLICT, + + UNKNOWN + } + + public interface Visitor { + T visitConflict(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java b/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java index dc0dbf84..1336f460 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java @@ -298,7 +298,6 @@ public Builder from(ConnectedAccount other) { } /** - *

                                                              The unique identifier for the connected account.

                                                              *

                                                              The unique identifier for the connected account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -310,7 +309,6 @@ public ConnectionStage id(@NotNull String id) { } /** - *

                                                              The name of the connection associated with the account.

                                                              *

                                                              The name of the connection associated with the account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -322,7 +320,6 @@ public ConnectionIdStage connection(@NotNull String connection) { } /** - *

                                                              The unique identifier of the connection associated with the account.

                                                              *

                                                              The unique identifier of the connection associated with the account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -334,7 +331,6 @@ public StrategyStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The authentication strategy used by the connection.

                                                              *

                                                              The authentication strategy used by the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -353,7 +349,6 @@ public CreatedAtStage accessType(@NotNull ConnectedAccountAccessTypeEnum accessT } /** - *

                                                              ISO 8601 timestamp when the connected account was created.

                                                              *

                                                              ISO 8601 timestamp when the connected account was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java index f190ba53..795f5450 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java @@ -24,12 +24,18 @@ public final class ConnectionConnectedAccountsPurpose { private final Optional crossAppAccess; + private final Optional allowMissingUserId; + private final Map additionalProperties; private ConnectionConnectedAccountsPurpose( - boolean active, Optional crossAppAccess, Map additionalProperties) { + boolean active, + Optional crossAppAccess, + Optional allowMissingUserId, + Map additionalProperties) { this.active = active; this.crossAppAccess = crossAppAccess; + this.allowMissingUserId = allowMissingUserId; this.additionalProperties = additionalProperties; } @@ -43,6 +49,14 @@ public Optional getCrossAppAccess() { return crossAppAccess; } + /** + * @return When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required). + */ + @JsonProperty("allow_missing_user_id") + public Optional getAllowMissingUserId() { + return allowMissingUserId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -56,12 +70,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionConnectedAccountsPurpose other) { - return active == other.active && crossAppAccess.equals(other.crossAppAccess); + return active == other.active + && crossAppAccess.equals(other.crossAppAccess) + && allowMissingUserId.equals(other.allowMissingUserId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.active, this.crossAppAccess); + return Objects.hash(this.active, this.crossAppAccess, this.allowMissingUserId); } @java.lang.Override @@ -89,12 +105,21 @@ public interface _FinalStage { _FinalStage crossAppAccess(Optional crossAppAccess); _FinalStage crossAppAccess(Boolean crossAppAccess); + + /** + *

                                                              When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required).

                                                              + */ + _FinalStage allowMissingUserId(Optional allowMissingUserId); + + _FinalStage allowMissingUserId(Boolean allowMissingUserId); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ActiveStage, _FinalStage { private boolean active; + private Optional allowMissingUserId = Optional.empty(); + private Optional crossAppAccess = Optional.empty(); @JsonAnySetter @@ -106,6 +131,7 @@ private Builder() {} public Builder from(ConnectionConnectedAccountsPurpose other) { active(other.getActive()); crossAppAccess(other.getCrossAppAccess()); + allowMissingUserId(other.getAllowMissingUserId()); return this; } @@ -116,6 +142,26 @@ public _FinalStage active(boolean active) { return this; } + /** + *

                                                              When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required).

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

                                                              When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_missing_user_id", nulls = Nulls.SKIP) + public _FinalStage allowMissingUserId(Optional allowMissingUserId) { + this.allowMissingUserId = allowMissingUserId; + return this; + } + @java.lang.Override public _FinalStage crossAppAccess(Boolean crossAppAccess) { this.crossAppAccess = Optional.ofNullable(crossAppAccess); @@ -131,7 +177,8 @@ public _FinalStage crossAppAccess(Optional crossAppAccess) { @java.lang.Override public ConnectionConnectedAccountsPurpose build() { - return new ConnectionConnectedAccountsPurpose(active, crossAppAccess, additionalProperties); + return new ConnectionConnectedAccountsPurpose( + active, crossAppAccess, allowMissingUserId, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java index 4227dc2c..659607e2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java @@ -24,12 +24,18 @@ public final class ConnectionConnectedAccountsPurposeXaa { private final boolean active; + private final Optional allowMissingUserId; + private final Map additionalProperties; private ConnectionConnectedAccountsPurposeXaa( - Optional crossAppAccess, boolean active, Map additionalProperties) { + Optional crossAppAccess, + boolean active, + Optional allowMissingUserId, + Map additionalProperties) { this.crossAppAccess = crossAppAccess; this.active = active; + this.allowMissingUserId = allowMissingUserId; this.additionalProperties = additionalProperties; } @@ -43,6 +49,14 @@ public boolean getActive() { return active; } + /** + * @return When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required). + */ + @JsonProperty("allow_missing_user_id") + public Optional getAllowMissingUserId() { + return allowMissingUserId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -56,12 +70,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionConnectedAccountsPurposeXaa other) { - return crossAppAccess.equals(other.crossAppAccess) && active == other.active; + return crossAppAccess.equals(other.crossAppAccess) + && active == other.active + && allowMissingUserId.equals(other.allowMissingUserId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.crossAppAccess, this.active); + return Objects.hash(this.crossAppAccess, this.active, this.allowMissingUserId); } @java.lang.Override @@ -89,12 +105,21 @@ public interface _FinalStage { _FinalStage crossAppAccess(Optional crossAppAccess); _FinalStage crossAppAccess(Boolean crossAppAccess); + + /** + *

                                                              When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required).

                                                              + */ + _FinalStage allowMissingUserId(Optional allowMissingUserId); + + _FinalStage allowMissingUserId(Boolean allowMissingUserId); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ActiveStage, _FinalStage { private boolean active; + private Optional allowMissingUserId = Optional.empty(); + private Optional crossAppAccess = Optional.empty(); @JsonAnySetter @@ -106,6 +131,7 @@ private Builder() {} public Builder from(ConnectionConnectedAccountsPurposeXaa other) { crossAppAccess(other.getCrossAppAccess()); active(other.getActive()); + allowMissingUserId(other.getAllowMissingUserId()); return this; } @@ -116,6 +142,26 @@ public _FinalStage active(boolean active) { return this; } + /** + *

                                                              When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required).

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

                                                              When true, allows storing a connected account without an upstream identity provider user id. At most one such connected account is allowed per user per connection. Default false preserves the strict behaviour (an upstream user id is required).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_missing_user_id", nulls = Nulls.SKIP) + public _FinalStage allowMissingUserId(Optional allowMissingUserId) { + this.allowMissingUserId = allowMissingUserId; + return this; + } + @java.lang.Override public _FinalStage crossAppAccess(Boolean crossAppAccess) { this.crossAppAccess = Optional.ofNullable(crossAppAccess); @@ -131,7 +177,8 @@ public _FinalStage crossAppAccess(Optional crossAppAccess) { @java.lang.Override public ConnectionConnectedAccountsPurposeXaa build() { - return new ConnectionConnectedAccountsPurposeXaa(crossAppAccess, active, additionalProperties); + return new ConnectionConnectedAccountsPurposeXaa( + crossAppAccess, active, allowMissingUserId, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionCrossAppAccessResourceApp.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionCrossAppAccessResourceApp.java new file mode 100644 index 00000000..08133903 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionCrossAppAccessResourceApp.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 = ConnectionCrossAppAccessResourceApp.Builder.class) +public final class ConnectionCrossAppAccessResourceApp { + private final ConnectionCrossAppAccessResourceAppStatusEnum status; + + private final Map additionalProperties; + + private ConnectionCrossAppAccessResourceApp( + ConnectionCrossAppAccessResourceAppStatusEnum status, Map additionalProperties) { + this.status = status; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("status") + public ConnectionCrossAppAccessResourceAppStatusEnum getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionCrossAppAccessResourceApp + && equalTo((ConnectionCrossAppAccessResourceApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionCrossAppAccessResourceApp 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 ConnectionCrossAppAccessResourceAppStatusEnum status); + + Builder from(ConnectionCrossAppAccessResourceApp other); + } + + public interface _FinalStage { + ConnectionCrossAppAccessResourceApp build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements StatusStage, _FinalStage { + private ConnectionCrossAppAccessResourceAppStatusEnum status; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConnectionCrossAppAccessResourceApp other) { + status(other.getStatus()); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public _FinalStage status(@NotNull ConnectionCrossAppAccessResourceAppStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + public ConnectionCrossAppAccessResourceApp build() { + return new ConnectionCrossAppAccessResourceApp(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/ConnectionCrossAppAccessResourceAppStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionCrossAppAccessResourceAppStatusEnum.java new file mode 100644 index 00000000..b7adf3dc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionCrossAppAccessResourceAppStatusEnum.java @@ -0,0 +1,86 @@ +/** + * 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 ConnectionCrossAppAccessResourceAppStatusEnum { + public static final ConnectionCrossAppAccessResourceAppStatusEnum ENABLED = + new ConnectionCrossAppAccessResourceAppStatusEnum(Value.ENABLED, "enabled"); + + public static final ConnectionCrossAppAccessResourceAppStatusEnum DISABLED = + new ConnectionCrossAppAccessResourceAppStatusEnum(Value.DISABLED, "disabled"); + + private final Value value; + + private final String string; + + ConnectionCrossAppAccessResourceAppStatusEnum(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 ConnectionCrossAppAccessResourceAppStatusEnum + && this.string.equals(((ConnectionCrossAppAccessResourceAppStatusEnum) 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 ConnectionCrossAppAccessResourceAppStatusEnum valueOf(String value) { + switch (value) { + case "enabled": + return ENABLED; + case "disabled": + return DISABLED; + default: + return new ConnectionCrossAppAccessResourceAppStatusEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DISABLED, + + ENABLED, + + UNKNOWN + } + + public interface Visitor { + T visitDisabled(); + + T visitEnabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java index 9cbf21b7..f94a8093 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java @@ -98,7 +98,6 @@ public Builder from(ConnectionEnabledClient other) { } /** - *

                                                              The client id

                                                              *

                                                              The client id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java index 7879f24a..667bb23a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java @@ -46,6 +46,8 @@ public final class ConnectionForList { private final Optional crossAppAccessRequestingApp; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private ConnectionForList( @@ -61,6 +63,7 @@ private ConnectionForList( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -74,6 +77,7 @@ private ConnectionForList( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -158,6 +162,11 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -181,7 +190,8 @@ private boolean equalTo(ConnectionForList other) { && metadata.equals(other.metadata) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) - && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -198,7 +208,8 @@ public int hashCode() { this.metadata, this.authentication, this.connectedAccounts, - this.crossAppAccessRequestingApp); + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -236,6 +247,8 @@ public static final class Builder { private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -254,6 +267,7 @@ public Builder from(ConnectionForList other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -410,6 +424,17 @@ public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppA 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(CrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public ConnectionForList build() { return new ConnectionForList( name, @@ -424,6 +449,7 @@ public ConnectionForList build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionForOrganization.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionForOrganization.java index 74b13410..3f07f74d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionForOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionForOrganization.java @@ -171,7 +171,6 @@ public Builder from(ConnectionForOrganization other) { } /** - *

                                                              ID of the connection.

                                                              *

                                                              ID of the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java index 801f9799..2bdea79b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java @@ -194,7 +194,6 @@ public Builder from(ConnectionGatewayAuthentication other) { } /** - *

                                                              The Authorization header type.

                                                              *

                                                              The Authorization header type.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -206,7 +205,6 @@ public AudienceStage method(@NotNull String method) { } /** - *

                                                              The audience to be added to the JWT payload.

                                                              *

                                                              The audience to be added to the JWT payload.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -218,7 +216,6 @@ public SecretStage audience(@NotNull String audience) { } /** - *

                                                              The secret to be used for signing tokens.

                                                              *

                                                              The secret to be used for signing tokens.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java index 58ba3dbe..564ec371 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java @@ -191,7 +191,6 @@ public SecretStage method(@NotNull String method) { } /** - *

                                                              The secret used to sign the JSON Web Token sent to the SMS gateway

                                                              *

                                                              The secret used to sign the JSON Web Token sent to the SMS gateway

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java index b57a5be4..32e182ac 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java @@ -56,8 +56,14 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum IP = new ConnectionIdentityProviderEnum(Value.IP, "ip"); + public static final ConnectionIdentityProviderEnum ATLASSIAN = + new ConnectionIdentityProviderEnum(Value.ATLASSIAN, "atlassian"); + public static final ConnectionIdentityProviderEnum ADFS = new ConnectionIdentityProviderEnum(Value.ADFS, "adfs"); + public static final ConnectionIdentityProviderEnum GITLAB = + new ConnectionIdentityProviderEnum(Value.GITLAB, "gitlab"); + public static final ConnectionIdentityProviderEnum EMAIL = new ConnectionIdentityProviderEnum(Value.EMAIL, "email"); public static final ConnectionIdentityProviderEnum YAHOO = new ConnectionIdentityProviderEnum(Value.YAHOO, "yahoo"); @@ -70,6 +76,12 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum PAYPAL = new ConnectionIdentityProviderEnum(Value.PAYPAL, "paypal"); + public static final ConnectionIdentityProviderEnum HUBSPOT_MCP = + new ConnectionIdentityProviderEnum(Value.HUBSPOT_MCP, "hubspot-mcp"); + + public static final ConnectionIdentityProviderEnum LINEAR_MCP = + new ConnectionIdentityProviderEnum(Value.LINEAR_MCP, "linear-mcp"); + public static final ConnectionIdentityProviderEnum LINKEDIN = new ConnectionIdentityProviderEnum(Value.LINKEDIN, "linkedin"); @@ -79,8 +91,14 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum DWOLLA = new ConnectionIdentityProviderEnum(Value.DWOLLA, "dwolla"); + public static final ConnectionIdentityProviderEnum NOTION_MCP = + new ConnectionIdentityProviderEnum(Value.NOTION_MCP, "notion-mcp"); + public static final ConnectionIdentityProviderEnum SHOP = new ConnectionIdentityProviderEnum(Value.SHOP, "shop"); + public static final ConnectionIdentityProviderEnum CLOUDFLARE_MCP = + new ConnectionIdentityProviderEnum(Value.CLOUDFLARE_MCP, "cloudflare-mcp"); + public static final ConnectionIdentityProviderEnum AUTH0OIDC = new ConnectionIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); @@ -99,6 +117,8 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum EXACT = new ConnectionIdentityProviderEnum(Value.EXACT, "exact"); + public static final ConnectionIdentityProviderEnum ASANA = new ConnectionIdentityProviderEnum(Value.ASANA, "asana"); + public static final ConnectionIdentityProviderEnum FITBIT = new ConnectionIdentityProviderEnum(Value.FITBIT, "fitbit"); @@ -114,6 +134,11 @@ public final class ConnectionIdentityProviderEnum { public static final ConnectionIdentityProviderEnum SALESFORCE_SANDBOX = new ConnectionIdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + public static final ConnectionIdentityProviderEnum SLACK = new ConnectionIdentityProviderEnum(Value.SLACK, "slack"); + + public static final ConnectionIdentityProviderEnum SENTRY_MCP = + new ConnectionIdentityProviderEnum(Value.SENTRY_MCP, "sentry-mcp"); + public static final ConnectionIdentityProviderEnum FACEBOOK = new ConnectionIdentityProviderEnum(Value.FACEBOOK, "facebook"); @@ -224,8 +249,12 @@ public T visit(Visitor visitor) { return visitor.visitBox(); case IP: return visitor.visitIp(); + case ATLASSIAN: + return visitor.visitAtlassian(); case ADFS: return visitor.visitAdfs(); + case GITLAB: + return visitor.visitGitlab(); case EMAIL: return visitor.visitEmail(); case YAHOO: @@ -236,14 +265,22 @@ public T visit(Visitor visitor) { return visitor.visitCustom(); case PAYPAL: return visitor.visitPaypal(); + case HUBSPOT_MCP: + return visitor.visitHubspotMcp(); + case LINEAR_MCP: + return visitor.visitLinearMcp(); case LINKEDIN: return visitor.visitLinkedin(); case GOOGLE_APPS: return visitor.visitGoogleApps(); case DWOLLA: return visitor.visitDwolla(); + case NOTION_MCP: + return visitor.visitNotionMcp(); case SHOP: return visitor.visitShop(); + case CLOUDFLARE_MCP: + return visitor.visitCloudflareMcp(); case AUTH0OIDC: return visitor.visitAuth0Oidc(); case PLANNINGCENTER: @@ -258,6 +295,8 @@ public T visit(Visitor visitor) { return visitor.visitWordpress(); case EXACT: return visitor.visitExact(); + case ASANA: + return visitor.visitAsana(); case FITBIT: return visitor.visitFitbit(); case EVERNOTE: @@ -268,6 +307,10 @@ public T visit(Visitor visitor) { return visitor.visitShopify(); case SALESFORCE_SANDBOX: return visitor.visitSalesforceSandbox(); + case SLACK: + return visitor.visitSlack(); + case SENTRY_MCP: + return visitor.visitSentryMcp(); case FACEBOOK: return visitor.visitFacebook(); case APPLE: @@ -343,8 +386,12 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return BOX; case "ip": return IP; + case "atlassian": + return ATLASSIAN; case "adfs": return ADFS; + case "gitlab": + return GITLAB; case "email": return EMAIL; case "yahoo": @@ -355,14 +402,22 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return CUSTOM; case "paypal": return PAYPAL; + case "hubspot-mcp": + return HUBSPOT_MCP; + case "linear-mcp": + return LINEAR_MCP; case "linkedin": return LINKEDIN; case "google-apps": return GOOGLE_APPS; case "dwolla": return DWOLLA; + case "notion-mcp": + return NOTION_MCP; case "shop": return SHOP; + case "cloudflare-mcp": + return CLOUDFLARE_MCP; case "auth0-oidc": return AUTH0OIDC; case "planningcenter": @@ -377,6 +432,8 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return WORDPRESS; case "exact": return EXACT; + case "asana": + return ASANA; case "fitbit": return FITBIT; case "evernote": @@ -387,6 +444,10 @@ public static ConnectionIdentityProviderEnum valueOf(String value) { return SHOPIFY; case "salesforce-sandbox": return SALESFORCE_SANDBOX; + case "slack": + return SLACK; + case "sentry-mcp": + return SENTRY_MCP; case "facebook": return FACEBOOK; case "apple": @@ -531,6 +592,24 @@ public enum Value { YANDEX, + NOTION_MCP, + + ASANA, + + ATLASSIAN, + + CLOUDFLARE_MCP, + + GITLAB, + + HUBSPOT_MCP, + + LINEAR_MCP, + + SENTRY_MCP, + + SLACK, + UNKNOWN } @@ -645,6 +724,24 @@ public interface Visitor { T visitYandex(); + T visitNotionMcp(); + + T visitAsana(); + + T visitAtlassian(); + + T visitCloudflareMcp(); + + T visitGitlab(); + + T visitHubspotMcp(); + + T visitLinearMcp(); + + T visitSentryMcp(); + + T visitSlack(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionKey.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionKey.java index 7752e1ce..0de6691d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionKey.java @@ -77,7 +77,7 @@ private ConnectionKey( } /** - * @return The key id of the signing key + * @return The key id of the signing or encryption key */ @JsonProperty("kid") public String getKid() { @@ -85,7 +85,7 @@ public String getKid() { } /** - * @return The public certificate of the signing key + * @return The public certificate of the signing or encryption key */ @JsonProperty("cert") public String getCert() { @@ -93,7 +93,7 @@ public String getCert() { } /** - * @return The public certificate of the signing key in pkcs7 format + * @return The public certificate of the signing or encryption key in pkcs7 format */ @JsonProperty("pkcs") public Optional getPkcs() { @@ -149,7 +149,7 @@ public String getThumbprint() { } /** - * @return Signing key algorithm + * @return Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys */ @JsonProperty("algorithm") public Optional getAlgorithm() { @@ -220,7 +220,7 @@ public static KidStage builder() { public interface KidStage { /** - *

                                                              The key id of the signing key

                                                              + *

                                                              The key id of the signing or encryption key

                                                              */ CertStage kid(@NotNull String kid); @@ -229,7 +229,7 @@ public interface KidStage { public interface CertStage { /** - *

                                                              The public certificate of the signing key

                                                              + *

                                                              The public certificate of the signing or encryption key

                                                              */ FingerprintStage cert(@NotNull String cert); } @@ -256,7 +256,7 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              */ _FinalStage pkcs(Optional pkcs); @@ -291,7 +291,7 @@ public interface _FinalStage { _FinalStage currentSince(String currentSince); /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              */ _FinalStage algorithm(Optional algorithm); @@ -355,8 +355,7 @@ public Builder from(ConnectionKey other) { } /** - *

                                                              The key id of the signing key

                                                              - *

                                                              The key id of the signing key

                                                              + *

                                                              The key id of the signing or encryption key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -367,8 +366,7 @@ public CertStage kid(@NotNull String kid) { } /** - *

                                                              The public certificate of the signing key

                                                              - *

                                                              The public certificate of the signing key

                                                              + *

                                                              The public certificate of the signing or encryption key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -379,7 +377,6 @@ public FingerprintStage cert(@NotNull String cert) { } /** - *

                                                              The cert fingerprint

                                                              *

                                                              The cert fingerprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -391,7 +388,6 @@ public ThumbprintStage fingerprint(@NotNull String fingerprint) { } /** - *

                                                              The cert thumbprint

                                                              *

                                                              The cert thumbprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -429,7 +425,7 @@ public _FinalStage keyUse(Optional keyUse) { } /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -439,7 +435,7 @@ public _FinalStage algorithm(String algorithm) { } /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              */ @java.lang.Override @JsonSetter(value = "algorithm", nulls = Nulls.SKIP) @@ -529,7 +525,7 @@ public _FinalStage current(Optional current) { } /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -539,7 +535,7 @@ public _FinalStage pkcs(String pkcs) { } /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              */ @java.lang.Override @JsonSetter(value = "pkcs", nulls = Nulls.SKIP) diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java index 90f01822..cc643841 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java @@ -58,6 +58,8 @@ public final class ConnectionOptionsAd implements IConnectionOptionsCommon { private final Optional> thumbprints; + private final Optional> thumbprintsSha384; + private final OptionalNullable>> upstreamParams; @@ -81,6 +83,7 @@ private ConnectionOptionsAd( Optional signInEndpoint, Optional tenantDomain, Optional> thumbprints, + Optional> thumbprintsSha384, OptionalNullable>> upstreamParams, Map additionalProperties) { this.nonPersistentAttrs = nonPersistentAttrs; @@ -100,6 +103,7 @@ private ConnectionOptionsAd( this.signInEndpoint = signInEndpoint; this.tenantDomain = tenantDomain; this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.upstreamParams = upstreamParams; this.additionalProperties = additionalProperties; } @@ -202,6 +206,11 @@ public Optional> getThumbprints() { return thumbprints; } + @JsonProperty("thumbprints_sha384") + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") public OptionalNullable>> getUpstreamParams() { @@ -247,6 +256,7 @@ private boolean equalTo(ConnectionOptionsAd other) { && signInEndpoint.equals(other.signInEndpoint) && tenantDomain.equals(other.tenantDomain) && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384) && upstreamParams.equals(other.upstreamParams); } @@ -270,6 +280,7 @@ public int hashCode() { this.signInEndpoint, this.tenantDomain, this.thumbprints, + this.thumbprintsSha384, this.upstreamParams); } @@ -318,6 +329,8 @@ public static final class Builder { private Optional> thumbprints = Optional.empty(); + private Optional> thumbprintsSha384 = Optional.empty(); + private OptionalNullable>> upstreamParams = OptionalNullable.absent(); @@ -344,6 +357,7 @@ public Builder from(ConnectionOptionsAd other) { signInEndpoint(other.getSignInEndpoint()); tenantDomain(other.getTenantDomain()); thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); upstreamParams(other.getUpstreamParams()); return this; } @@ -547,6 +561,17 @@ public Builder thumbprints(List thumbprints) { return this; } + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public Builder thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + + public Builder thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) public Builder upstreamParams( @Nullable @@ -605,6 +630,7 @@ public ConnectionOptionsAd build() { signInEndpoint, tenantDomain, thumbprints, + thumbprintsSha384, upstreamParams, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAdfs.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAdfs.java index f9688f05..2c2f13d8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAdfs.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAdfs.java @@ -48,6 +48,8 @@ public final class ConnectionOptionsAdfs implements IConnectionOptionsCommon { private final Optional> thumbprints; + private final Optional> thumbprintsSha384; + private final OptionalNullable>> upstreamParams; @@ -68,6 +70,7 @@ private ConnectionOptionsAdfs( Optional signInEndpoint, Optional tenantDomain, Optional> thumbprints, + Optional> thumbprintsSha384, OptionalNullable>> upstreamParams, Optional userIdAttribute, Map additionalProperties) { @@ -83,6 +86,7 @@ private ConnectionOptionsAdfs( this.signInEndpoint = signInEndpoint; this.tenantDomain = tenantDomain; this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.upstreamParams = upstreamParams; this.userIdAttribute = userIdAttribute; this.additionalProperties = additionalProperties; @@ -155,6 +159,11 @@ public Optional> getThumbprints() { return thumbprints; } + @JsonProperty("thumbprints_sha384") + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") public OptionalNullable>> getUpstreamParams() { @@ -203,6 +212,7 @@ private boolean equalTo(ConnectionOptionsAdfs other) { && signInEndpoint.equals(other.signInEndpoint) && tenantDomain.equals(other.tenantDomain) && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384) && upstreamParams.equals(other.upstreamParams) && userIdAttribute.equals(other.userIdAttribute); } @@ -222,6 +232,7 @@ public int hashCode() { this.signInEndpoint, this.tenantDomain, this.thumbprints, + this.thumbprintsSha384, this.upstreamParams, this.userIdAttribute); } @@ -262,6 +273,8 @@ public static final class Builder { private Optional> thumbprints = Optional.empty(); + private Optional> thumbprintsSha384 = Optional.empty(); + private OptionalNullable>> upstreamParams = OptionalNullable.absent(); @@ -285,6 +298,7 @@ public Builder from(ConnectionOptionsAdfs other) { signInEndpoint(other.getSignInEndpoint()); tenantDomain(other.getTenantDomain()); thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); upstreamParams(other.getUpstreamParams()); userIdAttribute(other.getUserIdAttribute()); return this; @@ -430,6 +444,17 @@ public Builder thumbprints(List thumbprints) { return this; } + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public Builder thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + + public Builder thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) public Builder upstreamParams( @Nullable @@ -497,6 +522,7 @@ public ConnectionOptionsAdfs build() { signInEndpoint, tenantDomain, thumbprints, + thumbprintsSha384, upstreamParams, userIdAttribute, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0.java index 489cafb7..dae91bfb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0.java @@ -48,6 +48,8 @@ public final class ConnectionOptionsAuth0 implements IConnectionOptionsCommon { private final Optional mfa; + private final Optional otpSettings; + private final OptionalNullable passkeyOptions; private final OptionalNullable passwordPolicy; @@ -85,6 +87,7 @@ private ConnectionOptionsAuth0( Optional enabledDatabaseCustomization, Optional importMode, Optional mfa, + Optional otpSettings, OptionalNullable passkeyOptions, OptionalNullable passwordPolicy, OptionalNullable passwordComplexityOptions, @@ -109,6 +112,7 @@ private ConnectionOptionsAuth0( this.enabledDatabaseCustomization = enabledDatabaseCustomization; this.importMode = importMode; this.mfa = mfa; + this.otpSettings = otpSettings; this.passkeyOptions = passkeyOptions; this.passwordPolicy = passwordPolicy; this.passwordComplexityOptions = passwordComplexityOptions; @@ -188,6 +192,11 @@ public Optional getMfa() { return mfa; } + @JsonProperty("otp_settings") + public Optional getOtpSettings() { + return otpSettings; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("passkey_options") public OptionalNullable getPasskeyOptions() { @@ -343,6 +352,7 @@ private boolean equalTo(ConnectionOptionsAuth0 other) { && enabledDatabaseCustomization.equals(other.enabledDatabaseCustomization) && importMode.equals(other.importMode) && mfa.equals(other.mfa) + && otpSettings.equals(other.otpSettings) && passkeyOptions.equals(other.passkeyOptions) && passwordPolicy.equals(other.passwordPolicy) && passwordComplexityOptions.equals(other.passwordComplexityOptions) @@ -371,6 +381,7 @@ public int hashCode() { this.enabledDatabaseCustomization, this.importMode, this.mfa, + this.otpSettings, this.passkeyOptions, this.passwordPolicy, this.passwordComplexityOptions, @@ -419,6 +430,8 @@ public static final class Builder { private Optional mfa = Optional.empty(); + private Optional otpSettings = Optional.empty(); + private OptionalNullable passkeyOptions = OptionalNullable.absent(); private OptionalNullable passwordPolicy = OptionalNullable.absent(); @@ -461,6 +474,7 @@ public Builder from(ConnectionOptionsAuth0 other) { enabledDatabaseCustomization(other.getEnabledDatabaseCustomization()); importMode(other.getImportMode()); mfa(other.getMfa()); + otpSettings(other.getOtpSettings()); passkeyOptions(other.getPasskeyOptions()); passwordPolicy(other.getPasswordPolicy()); passwordComplexityOptions(other.getPasswordComplexityOptions()); @@ -629,6 +643,17 @@ public Builder mfa(ConnectionMfa mfa) { return this; } + @JsonSetter(value = "otp_settings", nulls = Nulls.SKIP) + public Builder otpSettings(Optional otpSettings) { + this.otpSettings = otpSettings; + return this; + } + + public Builder otpSettings(ConnectionOtpSettings otpSettings) { + this.otpSettings = Optional.ofNullable(otpSettings); + return this; + } + @JsonSetter(value = "passkey_options", nulls = Nulls.SKIP) public Builder passkeyOptions(@Nullable OptionalNullable passkeyOptions) { this.passkeyOptions = passkeyOptions; @@ -914,6 +939,7 @@ public ConnectionOptionsAuth0 build() { enabledDatabaseCustomization, importMode, mfa, + otpSettings, passkeyOptions, passwordPolicy, passwordComplexityOptions, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java index c1ad8468..68a93c53 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java @@ -129,8 +129,6 @@ public final class ConnectionOptionsAzureAd implements IConnectionOptionsCommon private final Optional extUserId; - private final OptionalNullable federatedConnectionsAccessTokens; - private final Optional granted; private final Optional iconUrl; @@ -151,6 +149,8 @@ public final class ConnectionOptionsAzureAd implements IConnectionOptionsCommon private final Optional> thumbprints; + private final Optional> thumbprintsSha384; + private final OptionalNullable>> upstreamParams; @@ -217,7 +217,6 @@ private ConnectionOptionsAzureAd( Optional extUpn, Optional extUsageLocation, Optional extUserId, - OptionalNullable federatedConnectionsAccessTokens, Optional granted, Optional iconUrl, Optional identityApi, @@ -228,6 +227,7 @@ private ConnectionOptionsAzureAd( Optional tenantDomain, Optional tenantId, Optional> thumbprints, + Optional> thumbprintsSha384, OptionalNullable>> upstreamParams, Optional useWsfed, Optional useCommonEndpoint, @@ -286,7 +286,6 @@ private ConnectionOptionsAzureAd( this.extUpn = extUpn; this.extUsageLocation = extUsageLocation; this.extUserId = extUserId; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.granted = granted; this.iconUrl = iconUrl; this.identityApi = identityApi; @@ -297,6 +296,7 @@ private ConnectionOptionsAzureAd( this.tenantDomain = tenantDomain; this.tenantId = tenantId; this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.upstreamParams = upstreamParams; this.useWsfed = useWsfed; this.useCommonEndpoint = useCommonEndpoint; @@ -689,15 +689,6 @@ public Optional getExtUserId() { return extUserId; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - /** * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. */ @@ -751,6 +742,11 @@ public Optional> getThumbprints() { return thumbprints; } + @JsonProperty("thumbprints_sha384") + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") public OptionalNullable>> getUpstreamParams() { @@ -783,12 +779,6 @@ public Optional getWaadProtocol() { return waadProtocol; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") private OptionalNullable>> @@ -860,7 +850,6 @@ private boolean equalTo(ConnectionOptionsAzureAd other) { && extUpn.equals(other.extUpn) && extUsageLocation.equals(other.extUsageLocation) && extUserId.equals(other.extUserId) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && granted.equals(other.granted) && iconUrl.equals(other.iconUrl) && identityApi.equals(other.identityApi) @@ -871,6 +860,7 @@ private boolean equalTo(ConnectionOptionsAzureAd other) { && tenantDomain.equals(other.tenantDomain) && tenantId.equals(other.tenantId) && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384) && upstreamParams.equals(other.upstreamParams) && useWsfed.equals(other.useWsfed) && useCommonEndpoint.equals(other.useCommonEndpoint) @@ -933,7 +923,6 @@ public int hashCode() { this.extUpn, this.extUsageLocation, this.extUserId, - this.federatedConnectionsAccessTokens, this.granted, this.iconUrl, this.identityApi, @@ -944,6 +933,7 @@ public int hashCode() { this.tenantDomain, this.tenantId, this.thumbprints, + this.thumbprintsSha384, this.upstreamParams, this.useWsfed, this.useCommonEndpoint, @@ -1300,20 +1290,6 @@ public interface _FinalStage { _FinalStage extUserId(Boolean extUserId); - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); - /** *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              */ @@ -1359,6 +1335,10 @@ _FinalStage shouldTrustEmailVerifiedConnection( _FinalStage thumbprints(List thumbprints); + _FinalStage thumbprintsSha384(Optional> thumbprintsSha384); + + _FinalStage thumbprintsSha384(List thumbprintsSha384); + _FinalStage upstreamParams( @Nullable OptionalNullable>> @@ -1410,6 +1390,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private OptionalNullable>> upstreamParams = OptionalNullable.absent(); + private Optional> thumbprintsSha384 = Optional.empty(); + private Optional> thumbprints = Optional.empty(); private Optional tenantId = Optional.empty(); @@ -1431,9 +1413,6 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional granted = Optional.empty(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - private Optional extUserId = Optional.empty(); private Optional extUsageLocation = Optional.empty(); @@ -1595,7 +1574,6 @@ public Builder from(ConnectionOptionsAzureAd other) { extUpn(other.getExtUpn()); extUsageLocation(other.getExtUsageLocation()); extUserId(other.getExtUserId()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); granted(other.getGranted()); iconUrl(other.getIconUrl()); identityApi(other.getIdentityApi()); @@ -1606,6 +1584,7 @@ public Builder from(ConnectionOptionsAzureAd other) { tenantDomain(other.getTenantDomain()); tenantId(other.getTenantId()); thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); upstreamParams(other.getUpstreamParams()); useWsfed(other.getUseWsfed()); useCommonEndpoint(other.getUseCommonEndpoint()); @@ -1723,6 +1702,19 @@ public _FinalStage upstreamParams( return this; } + @java.lang.Override + public _FinalStage thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + + @java.lang.Override + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public _FinalStage thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + @java.lang.Override public _FinalStage thumbprints(List thumbprints) { this.thumbprints = Optional.ofNullable(thumbprints); @@ -1862,47 +1854,6 @@ public _FinalStage granted(Optional granted) { return this; } - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); - return this; - } - - @java.lang.Override - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - return this; - } - /** *

                                                              When false, prevents storing an alternative user ID. When true (default), this user ID is persisted in the user profile.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -2908,7 +2859,6 @@ public ConnectionOptionsAzureAd build() { extUpn, extUsageLocation, extUserId, - federatedConnectionsAccessTokens, granted, iconUrl, identityApi, @@ -2919,6 +2869,7 @@ public ConnectionOptionsAzureAd build() { tenantDomain, tenantId, thumbprints, + thumbprintsSha384, upstreamParams, useWsfed, useCommonEndpoint, 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 bb79a4a4..144a8dd8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java @@ -37,7 +37,7 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm private final Optional dpopSigningAlg; - private final OptionalNullable federatedConnectionsAccessTokens; + private final Optional enablePushedAuthorizationRequests; private final Optional iconUrl; @@ -51,6 +51,8 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm private final Optional oidcMetadata; + private final Optional pushedAuthorizationRequestEndpoint; + private final Optional scope; private final Optional sendBackChannelNonce; @@ -72,6 +74,8 @@ public final class ConnectionOptionsCommonOidc implements IConnectionOptionsComm private final Optional userinfoEndpoint; + private final Optional useOauthSpecScope; + private final Map additionalProperties; private ConnectionOptionsCommonOidc( @@ -81,13 +85,14 @@ private ConnectionOptionsCommonOidc( Optional connectionSettings, Optional> domainAliases, Optional dpopSigningAlg, - OptionalNullable federatedConnectionsAccessTokens, + Optional enablePushedAuthorizationRequests, Optional iconUrl, Optional idTokenSessionExpirySupported, OptionalNullable> idTokenSignedResponseAlgs, Optional issuer, Optional jwksUri, Optional oidcMetadata, + Optional pushedAuthorizationRequestEndpoint, Optional scope, Optional sendBackChannelNonce, Optional setUserRootAttributes, @@ -98,6 +103,7 @@ private ConnectionOptionsCommonOidc( Optional tokenEndpointJwtcaAudFormat, OptionalNullable>> upstreamParams, Optional userinfoEndpoint, + Optional useOauthSpecScope, Map additionalProperties) { this.authorizationEndpoint = authorizationEndpoint; this.clientId = clientId; @@ -105,13 +111,14 @@ private ConnectionOptionsCommonOidc( this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; this.dpopSigningAlg = dpopSigningAlg; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; this.iconUrl = iconUrl; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.issuer = issuer; this.jwksUri = jwksUri; this.oidcMetadata = oidcMetadata; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; this.scope = scope; this.sendBackChannelNonce = sendBackChannelNonce; this.setUserRootAttributes = setUserRootAttributes; @@ -122,6 +129,7 @@ private ConnectionOptionsCommonOidc( this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.upstreamParams = upstreamParams; this.userinfoEndpoint = userinfoEndpoint; + this.useOauthSpecScope = useOauthSpecScope; this.additionalProperties = additionalProperties; } @@ -161,14 +169,10 @@ public Optional getDpopSigningAlg() { return dpopSigningAlg; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") + @JsonProperty("enable_pushed_authorization_requests") @java.lang.Override - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; + public Optional getEnablePushedAuthorizationRequests() { + return enablePushedAuthorizationRequests; } @JsonProperty("icon_url") @@ -211,6 +215,12 @@ public Optional getOidcMetadata() { return oidcMetadata; } + @JsonProperty("pushed_authorization_request_endpoint") + @java.lang.Override + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + @JsonProperty("scope") @java.lang.Override public Optional getScope() { @@ -283,10 +293,10 @@ public Optional getUserinfoEndpoint() { return userinfoEndpoint; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; + @JsonProperty("useOauthSpecScope") + @java.lang.Override + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; } @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @@ -332,13 +342,14 @@ private boolean equalTo(ConnectionOptionsCommonOidc other) { && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) && dpopSigningAlg.equals(other.dpopSigningAlg) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && enablePushedAuthorizationRequests.equals(other.enablePushedAuthorizationRequests) && iconUrl.equals(other.iconUrl) && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && issuer.equals(other.issuer) && jwksUri.equals(other.jwksUri) && oidcMetadata.equals(other.oidcMetadata) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) && scope.equals(other.scope) && sendBackChannelNonce.equals(other.sendBackChannelNonce) && setUserRootAttributes.equals(other.setUserRootAttributes) @@ -348,7 +359,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 @@ -360,13 +372,14 @@ public int hashCode() { this.connectionSettings, this.domainAliases, this.dpopSigningAlg, - this.federatedConnectionsAccessTokens, + this.enablePushedAuthorizationRequests, this.iconUrl, this.idTokenSessionExpirySupported, this.idTokenSignedResponseAlgs, this.issuer, this.jwksUri, this.oidcMetadata, + this.pushedAuthorizationRequestEndpoint, this.scope, this.sendBackChannelNonce, this.setUserRootAttributes, @@ -376,7 +389,8 @@ public int hashCode() { this.tokenEndpointAuthSigningAlg, this.tokenEndpointJwtcaAudFormat, this.upstreamParams, - this.userinfoEndpoint); + this.userinfoEndpoint, + this.useOauthSpecScope); } @java.lang.Override @@ -421,19 +435,9 @@ public interface _FinalStage { _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); + _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests); - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); + _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests); _FinalStage iconUrl(Optional iconUrl); @@ -467,6 +471,10 @@ _FinalStage idTokenSignedResponseAlgs( _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata); + _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint); + + _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint); + _FinalStage scope(Optional scope); _FinalStage scope(String scope); @@ -534,12 +542,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 = @@ -563,6 +577,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional scope = Optional.empty(); + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + private Optional oidcMetadata = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -576,8 +592,7 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional iconUrl = Optional.empty(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); + private Optional enablePushedAuthorizationRequests = Optional.empty(); private Optional dpopSigningAlg = Optional.empty(); @@ -602,13 +617,14 @@ public Builder from(ConnectionOptionsCommonOidc other) { connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); dpopSigningAlg(other.getDpopSigningAlg()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + enablePushedAuthorizationRequests(other.getEnablePushedAuthorizationRequests()); iconUrl(other.getIconUrl()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); issuer(other.getIssuer()); jwksUri(other.getJwksUri()); oidcMetadata(other.getOidcMetadata()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); scope(other.getScope()); sendBackChannelNonce(other.getSendBackChannelNonce()); setUserRootAttributes(other.getSetUserRootAttributes()); @@ -619,6 +635,7 @@ public Builder from(ConnectionOptionsCommonOidc other) { tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); upstreamParams(other.getUpstreamParams()); userinfoEndpoint(other.getUserinfoEndpoint()); + useOauthSpecScope(other.getUseOauthSpecScope()); return this; } @@ -629,6 +646,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); @@ -843,6 +873,19 @@ public _FinalStage scope(Optional scope) { return this; } + @java.lang.Override + public _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + @java.lang.Override public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata) { this.oidcMetadata = Optional.ofNullable(oidcMetadata); @@ -949,43 +992,15 @@ public _FinalStage iconUrl(Optional iconUrl) { } @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); + public _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = Optional.ofNullable(enablePushedAuthorizationRequests); return this; } @java.lang.Override - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + @JsonSetter(value = "enable_pushed_authorization_requests", nulls = Nulls.SKIP) + public _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; return this; } @@ -1063,13 +1078,14 @@ public ConnectionOptionsCommonOidc build() { connectionSettings, domainAliases, dpopSigningAlg, - federatedConnectionsAccessTokens, + enablePushedAuthorizationRequests, iconUrl, idTokenSessionExpirySupported, idTokenSignedResponseAlgs, issuer, jwksUri, oidcMetadata, + pushedAuthorizationRequestEndpoint, scope, sendBackChannelNonce, setUserRootAttributes, @@ -1080,6 +1096,7 @@ public ConnectionOptionsCommonOidc build() { tokenEndpointJwtcaAudFormat, upstreamParams, userinfoEndpoint, + useOauthSpecScope, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java index 1efb4b8c..1fee6f99 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java @@ -54,6 +54,8 @@ public final class ConnectionOptionsCommonSaml implements IConnectionOptionsComm private final Optional> thumbprints; + private final Optional> thumbprintsSha384; + private final OptionalNullable>> upstreamParams; @@ -75,6 +77,7 @@ private ConnectionOptionsCommonSaml( Optional signatureAlgorithm, Optional tenantDomain, Optional> thumbprints, + Optional> thumbprintsSha384, OptionalNullable>> upstreamParams, Map additionalProperties) { this.assertionDecryptionSettings = assertionDecryptionSettings; @@ -92,6 +95,7 @@ private ConnectionOptionsCommonSaml( this.signatureAlgorithm = signatureAlgorithm; this.tenantDomain = tenantDomain; this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.upstreamParams = upstreamParams; this.additionalProperties = additionalProperties; } @@ -186,6 +190,12 @@ public Optional> getThumbprints() { return thumbprints; } + @JsonProperty("thumbprints_sha384") + @java.lang.Override + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") @java.lang.Override @@ -230,6 +240,7 @@ private boolean equalTo(ConnectionOptionsCommonSaml other) { && signatureAlgorithm.equals(other.signatureAlgorithm) && tenantDomain.equals(other.tenantDomain) && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384) && upstreamParams.equals(other.upstreamParams); } @@ -251,6 +262,7 @@ public int hashCode() { this.signatureAlgorithm, this.tenantDomain, this.thumbprints, + this.thumbprintsSha384, this.upstreamParams); } @@ -295,6 +307,8 @@ public static final class Builder { private Optional> thumbprints = Optional.empty(); + private Optional> thumbprintsSha384 = Optional.empty(); + private OptionalNullable>> upstreamParams = OptionalNullable.absent(); @@ -319,6 +333,7 @@ public Builder from(ConnectionOptionsCommonSaml other) { signatureAlgorithm(other.getSignatureAlgorithm()); tenantDomain(other.getTenantDomain()); thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); upstreamParams(other.getUpstreamParams()); return this; } @@ -489,6 +504,17 @@ public Builder thumbprints(List thumbprints) { return this; } + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public Builder thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + + public Builder thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) public Builder upstreamParams( @Nullable @@ -545,6 +571,7 @@ public ConnectionOptionsCommonSaml build() { signatureAlgorithm, tenantDomain, thumbprints, + thumbprintsSha384, upstreamParams, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEmail.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEmail.java index 7082b035..50f1d4ad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEmail.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEmail.java @@ -227,7 +227,6 @@ public NameStage email(@NotNull ConnectionEmailEmail email) { } /** - *

                                                              Connection name

                                                              *

                                                              Connection name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java index 63abb262..6406e4c6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java @@ -60,8 +60,6 @@ public final class ConnectionOptionsGoogleApps implements IConnectionOptionsComm private final Optional extIsSuspended; - private final OptionalNullable federatedConnectionsAccessTokens; - private final Optional handleLoginFromSocial; private final Optional iconUrl; @@ -99,7 +97,6 @@ private ConnectionOptionsGoogleApps( Optional extGroupsExtended, Optional extIsAdmin, Optional extIsSuspended, - OptionalNullable federatedConnectionsAccessTokens, Optional handleLoginFromSocial, Optional iconUrl, Optional mapUserIdToId, @@ -126,7 +123,6 @@ private ConnectionOptionsGoogleApps( this.extGroupsExtended = extGroupsExtended; this.extIsAdmin = extIsAdmin; this.extIsSuspended = extIsSuspended; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.handleLoginFromSocial = handleLoginFromSocial; this.iconUrl = iconUrl; this.mapUserIdToId = mapUserIdToId; @@ -233,15 +229,6 @@ public Optional getExtIsSuspended() { return extIsSuspended; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - @JsonProperty("handle_login_from_social") public Optional getHandleLoginFromSocial() { return handleLoginFromSocial; @@ -292,12 +279,6 @@ public OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") private OptionalNullable>> @@ -334,7 +315,6 @@ private boolean equalTo(ConnectionOptionsGoogleApps other) { && extGroupsExtended.equals(other.extGroupsExtended) && extIsAdmin.equals(other.extIsAdmin) && extIsSuspended.equals(other.extIsSuspended) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && handleLoginFromSocial.equals(other.handleLoginFromSocial) && iconUrl.equals(other.iconUrl) && mapUserIdToId.equals(other.mapUserIdToId) @@ -365,7 +345,6 @@ public int hashCode() { this.extGroupsExtended, this.extIsAdmin, this.extIsSuspended, - this.federatedConnectionsAccessTokens, this.handleLoginFromSocial, this.iconUrl, this.mapUserIdToId, @@ -471,20 +450,6 @@ public interface _FinalStage { _FinalStage extIsSuspended(Boolean extIsSuspended); - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); - _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial); _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial); @@ -557,9 +522,6 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional handleLoginFromSocial = Optional.empty(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - private Optional extIsSuspended = Optional.empty(); private Optional extIsAdmin = Optional.empty(); @@ -616,7 +578,6 @@ public Builder from(ConnectionOptionsGoogleApps other) { extGroupsExtended(other.getExtGroupsExtended()); extIsAdmin(other.getExtIsAdmin()); extIsSuspended(other.getExtIsSuspended()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); handleLoginFromSocial(other.getHandleLoginFromSocial()); iconUrl(other.getIconUrl()); mapUserIdToId(other.getMapUserIdToId()); @@ -783,47 +744,6 @@ public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial return this; } - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); - return this; - } - - @java.lang.Override - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - return this; - } - @java.lang.Override public _FinalStage extIsSuspended(Boolean extIsSuspended) { this.extIsSuspended = Optional.ofNullable(extIsSuspended); @@ -1073,7 +993,6 @@ public ConnectionOptionsGoogleApps build() { extGroupsExtended, extIsAdmin, extIsSuspended, - federatedConnectionsAccessTokens, handleLoginFromSocial, iconUrl, mapUserIdToId, 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 3997e321..97784d02 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java @@ -37,7 +37,7 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc private final Optional dpopSigningAlg; - private final OptionalNullable federatedConnectionsAccessTokens; + private final Optional enablePushedAuthorizationRequests; private final Optional iconUrl; @@ -51,6 +51,8 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc private final Optional oidcMetadata; + private final Optional pushedAuthorizationRequestEndpoint; + private final Optional scope; private final Optional sendBackChannelNonce; @@ -72,6 +74,8 @@ public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc private final Optional userinfoEndpoint; + private final Optional useOauthSpecScope; + private final Optional> nonPersistentAttrs; private final Optional attributeMap; @@ -89,13 +93,14 @@ private ConnectionOptionsOidc( Optional connectionSettings, Optional> domainAliases, Optional dpopSigningAlg, - OptionalNullable federatedConnectionsAccessTokens, + Optional enablePushedAuthorizationRequests, Optional iconUrl, Optional idTokenSessionExpirySupported, OptionalNullable> idTokenSignedResponseAlgs, Optional issuer, Optional jwksUri, Optional oidcMetadata, + Optional pushedAuthorizationRequestEndpoint, Optional scope, Optional sendBackChannelNonce, Optional setUserRootAttributes, @@ -106,6 +111,7 @@ private ConnectionOptionsOidc( Optional tokenEndpointJwtcaAudFormat, OptionalNullable>> upstreamParams, Optional userinfoEndpoint, + Optional useOauthSpecScope, Optional> nonPersistentAttrs, Optional attributeMap, Optional discoveryUrl, @@ -117,13 +123,14 @@ private ConnectionOptionsOidc( this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; this.dpopSigningAlg = dpopSigningAlg; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; this.iconUrl = iconUrl; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.issuer = issuer; this.jwksUri = jwksUri; this.oidcMetadata = oidcMetadata; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; this.scope = scope; this.sendBackChannelNonce = sendBackChannelNonce; this.setUserRootAttributes = setUserRootAttributes; @@ -134,6 +141,7 @@ private ConnectionOptionsOidc( this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.upstreamParams = upstreamParams; this.userinfoEndpoint = userinfoEndpoint; + this.useOauthSpecScope = useOauthSpecScope; this.nonPersistentAttrs = nonPersistentAttrs; this.attributeMap = attributeMap; this.discoveryUrl = discoveryUrl; @@ -177,14 +185,10 @@ public Optional getDpopSigningAlg() { return dpopSigningAlg; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") + @JsonProperty("enable_pushed_authorization_requests") @java.lang.Override - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; + public Optional getEnablePushedAuthorizationRequests() { + return enablePushedAuthorizationRequests; } @JsonProperty("icon_url") @@ -227,6 +231,12 @@ public Optional getOidcMetadata() { return oidcMetadata; } + @JsonProperty("pushed_authorization_request_endpoint") + @java.lang.Override + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + @JsonProperty("scope") @java.lang.Override public Optional getScope() { @@ -299,6 +309,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() { @@ -320,12 +336,6 @@ public Optional getType() { return type; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") private OptionalNullable> _getIdTokenSignedResponseAlgs() { @@ -369,13 +379,14 @@ private boolean equalTo(ConnectionOptionsOidc other) { && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) && dpopSigningAlg.equals(other.dpopSigningAlg) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && enablePushedAuthorizationRequests.equals(other.enablePushedAuthorizationRequests) && iconUrl.equals(other.iconUrl) && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && issuer.equals(other.issuer) && jwksUri.equals(other.jwksUri) && oidcMetadata.equals(other.oidcMetadata) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) && scope.equals(other.scope) && sendBackChannelNonce.equals(other.sendBackChannelNonce) && setUserRootAttributes.equals(other.setUserRootAttributes) @@ -386,6 +397,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) @@ -401,13 +413,14 @@ public int hashCode() { this.connectionSettings, this.domainAliases, this.dpopSigningAlg, - this.federatedConnectionsAccessTokens, + this.enablePushedAuthorizationRequests, this.iconUrl, this.idTokenSessionExpirySupported, this.idTokenSignedResponseAlgs, this.issuer, this.jwksUri, this.oidcMetadata, + this.pushedAuthorizationRequestEndpoint, this.scope, this.sendBackChannelNonce, this.setUserRootAttributes, @@ -418,6 +431,7 @@ public int hashCode() { this.tokenEndpointJwtcaAudFormat, this.upstreamParams, this.userinfoEndpoint, + this.useOauthSpecScope, this.nonPersistentAttrs, this.attributeMap, this.discoveryUrl, @@ -466,19 +480,9 @@ public interface _FinalStage { _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); + _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests); - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); + _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests); _FinalStage iconUrl(Optional iconUrl); @@ -512,6 +516,10 @@ _FinalStage idTokenSignedResponseAlgs( _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata); + _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint); + + _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint); + _FinalStage scope(Optional scope); _FinalStage scope(String scope); @@ -580,6 +588,10 @@ _FinalStage upstreamParams( _FinalStage userinfoEndpoint(String userinfoEndpoint); + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); _FinalStage nonPersistentAttrs(List nonPersistentAttrs); @@ -609,6 +621,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 = @@ -632,6 +646,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional scope = Optional.empty(); + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + private Optional oidcMetadata = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -645,8 +661,7 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional iconUrl = Optional.empty(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); + private Optional enablePushedAuthorizationRequests = Optional.empty(); private Optional dpopSigningAlg = Optional.empty(); @@ -671,13 +686,14 @@ public Builder from(ConnectionOptionsOidc other) { connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); dpopSigningAlg(other.getDpopSigningAlg()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + enablePushedAuthorizationRequests(other.getEnablePushedAuthorizationRequests()); iconUrl(other.getIconUrl()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); issuer(other.getIssuer()); jwksUri(other.getJwksUri()); oidcMetadata(other.getOidcMetadata()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); scope(other.getScope()); sendBackChannelNonce(other.getSendBackChannelNonce()); setUserRootAttributes(other.getSetUserRootAttributes()); @@ -688,6 +704,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()); @@ -754,6 +771,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); @@ -968,6 +998,19 @@ public _FinalStage scope(Optional scope) { return this; } + @java.lang.Override + public _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + @java.lang.Override public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata) { this.oidcMetadata = Optional.ofNullable(oidcMetadata); @@ -1074,43 +1117,15 @@ public _FinalStage iconUrl(Optional iconUrl) { } @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } + public _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = Optional.ofNullable(enablePushedAuthorizationRequests); return this; } @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); - return this; - } - - @java.lang.Override - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + @JsonSetter(value = "enable_pushed_authorization_requests", nulls = Nulls.SKIP) + public _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; return this; } @@ -1188,13 +1203,14 @@ public ConnectionOptionsOidc build() { connectionSettings, domainAliases, dpopSigningAlg, - federatedConnectionsAccessTokens, + enablePushedAuthorizationRequests, iconUrl, idTokenSessionExpirySupported, idTokenSignedResponseAlgs, issuer, jwksUri, oidcMetadata, + pushedAuthorizationRequestEndpoint, scope, sendBackChannelNonce, setUserRootAttributes, @@ -1205,6 +1221,7 @@ public ConnectionOptionsOidc build() { tokenEndpointJwtcaAudFormat, upstreamParams, userinfoEndpoint, + useOauthSpecScope, nonPersistentAttrs, attributeMap, discoveryUrl, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java index 58ddf0c8..6378dd21 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java @@ -60,6 +60,8 @@ public final class ConnectionOptionsOidcMetadata { private final Optional opTosUri; + private final Optional pushedAuthorizationRequestEndpoint; + private final Optional registrationEndpoint; private final Optional> requestObjectEncryptionAlgValuesSupported; @@ -72,6 +74,8 @@ public final class ConnectionOptionsOidcMetadata { private final Optional requestUriParameterSupported; + private final Optional requirePushedAuthorizationRequests; + private final Optional requireRequestUriRegistration; private final Optional> responseModesSupported; @@ -120,12 +124,14 @@ private ConnectionOptionsOidcMetadata( String jwksUri, Optional opPolicyUri, Optional opTosUri, + Optional pushedAuthorizationRequestEndpoint, Optional registrationEndpoint, Optional> requestObjectEncryptionAlgValuesSupported, Optional> requestObjectEncryptionEncValuesSupported, Optional> requestObjectSigningAlgValuesSupported, Optional requestParameterSupported, Optional requestUriParameterSupported, + Optional requirePushedAuthorizationRequests, Optional requireRequestUriRegistration, Optional> responseModesSupported, Optional> responseTypesSupported, @@ -158,12 +164,14 @@ private ConnectionOptionsOidcMetadata( this.jwksUri = jwksUri; this.opPolicyUri = opPolicyUri; this.opTosUri = opTosUri; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; this.registrationEndpoint = registrationEndpoint; this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; this.requestParameterSupported = requestParameterSupported; this.requestUriParameterSupported = requestUriParameterSupported; + this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; this.requireRequestUriRegistration = requireRequestUriRegistration; this.responseModesSupported = responseModesSupported; this.responseTypesSupported = responseTypesSupported; @@ -266,6 +274,11 @@ public Optional getOpTosUri() { return opTosUri; } + @JsonProperty("pushed_authorization_request_endpoint") + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + @JsonProperty("registration_endpoint") public Optional getRegistrationEndpoint() { return registrationEndpoint; @@ -296,6 +309,11 @@ public Optional getRequestUriParameterSupported() { return requestUriParameterSupported; } + @JsonProperty("require_pushed_authorization_requests") + public Optional getRequirePushedAuthorizationRequests() { + return requirePushedAuthorizationRequests; + } + @JsonProperty("require_request_uri_registration") public Optional getRequireRequestUriRegistration() { return requireRequestUriRegistration; @@ -405,12 +423,14 @@ private boolean equalTo(ConnectionOptionsOidcMetadata other) { && jwksUri.equals(other.jwksUri) && opPolicyUri.equals(other.opPolicyUri) && opTosUri.equals(other.opTosUri) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) && registrationEndpoint.equals(other.registrationEndpoint) && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) && requestParameterSupported.equals(other.requestParameterSupported) && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) && responseModesSupported.equals(other.responseModesSupported) && responseTypesSupported.equals(other.responseTypesSupported) @@ -447,12 +467,14 @@ public int hashCode() { this.jwksUri, this.opPolicyUri, this.opTosUri, + this.pushedAuthorizationRequestEndpoint, this.registrationEndpoint, this.requestObjectEncryptionAlgValuesSupported, this.requestObjectEncryptionEncValuesSupported, this.requestObjectSigningAlgValuesSupported, this.requestParameterSupported, this.requestUriParameterSupported, + this.requirePushedAuthorizationRequests, this.requireRequestUriRegistration, this.responseModesSupported, this.responseTypesSupported, @@ -557,6 +579,10 @@ public interface _FinalStage { _FinalStage opTosUri(String opTosUri); + _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint); + + _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint); + _FinalStage registrationEndpoint(Optional registrationEndpoint); _FinalStage registrationEndpoint(String registrationEndpoint); @@ -584,6 +610,10 @@ _FinalStage requestObjectSigningAlgValuesSupported( _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + _FinalStage requirePushedAuthorizationRequests(Optional requirePushedAuthorizationRequests); + + _FinalStage requirePushedAuthorizationRequests(Boolean requirePushedAuthorizationRequests); + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); @@ -682,6 +712,8 @@ public static final class Builder implements AuthorizationEndpointStage, IssuerS private Optional requireRequestUriRegistration = Optional.empty(); + private Optional requirePushedAuthorizationRequests = Optional.empty(); + private Optional requestUriParameterSupported = Optional.empty(); private Optional requestParameterSupported = Optional.empty(); @@ -694,6 +726,8 @@ public static final class Builder implements AuthorizationEndpointStage, IssuerS private Optional registrationEndpoint = Optional.empty(); + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + private Optional opTosUri = Optional.empty(); private Optional opPolicyUri = Optional.empty(); @@ -746,12 +780,14 @@ public Builder from(ConnectionOptionsOidcMetadata other) { jwksUri(other.getJwksUri()); opPolicyUri(other.getOpPolicyUri()); opTosUri(other.getOpTosUri()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); registrationEndpoint(other.getRegistrationEndpoint()); requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); requestParameterSupported(other.getRequestParameterSupported()); requestUriParameterSupported(other.getRequestUriParameterSupported()); + requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); requireRequestUriRegistration(other.getRequireRequestUriRegistration()); responseModesSupported(other.getResponseModesSupported()); responseTypesSupported(other.getResponseTypesSupported()); @@ -1000,6 +1036,19 @@ public _FinalStage requireRequestUriRegistration(Optional requireReques return this; } + @java.lang.Override + public _FinalStage requirePushedAuthorizationRequests(Boolean requirePushedAuthorizationRequests) { + this.requirePushedAuthorizationRequests = Optional.ofNullable(requirePushedAuthorizationRequests); + return this; + } + + @java.lang.Override + @JsonSetter(value = "require_pushed_authorization_requests", nulls = Nulls.SKIP) + public _FinalStage requirePushedAuthorizationRequests(Optional requirePushedAuthorizationRequests) { + this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; + return this; + } + @java.lang.Override public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); @@ -1085,6 +1134,19 @@ public _FinalStage registrationEndpoint(Optional registrationEndpoint) { return this; } + @java.lang.Override + public _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + @java.lang.Override public _FinalStage opTosUri(String opTosUri) { this.opTosUri = Optional.ofNullable(opTosUri); @@ -1300,12 +1362,14 @@ public ConnectionOptionsOidcMetadata build() { jwksUri, opPolicyUri, opTosUri, + pushedAuthorizationRequestEndpoint, registrationEndpoint, requestObjectEncryptionAlgValuesSupported, requestObjectEncryptionEncValuesSupported, requestObjectSigningAlgValuesSupported, requestParameterSupported, requestUriParameterSupported, + requirePushedAuthorizationRequests, requireRequestUriRegistration, responseModesSupported, responseTypesSupported, 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 41c7dace..0a030d0b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java @@ -39,7 +39,7 @@ public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IC private final Optional dpopSigningAlg; - private final OptionalNullable federatedConnectionsAccessTokens; + private final Optional enablePushedAuthorizationRequests; private final Optional iconUrl; @@ -53,6 +53,8 @@ public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IC private final Optional oidcMetadata; + private final Optional pushedAuthorizationRequestEndpoint; + private final Optional scope; private final Optional sendBackChannelNonce; @@ -74,6 +76,8 @@ public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IC private final Optional userinfoEndpoint; + private final Optional useOauthSpecScope; + private final Optional attributeMap; private final Optional domain; @@ -90,13 +94,14 @@ private ConnectionOptionsOkta( Optional connectionSettings, Optional> domainAliases, Optional dpopSigningAlg, - OptionalNullable federatedConnectionsAccessTokens, + Optional enablePushedAuthorizationRequests, Optional iconUrl, Optional idTokenSessionExpirySupported, OptionalNullable> idTokenSignedResponseAlgs, Optional issuer, Optional jwksUri, Optional oidcMetadata, + Optional pushedAuthorizationRequestEndpoint, Optional scope, Optional sendBackChannelNonce, Optional setUserRootAttributes, @@ -107,6 +112,7 @@ private ConnectionOptionsOkta( Optional tokenEndpointJwtcaAudFormat, OptionalNullable>> upstreamParams, Optional userinfoEndpoint, + Optional useOauthSpecScope, Optional attributeMap, Optional domain, Optional type, @@ -118,13 +124,14 @@ private ConnectionOptionsOkta( this.connectionSettings = connectionSettings; this.domainAliases = domainAliases; this.dpopSigningAlg = dpopSigningAlg; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; this.iconUrl = iconUrl; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.issuer = issuer; this.jwksUri = jwksUri; this.oidcMetadata = oidcMetadata; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; this.scope = scope; this.sendBackChannelNonce = sendBackChannelNonce; this.setUserRootAttributes = setUserRootAttributes; @@ -135,6 +142,7 @@ private ConnectionOptionsOkta( this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.upstreamParams = upstreamParams; this.userinfoEndpoint = userinfoEndpoint; + this.useOauthSpecScope = useOauthSpecScope; this.attributeMap = attributeMap; this.domain = domain; this.type = type; @@ -183,14 +191,10 @@ public Optional getDpopSigningAlg() { return dpopSigningAlg; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") + @JsonProperty("enable_pushed_authorization_requests") @java.lang.Override - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; + public Optional getEnablePushedAuthorizationRequests() { + return enablePushedAuthorizationRequests; } @JsonProperty("icon_url") @@ -233,6 +237,12 @@ public Optional getOidcMetadata() { return oidcMetadata; } + @JsonProperty("pushed_authorization_request_endpoint") + @java.lang.Override + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + @JsonProperty("scope") @java.lang.Override public Optional getScope() { @@ -305,6 +315,12 @@ public Optional getUserinfoEndpoint() { return userinfoEndpoint; } + @JsonProperty("useOauthSpecScope") + @java.lang.Override + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + @JsonProperty("attribute_map") public Optional getAttributeMap() { return attributeMap; @@ -320,12 +336,6 @@ public Optional getType() { return type; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") private OptionalNullable> _getIdTokenSignedResponseAlgs() { @@ -370,13 +380,14 @@ private boolean equalTo(ConnectionOptionsOkta other) { && connectionSettings.equals(other.connectionSettings) && domainAliases.equals(other.domainAliases) && dpopSigningAlg.equals(other.dpopSigningAlg) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && enablePushedAuthorizationRequests.equals(other.enablePushedAuthorizationRequests) && iconUrl.equals(other.iconUrl) && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && issuer.equals(other.issuer) && jwksUri.equals(other.jwksUri) && oidcMetadata.equals(other.oidcMetadata) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) && scope.equals(other.scope) && sendBackChannelNonce.equals(other.sendBackChannelNonce) && setUserRootAttributes.equals(other.setUserRootAttributes) @@ -387,6 +398,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); @@ -402,13 +414,14 @@ public int hashCode() { this.connectionSettings, this.domainAliases, this.dpopSigningAlg, - this.federatedConnectionsAccessTokens, + this.enablePushedAuthorizationRequests, this.iconUrl, this.idTokenSessionExpirySupported, this.idTokenSignedResponseAlgs, this.issuer, this.jwksUri, this.oidcMetadata, + this.pushedAuthorizationRequestEndpoint, this.scope, this.sendBackChannelNonce, this.setUserRootAttributes, @@ -419,6 +432,7 @@ public int hashCode() { this.tokenEndpointJwtcaAudFormat, this.upstreamParams, this.userinfoEndpoint, + this.useOauthSpecScope, this.attributeMap, this.domain, this.type); @@ -470,19 +484,9 @@ public interface _FinalStage { _FinalStage dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg); - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); + _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests); - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); + _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests); _FinalStage iconUrl(Optional iconUrl); @@ -516,6 +520,10 @@ _FinalStage idTokenSignedResponseAlgs( _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata); + _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint); + + _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint); + _FinalStage scope(Optional scope); _FinalStage scope(String scope); @@ -584,6 +592,10 @@ _FinalStage upstreamParams( _FinalStage userinfoEndpoint(String userinfoEndpoint); + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + _FinalStage attributeMap(Optional attributeMap); _FinalStage attributeMap(ConnectionAttributeMapOkta attributeMap); @@ -607,6 +619,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 = @@ -630,6 +644,8 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional scope = Optional.empty(); + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + private Optional oidcMetadata = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -643,8 +659,7 @@ public static final class Builder implements ClientIdStage, _FinalStage { private Optional iconUrl = Optional.empty(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); + private Optional enablePushedAuthorizationRequests = Optional.empty(); private Optional dpopSigningAlg = Optional.empty(); @@ -672,13 +687,14 @@ public Builder from(ConnectionOptionsOkta other) { connectionSettings(other.getConnectionSettings()); domainAliases(other.getDomainAliases()); dpopSigningAlg(other.getDpopSigningAlg()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + enablePushedAuthorizationRequests(other.getEnablePushedAuthorizationRequests()); iconUrl(other.getIconUrl()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); issuer(other.getIssuer()); jwksUri(other.getJwksUri()); oidcMetadata(other.getOidcMetadata()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); scope(other.getScope()); sendBackChannelNonce(other.getSendBackChannelNonce()); setUserRootAttributes(other.getSetUserRootAttributes()); @@ -689,6 +705,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()); @@ -741,6 +758,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); @@ -955,6 +985,19 @@ public _FinalStage scope(Optional scope) { return this; } + @java.lang.Override + public _FinalStage pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public _FinalStage pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + @java.lang.Override public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata) { this.oidcMetadata = Optional.ofNullable(oidcMetadata); @@ -1061,43 +1104,15 @@ public _FinalStage iconUrl(Optional iconUrl) { } @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } + public _FinalStage enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = Optional.ofNullable(enablePushedAuthorizationRequests); return this; } @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); - return this; - } - - @java.lang.Override - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + @JsonSetter(value = "enable_pushed_authorization_requests", nulls = Nulls.SKIP) + public _FinalStage enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; return this; } @@ -1189,13 +1204,14 @@ public ConnectionOptionsOkta build() { connectionSettings, domainAliases, dpopSigningAlg, - federatedConnectionsAccessTokens, + enablePushedAuthorizationRequests, iconUrl, idTokenSessionExpirySupported, idTokenSignedResponseAlgs, issuer, jwksUri, oidcMetadata, + pushedAuthorizationRequestEndpoint, scope, sendBackChannelNonce, setUserRootAttributes, @@ -1206,6 +1222,7 @@ public ConnectionOptionsOkta build() { tokenEndpointJwtcaAudFormat, upstreamParams, userinfoEndpoint, + useOauthSpecScope, attributeMap, domain, type, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java index 8f9d002d..f28b2d19 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java @@ -55,6 +55,8 @@ public final class ConnectionOptionsPingFederate implements IConnectionOptionsCo private final Optional> thumbprints; + private final Optional> thumbprintsSha384; + private final OptionalNullable>> upstreamParams; @@ -82,6 +84,7 @@ private ConnectionOptionsPingFederate( Optional signatureAlgorithm, Optional tenantDomain, Optional> thumbprints, + Optional> thumbprintsSha384, OptionalNullable>> upstreamParams, Optional> nonPersistentAttrs, String pingFederateBaseUrl, @@ -102,6 +105,7 @@ private ConnectionOptionsPingFederate( this.signatureAlgorithm = signatureAlgorithm; this.tenantDomain = tenantDomain; this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.upstreamParams = upstreamParams; this.nonPersistentAttrs = nonPersistentAttrs; this.pingFederateBaseUrl = pingFederateBaseUrl; @@ -199,6 +203,12 @@ public Optional> getThumbprints() { return thumbprints; } + @JsonProperty("thumbprints_sha384") + @java.lang.Override + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") @java.lang.Override @@ -259,6 +269,7 @@ private boolean equalTo(ConnectionOptionsPingFederate other) { && signatureAlgorithm.equals(other.signatureAlgorithm) && tenantDomain.equals(other.tenantDomain) && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384) && upstreamParams.equals(other.upstreamParams) && nonPersistentAttrs.equals(other.nonPersistentAttrs) && pingFederateBaseUrl.equals(other.pingFederateBaseUrl) @@ -283,6 +294,7 @@ public int hashCode() { this.signatureAlgorithm, this.tenantDomain, this.thumbprints, + this.thumbprintsSha384, this.upstreamParams, this.nonPersistentAttrs, this.pingFederateBaseUrl, @@ -372,6 +384,10 @@ _FinalStage assertionDecryptionSettings( _FinalStage thumbprints(List thumbprints); + _FinalStage thumbprintsSha384(Optional> thumbprintsSha384); + + _FinalStage thumbprintsSha384(List thumbprintsSha384); + _FinalStage upstreamParams( @Nullable OptionalNullable>> @@ -408,6 +424,8 @@ public static final class Builder implements PingFederateBaseUrlStage, _FinalSta private OptionalNullable>> upstreamParams = OptionalNullable.absent(); + private Optional> thumbprintsSha384 = Optional.empty(); + private Optional> thumbprints = Optional.empty(); private Optional tenantDomain = Optional.empty(); @@ -460,6 +478,7 @@ public Builder from(ConnectionOptionsPingFederate other) { signatureAlgorithm(other.getSignatureAlgorithm()); tenantDomain(other.getTenantDomain()); thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); upstreamParams(other.getUpstreamParams()); nonPersistentAttrs(other.getNonPersistentAttrs()); pingFederateBaseUrl(other.getPingFederateBaseUrl()); @@ -544,6 +563,19 @@ public _FinalStage upstreamParams( return this; } + @java.lang.Override + public _FinalStage thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + + @java.lang.Override + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public _FinalStage thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + @java.lang.Override public _FinalStage thumbprints(List thumbprints) { this.thumbprints = Optional.ofNullable(thumbprints); @@ -759,6 +791,7 @@ public ConnectionOptionsPingFederate build() { signatureAlgorithm, tenantDomain, thumbprints, + thumbprintsSha384, upstreamParams, nonPersistentAttrs, pingFederateBaseUrl, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java index 3f01f6d6..c4fd78ba 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java @@ -54,11 +54,17 @@ public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml private final Optional> thumbprints; + private final Optional> thumbprintsSha384; + private final OptionalNullable>> upstreamParams; private final Optional> nonPersistentAttrs; + private final Optional clientId; + + private final Optional clientSecret; + private final Optional debug; private final Optional deflate; @@ -67,6 +73,8 @@ public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml private final Optional disableSignout; + private final Optional discoveryUrl; + private final Optional> fieldsMap; private final Optional globalTokenRevocationJwtIss; @@ -77,6 +85,8 @@ public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml private final Optional metadataXml; + private final Optional oidcMetadata; + private final Optional recipientUrl; private final Optional requestTemplate; @@ -87,6 +97,12 @@ public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml private final Optional signOutEndpoint; + private final OptionalNullable tokenEndpointAuthMethod; + + private final OptionalNullable tokenEndpointAuthSigningAlg; + + private final Optional tokenEndpointJwtcaAudFormat; + private final Optional userIdAttribute; private final Map additionalProperties; @@ -107,22 +123,30 @@ private ConnectionOptionsSaml( Optional signatureAlgorithm, Optional tenantDomain, Optional> thumbprints, + Optional> thumbprintsSha384, OptionalNullable>> upstreamParams, Optional> nonPersistentAttrs, + Optional clientId, + Optional clientSecret, Optional debug, Optional deflate, Optional destinationUrl, Optional disableSignout, + Optional discoveryUrl, Optional> fieldsMap, Optional globalTokenRevocationJwtIss, Optional globalTokenRevocationJwtSub, Optional metadataUrl, Optional metadataXml, + Optional oidcMetadata, Optional recipientUrl, Optional requestTemplate, Optional signingCert, Optional signingKey, Optional signOutEndpoint, + OptionalNullable tokenEndpointAuthMethod, + OptionalNullable tokenEndpointAuthSigningAlg, + Optional tokenEndpointJwtcaAudFormat, Optional userIdAttribute, Map additionalProperties) { this.assertionDecryptionSettings = assertionDecryptionSettings; @@ -140,22 +164,30 @@ private ConnectionOptionsSaml( this.signatureAlgorithm = signatureAlgorithm; this.tenantDomain = tenantDomain; this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.upstreamParams = upstreamParams; this.nonPersistentAttrs = nonPersistentAttrs; + this.clientId = clientId; + this.clientSecret = clientSecret; this.debug = debug; this.deflate = deflate; this.destinationUrl = destinationUrl; this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; this.fieldsMap = fieldsMap; this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; this.metadataUrl = metadataUrl; this.metadataXml = metadataXml; + this.oidcMetadata = oidcMetadata; this.recipientUrl = recipientUrl; this.requestTemplate = requestTemplate; this.signingCert = signingCert; this.signingKey = signingKey; this.signOutEndpoint = signOutEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.userIdAttribute = userIdAttribute; this.additionalProperties = additionalProperties; } @@ -250,6 +282,12 @@ public Optional> getThumbprints() { return thumbprints; } + @JsonProperty("thumbprints_sha384") + @java.lang.Override + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("upstream_params") @java.lang.Override @@ -266,6 +304,16 @@ public Optional> getNonPersistentAttrs() { return nonPersistentAttrs; } + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_secret") + public Optional getClientSecret() { + return clientSecret; + } + @JsonProperty("debug") public Optional getDebug() { return debug; @@ -289,6 +337,11 @@ public Optional getDisableSignout() { return disableSignout; } + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + @JsonProperty("fieldsMap") public Optional> getFieldsMap() { return fieldsMap; @@ -314,6 +367,11 @@ public Optional getMetadataXml() { return metadataXml; } + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + @JsonProperty("recipientUrl") public Optional getRecipientUrl() { return recipientUrl; @@ -339,6 +397,29 @@ public Optional getSignOutEndpoint() { return signOutEndpoint; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_method") + public OptionalNullable getTokenEndpointAuthMethod() { + if (tokenEndpointAuthMethod == null) { + return OptionalNullable.absent(); + } + return tokenEndpointAuthMethod; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_signing_alg") + public OptionalNullable getTokenEndpointAuthSigningAlg() { + if (tokenEndpointAuthSigningAlg == null) { + return OptionalNullable.absent(); + } + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + @JsonProperty("user_id_attribute") public Optional getUserIdAttribute() { return userIdAttribute; @@ -351,6 +432,18 @@ public Optional getUserIdAttribute() { return upstreamParams; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_method") + private OptionalNullable _getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_endpoint_auth_signing_alg") + private OptionalNullable _getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -378,22 +471,30 @@ private boolean equalTo(ConnectionOptionsSaml other) { && signatureAlgorithm.equals(other.signatureAlgorithm) && tenantDomain.equals(other.tenantDomain) && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384) && upstreamParams.equals(other.upstreamParams) && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && clientId.equals(other.clientId) + && clientSecret.equals(other.clientSecret) && debug.equals(other.debug) && deflate.equals(other.deflate) && destinationUrl.equals(other.destinationUrl) && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) && fieldsMap.equals(other.fieldsMap) && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) && metadataUrl.equals(other.metadataUrl) && metadataXml.equals(other.metadataXml) + && oidcMetadata.equals(other.oidcMetadata) && recipientUrl.equals(other.recipientUrl) && requestTemplate.equals(other.requestTemplate) && signingCert.equals(other.signingCert) && signingKey.equals(other.signingKey) && signOutEndpoint.equals(other.signOutEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) && userIdAttribute.equals(other.userIdAttribute); } @@ -415,22 +516,30 @@ public int hashCode() { this.signatureAlgorithm, this.tenantDomain, this.thumbprints, + this.thumbprintsSha384, this.upstreamParams, this.nonPersistentAttrs, + this.clientId, + this.clientSecret, this.debug, this.deflate, this.destinationUrl, this.disableSignout, + this.discoveryUrl, this.fieldsMap, this.globalTokenRevocationJwtIss, this.globalTokenRevocationJwtSub, this.metadataUrl, this.metadataXml, + this.oidcMetadata, this.recipientUrl, this.requestTemplate, this.signingCert, this.signingKey, this.signOutEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, this.userIdAttribute); } @@ -475,11 +584,17 @@ public static final class Builder { private Optional> thumbprints = Optional.empty(); + private Optional> thumbprintsSha384 = Optional.empty(); + private OptionalNullable>> upstreamParams = OptionalNullable.absent(); private Optional> nonPersistentAttrs = Optional.empty(); + private Optional clientId = Optional.empty(); + + private Optional clientSecret = Optional.empty(); + private Optional debug = Optional.empty(); private Optional deflate = Optional.empty(); @@ -488,6 +603,8 @@ public static final class Builder { private Optional disableSignout = Optional.empty(); + private Optional discoveryUrl = Optional.empty(); + private Optional> fieldsMap = Optional.empty(); private Optional globalTokenRevocationJwtIss = Optional.empty(); @@ -498,6 +615,8 @@ public static final class Builder { private Optional metadataXml = Optional.empty(); + private Optional oidcMetadata = Optional.empty(); + private Optional recipientUrl = Optional.empty(); private Optional requestTemplate = Optional.empty(); @@ -508,6 +627,14 @@ public static final class Builder { private Optional signOutEndpoint = Optional.empty(); + private OptionalNullable tokenEndpointAuthMethod = + OptionalNullable.absent(); + + private OptionalNullable tokenEndpointAuthSigningAlg = + OptionalNullable.absent(); + + private Optional tokenEndpointJwtcaAudFormat = Optional.empty(); + private Optional userIdAttribute = Optional.empty(); @JsonAnySetter @@ -531,22 +658,30 @@ public Builder from(ConnectionOptionsSaml other) { signatureAlgorithm(other.getSignatureAlgorithm()); tenantDomain(other.getTenantDomain()); thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); upstreamParams(other.getUpstreamParams()); nonPersistentAttrs(other.getNonPersistentAttrs()); + clientId(other.getClientId()); + clientSecret(other.getClientSecret()); debug(other.getDebug()); deflate(other.getDeflate()); destinationUrl(other.getDestinationUrl()); disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); fieldsMap(other.getFieldsMap()); globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); metadataUrl(other.getMetadataUrl()); metadataXml(other.getMetadataXml()); + oidcMetadata(other.getOidcMetadata()); recipientUrl(other.getRecipientUrl()); requestTemplate(other.getRequestTemplate()); signingCert(other.getSigningCert()); signingKey(other.getSigningKey()); signOutEndpoint(other.getSignOutEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); userIdAttribute(other.getUserIdAttribute()); return this; } @@ -717,6 +852,17 @@ public Builder thumbprints(List thumbprints) { return this; } + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public Builder thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + + public Builder thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) public Builder upstreamParams( @Nullable @@ -767,6 +913,28 @@ public Builder nonPersistentAttrs(List nonPersistentAttrs) { return this; } + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) + public Builder clientSecret(Optional clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + public Builder clientSecret(String clientSecret) { + this.clientSecret = Optional.ofNullable(clientSecret); + return this; + } + @JsonSetter(value = "debug", nulls = Nulls.SKIP) public Builder debug(Optional debug) { this.debug = debug; @@ -814,6 +982,17 @@ public Builder disableSignout(Boolean disableSignout) { return this; } + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) public Builder fieldsMap(Optional> fieldsMap) { this.fieldsMap = fieldsMap; @@ -869,6 +1048,17 @@ public Builder metadataXml(String metadataXml) { return this; } + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata(Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) public Builder recipientUrl(Optional recipientUrl) { this.recipientUrl = recipientUrl; @@ -924,6 +1114,89 @@ public Builder signOutEndpoint(String signOutEndpoint) { return this; } + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthMethod( + @Nullable OptionalNullable tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + public Builder tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod); + return this; + } + + public Builder tokenEndpointAuthMethod( + Optional tokenEndpointAuthMethod) { + if (tokenEndpointAuthMethod.isPresent()) { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); + } else { + this.tokenEndpointAuthMethod = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEndpointAuthMethod( + com.auth0.client.mgmt.core.Nullable tokenEndpointAuthMethod) { + if (tokenEndpointAuthMethod.isNull()) { + this.tokenEndpointAuthMethod = OptionalNullable.ofNull(); + } else if (tokenEndpointAuthMethod.isEmpty()) { + this.tokenEndpointAuthMethod = OptionalNullable.absent(); + } else { + this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthSigningAlg( + @Nullable OptionalNullable tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg); + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + Optional tokenEndpointAuthSigningAlg) { + if (tokenEndpointAuthSigningAlg.isPresent()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); + } else { + this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEndpointAuthSigningAlg( + com.auth0.client.mgmt.core.Nullable + tokenEndpointAuthSigningAlg) { + if (tokenEndpointAuthSigningAlg.isNull()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.ofNull(); + } else if (tokenEndpointAuthSigningAlg.isEmpty()) { + this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); + } else { + this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); + } + return this; + } + + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public Builder tokenEndpointJwtcaAudFormat( + Optional tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + public Builder tokenEndpointJwtcaAudFormat( + ConnectionTokenEndpointJwtcaAudFormatEnumOidc tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) public Builder userIdAttribute(Optional userIdAttribute) { this.userIdAttribute = userIdAttribute; @@ -952,22 +1225,30 @@ public ConnectionOptionsSaml build() { signatureAlgorithm, tenantDomain, thumbprints, + thumbprintsSha384, upstreamParams, nonPersistentAttrs, + clientId, + clientSecret, debug, deflate, destinationUrl, disableSignout, + discoveryUrl, fieldsMap, globalTokenRevocationJwtIss, globalTokenRevocationJwtSub, metadataUrl, metadataXml, + oidcMetadata, recipientUrl, requestTemplate, signingCert, signingKey, signOutEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, userIdAttribute, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOtpChannelSettings.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOtpChannelSettings.java new file mode 100644 index 00000000..47ea3457 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOtpChannelSettings.java @@ -0,0 +1,140 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionOtpChannelSettings.Builder.class) +public final class ConnectionOtpChannelSettings { + private final Optional otpLength; + + private final Optional otpExpiry; + + private final Map additionalProperties; + + private ConnectionOtpChannelSettings( + Optional otpLength, Optional otpExpiry, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpiry = otpExpiry; + this.additionalProperties = additionalProperties; + } + + /** + * @return Number of digits in the generated one-time password. + */ + @JsonProperty("otp_length") + public Optional getOtpLength() { + return otpLength; + } + + /** + * @return Number of seconds before the one-time password expires. + */ + @JsonProperty("otp_expiry") + public Optional getOtpExpiry() { + return otpExpiry; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionOtpChannelSettings && equalTo((ConnectionOtpChannelSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionOtpChannelSettings other) { + return otpLength.equals(other.otpLength) && otpExpiry.equals(other.otpExpiry); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpiry); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional otpLength = Optional.empty(); + + private Optional otpExpiry = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConnectionOtpChannelSettings other) { + otpLength(other.getOtpLength()); + otpExpiry(other.getOtpExpiry()); + return this; + } + + /** + *

                                                              Number of digits in the generated one-time password.

                                                              + */ + @JsonSetter(value = "otp_length", nulls = Nulls.SKIP) + public Builder otpLength(Optional otpLength) { + this.otpLength = otpLength; + return this; + } + + public Builder otpLength(Integer otpLength) { + this.otpLength = Optional.ofNullable(otpLength); + return this; + } + + /** + *

                                                              Number of seconds before the one-time password expires.

                                                              + */ + @JsonSetter(value = "otp_expiry", nulls = Nulls.SKIP) + public Builder otpExpiry(Optional otpExpiry) { + this.otpExpiry = otpExpiry; + return this; + } + + public Builder otpExpiry(Integer otpExpiry) { + this.otpExpiry = Optional.ofNullable(otpExpiry); + return this; + } + + public ConnectionOtpChannelSettings build() { + return new ConnectionOtpChannelSettings(otpLength, otpExpiry, 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/ConnectionOtpSettings.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOtpSettings.java new file mode 100644 index 00000000..c36fe59a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionOtpSettings.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionOtpSettings.Builder.class) +public final class ConnectionOtpSettings { + private final Optional email; + + private final Optional phone; + + private final Map additionalProperties; + + private ConnectionOtpSettings( + Optional email, + Optional phone, + Map additionalProperties) { + this.email = email; + this.phone = phone; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + @JsonProperty("phone") + public Optional getPhone() { + return phone; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionOtpSettings && equalTo((ConnectionOtpSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionOtpSettings other) { + return email.equals(other.email) && phone.equals(other.phone); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.email, this.phone); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional phone = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConnectionOtpSettings other) { + email(other.getEmail()); + phone(other.getPhone()); + return this; + } + + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(ConnectionOtpChannelSettings email) { + this.email = Optional.ofNullable(email); + return this; + } + + @JsonSetter(value = "phone", nulls = Nulls.SKIP) + public Builder phone(Optional phone) { + this.phone = phone; + return this; + } + + public Builder phone(ConnectionOtpChannelSettings phone) { + this.phone = Optional.ofNullable(phone); + return this; + } + + public ConnectionOtpSettings build() { + return new ConnectionOtpSettings(email, phone, 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/ConnectionPasskeyAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyAuthenticationMethod.java index e9acf1f6..44dbee78 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyAuthenticationMethod.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyAuthenticationMethod.java @@ -22,10 +22,16 @@ public final class ConnectionPasskeyAuthenticationMethod { private final Optional enabled; + private final Optional signupBehavior; + private final Map additionalProperties; - private ConnectionPasskeyAuthenticationMethod(Optional enabled, Map additionalProperties) { + private ConnectionPasskeyAuthenticationMethod( + Optional enabled, + Optional signupBehavior, + Map additionalProperties) { this.enabled = enabled; + this.signupBehavior = signupBehavior; this.additionalProperties = additionalProperties; } @@ -37,6 +43,14 @@ public Optional getEnabled() { return enabled; } + /** + * @return Specifies the signup behavior for passkey authentication + */ + @JsonProperty("signup_behavior") + public Optional getSignupBehavior() { + return signupBehavior; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -50,12 +64,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionPasskeyAuthenticationMethod other) { - return enabled.equals(other.enabled); + return enabled.equals(other.enabled) && signupBehavior.equals(other.signupBehavior); } @java.lang.Override public int hashCode() { - return Objects.hash(this.enabled); + return Objects.hash(this.enabled, this.signupBehavior); } @java.lang.Override @@ -71,6 +85,8 @@ public static Builder builder() { public static final class Builder { private Optional enabled = Optional.empty(); + private Optional signupBehavior = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -78,6 +94,7 @@ private Builder() {} public Builder from(ConnectionPasskeyAuthenticationMethod other) { enabled(other.getEnabled()); + signupBehavior(other.getSignupBehavior()); return this; } @@ -95,8 +112,22 @@ public Builder enabled(Boolean enabled) { return this; } + /** + *

                                                              Specifies the signup behavior for passkey authentication

                                                              + */ + @JsonSetter(value = "signup_behavior", nulls = Nulls.SKIP) + public Builder signupBehavior(Optional signupBehavior) { + this.signupBehavior = signupBehavior; + return this; + } + + public Builder signupBehavior(ConnectionSignupBehaviorEnum signupBehavior) { + this.signupBehavior = Optional.ofNullable(signupBehavior); + return this; + } + public ConnectionPasskeyAuthenticationMethod build() { - return new ConnectionPasskeyAuthenticationMethod(enabled, additionalProperties); + return new ConnectionPasskeyAuthenticationMethod(enabled, signupBehavior, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordOptionsDictionary.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordOptionsDictionary.java index 3ce6fe2b..29813549 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordOptionsDictionary.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordOptionsDictionary.java @@ -25,6 +25,8 @@ public final class ConnectionPasswordOptionsDictionary { private final Optional> custom; + private final Optional matchType; + private final Optional default_; private final Map additionalProperties; @@ -32,10 +34,12 @@ public final class ConnectionPasswordOptionsDictionary { private ConnectionPasswordOptionsDictionary( Optional active, Optional> custom, + Optional matchType, Optional default_, Map additionalProperties) { this.active = active; this.custom = custom; + this.matchType = matchType; this.default_ = default_; this.additionalProperties = additionalProperties; } @@ -49,13 +53,18 @@ public Optional getActive() { } /** - * @return Array of custom words to block in passwords. Maximum 200 items, each up to 50 characters + * @return Array of custom words to block in passwords */ @JsonProperty("custom") public Optional> getCustom() { return custom; } + @JsonProperty("match_type") + public Optional getMatchType() { + return matchType; + } + @JsonProperty("default") public Optional getDefault() { return default_; @@ -74,12 +83,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionPasswordOptionsDictionary other) { - return active.equals(other.active) && custom.equals(other.custom) && default_.equals(other.default_); + return active.equals(other.active) + && custom.equals(other.custom) + && matchType.equals(other.matchType) + && default_.equals(other.default_); } @java.lang.Override public int hashCode() { - return Objects.hash(this.active, this.custom, this.default_); + return Objects.hash(this.active, this.custom, this.matchType, this.default_); } @java.lang.Override @@ -97,6 +109,8 @@ public static final class Builder { private Optional> custom = Optional.empty(); + private Optional matchType = Optional.empty(); + private Optional default_ = Optional.empty(); @JsonAnySetter @@ -107,6 +121,7 @@ private Builder() {} public Builder from(ConnectionPasswordOptionsDictionary other) { active(other.getActive()); custom(other.getCustom()); + matchType(other.getMatchType()); default_(other.getDefault()); return this; } @@ -126,7 +141,7 @@ public Builder active(Boolean active) { } /** - *

                                                              Array of custom words to block in passwords. Maximum 200 items, each up to 50 characters

                                                              + *

                                                              Array of custom words to block in passwords

                                                              */ @JsonSetter(value = "custom", nulls = Nulls.SKIP) public Builder custom(Optional> custom) { @@ -139,6 +154,17 @@ public Builder custom(List custom) { return this; } + @JsonSetter(value = "match_type", nulls = Nulls.SKIP) + public Builder matchType(Optional matchType) { + this.matchType = matchType; + return this; + } + + public Builder matchType(PasswordDictionaryMatchTypeEnum matchType) { + this.matchType = Optional.ofNullable(matchType); + return this; + } + @JsonSetter(value = "default", nulls = Nulls.SKIP) public Builder default_(Optional default_) { this.default_ = default_; @@ -151,7 +177,7 @@ public Builder default_(PasswordDefaultDictionariesEnum default_) { } public ConnectionPasswordOptionsDictionary build() { - return new ConnectionPasswordOptionsDictionary(active, custom, default_, additionalProperties); + return new ConnectionPasswordOptionsDictionary(active, custom, matchType, default_, additionalProperties); } public Builder additionalProperty(String key, Object value) { 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 21291daf..871650f2 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,10 @@ public final class ConnectionProfile { private final Optional strategyOverrides; + private final Optional provisioning; + + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private ConnectionProfile( @@ -45,6 +49,8 @@ private ConnectionProfile( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +59,8 @@ private ConnectionProfile( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +99,16 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @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 +127,9 @@ 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) + && provisioning.equals(other.provisioning) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -121,7 +141,9 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -149,6 +171,10 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional provisioning = Optional.empty(); + + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -162,6 +188,8 @@ public Builder from(ConnectionProfile other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -242,6 +270,29 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + 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 +302,8 @@ public ConnectionProfile build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, + 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 00000000..ef8007c5 --- /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 00000000..2a3f9575 --- /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 00000000..d2e37e9e --- /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 00000000..fc655296 --- /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/ConnectionProfileProvisioning.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioning.java new file mode 100644 index 00000000..0bc01b39 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioning.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionProfileProvisioning.Builder.class) +public final class ConnectionProfileProvisioning { + private final Optional scim; + + private final Optional googleWorkspace; + + private final Map additionalProperties; + + private ConnectionProfileProvisioning( + Optional scim, + Optional googleWorkspace, + Map additionalProperties) { + this.scim = scim; + this.googleWorkspace = googleWorkspace; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("scim") + public Optional getScim() { + return scim; + } + + @JsonProperty("google_workspace") + public Optional getGoogleWorkspace() { + return googleWorkspace; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileProvisioning && equalTo((ConnectionProfileProvisioning) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileProvisioning other) { + return scim.equals(other.scim) && googleWorkspace.equals(other.googleWorkspace); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.scim, this.googleWorkspace); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional scim = Optional.empty(); + + private Optional googleWorkspace = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConnectionProfileProvisioning other) { + scim(other.getScim()); + googleWorkspace(other.getGoogleWorkspace()); + return this; + } + + @JsonSetter(value = "scim", nulls = Nulls.SKIP) + public Builder scim(Optional scim) { + this.scim = scim; + return this; + } + + public Builder scim(ConnectionProfileProvisioningScim scim) { + this.scim = Optional.ofNullable(scim); + return this; + } + + @JsonSetter(value = "google_workspace", nulls = Nulls.SKIP) + public Builder googleWorkspace(Optional googleWorkspace) { + this.googleWorkspace = googleWorkspace; + return this; + } + + public Builder googleWorkspace(ConnectionProfileProvisioningGoogleWorkspace googleWorkspace) { + this.googleWorkspace = Optional.ofNullable(googleWorkspace); + return this; + } + + public ConnectionProfileProvisioning build() { + return new ConnectionProfileProvisioning(scim, googleWorkspace, 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/ConnectionProfileProvisioningGoogleWorkspace.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningGoogleWorkspace.java new file mode 100644 index 00000000..73d69744 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningGoogleWorkspace.java @@ -0,0 +1,118 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionProfileProvisioningGoogleWorkspace.Builder.class) +public final class ConnectionProfileProvisioningGoogleWorkspace { + private final boolean syncUsers; + + private final Map additionalProperties; + + private ConnectionProfileProvisioningGoogleWorkspace(boolean syncUsers, Map additionalProperties) { + this.syncUsers = syncUsers; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("sync_users") + public boolean getSyncUsers() { + return syncUsers; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileProvisioningGoogleWorkspace + && equalTo((ConnectionProfileProvisioningGoogleWorkspace) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileProvisioningGoogleWorkspace other) { + return syncUsers == other.syncUsers; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.syncUsers); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SyncUsersStage builder() { + return new Builder(); + } + + public interface SyncUsersStage { + _FinalStage syncUsers(boolean syncUsers); + + Builder from(ConnectionProfileProvisioningGoogleWorkspace other); + } + + public interface _FinalStage { + ConnectionProfileProvisioningGoogleWorkspace build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SyncUsersStage, _FinalStage { + private boolean syncUsers; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConnectionProfileProvisioningGoogleWorkspace other) { + syncUsers(other.getSyncUsers()); + return this; + } + + @java.lang.Override + @JsonSetter("sync_users") + public _FinalStage syncUsers(boolean syncUsers) { + this.syncUsers = syncUsers; + return this; + } + + @java.lang.Override + public ConnectionProfileProvisioningGoogleWorkspace build() { + return new ConnectionProfileProvisioningGoogleWorkspace(syncUsers, 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/ConnectionProfileProvisioningScim.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScim.java new file mode 100644 index 00000000..a4fee1c7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScim.java @@ -0,0 +1,119 @@ +/** + * 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 = ConnectionProfileProvisioningScim.Builder.class) +public final class ConnectionProfileProvisioningScim { + private final ConnectionProfileProvisioningScimTokens tokens; + + private final Map additionalProperties; + + private ConnectionProfileProvisioningScim( + ConnectionProfileProvisioningScimTokens tokens, Map additionalProperties) { + this.tokens = tokens; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("tokens") + public ConnectionProfileProvisioningScimTokens getTokens() { + return tokens; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileProvisioningScim && equalTo((ConnectionProfileProvisioningScim) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileProvisioningScim other) { + return tokens.equals(other.tokens); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.tokens); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TokensStage builder() { + return new Builder(); + } + + public interface TokensStage { + _FinalStage tokens(@NotNull ConnectionProfileProvisioningScimTokens tokens); + + Builder from(ConnectionProfileProvisioningScim other); + } + + public interface _FinalStage { + ConnectionProfileProvisioningScim build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TokensStage, _FinalStage { + private ConnectionProfileProvisioningScimTokens tokens; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConnectionProfileProvisioningScim other) { + tokens(other.getTokens()); + return this; + } + + @java.lang.Override + @JsonSetter("tokens") + public _FinalStage tokens(@NotNull ConnectionProfileProvisioningScimTokens tokens) { + this.tokens = Objects.requireNonNull(tokens, "tokens must not be null"); + return this; + } + + @java.lang.Override + public ConnectionProfileProvisioningScim build() { + return new ConnectionProfileProvisioningScim(tokens, 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/ConnectionProfileProvisioningScimTokenScopeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScimTokenScopeEnum.java new file mode 100644 index 00000000..db42316c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScimTokenScopeEnum.java @@ -0,0 +1,119 @@ +/** + * 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 ConnectionProfileProvisioningScimTokenScopeEnum { + public static final ConnectionProfileProvisioningScimTokenScopeEnum DELETE_USERS = + new ConnectionProfileProvisioningScimTokenScopeEnum(Value.DELETE_USERS, "delete:users"); + + public static final ConnectionProfileProvisioningScimTokenScopeEnum GET_USERS = + new ConnectionProfileProvisioningScimTokenScopeEnum(Value.GET_USERS, "get:users"); + + public static final ConnectionProfileProvisioningScimTokenScopeEnum PUT_USERS = + new ConnectionProfileProvisioningScimTokenScopeEnum(Value.PUT_USERS, "put:users"); + + public static final ConnectionProfileProvisioningScimTokenScopeEnum POST_USERS = + new ConnectionProfileProvisioningScimTokenScopeEnum(Value.POST_USERS, "post:users"); + + public static final ConnectionProfileProvisioningScimTokenScopeEnum PATCH_USERS = + new ConnectionProfileProvisioningScimTokenScopeEnum(Value.PATCH_USERS, "patch:users"); + + private final Value value; + + private final String string; + + ConnectionProfileProvisioningScimTokenScopeEnum(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 ConnectionProfileProvisioningScimTokenScopeEnum + && this.string.equals(((ConnectionProfileProvisioningScimTokenScopeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case DELETE_USERS: + return visitor.visitDeleteUsers(); + case GET_USERS: + return visitor.visitGetUsers(); + case PUT_USERS: + return visitor.visitPutUsers(); + case POST_USERS: + return visitor.visitPostUsers(); + case PATCH_USERS: + return visitor.visitPatchUsers(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ConnectionProfileProvisioningScimTokenScopeEnum valueOf(String value) { + switch (value) { + case "delete:users": + return DELETE_USERS; + case "get:users": + return GET_USERS; + case "put:users": + return PUT_USERS; + case "post:users": + return POST_USERS; + case "patch:users": + return PATCH_USERS; + default: + return new ConnectionProfileProvisioningScimTokenScopeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GET_USERS, + + POST_USERS, + + PATCH_USERS, + + DELETE_USERS, + + PUT_USERS, + + UNKNOWN + } + + public interface Visitor { + T visitGetUsers(); + + T visitPostUsers(); + + T visitPatchUsers(); + + T visitDeleteUsers(); + + T visitPutUsers(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScimTokens.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScimTokens.java new file mode 100644 index 00000000..c572daa5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileProvisioningScimTokens.java @@ -0,0 +1,232 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionProfileProvisioningScimTokens.Builder.class) +public final class ConnectionProfileProvisioningScimTokens { + private final List scopes; + + private final OptionalNullable defaultExpiry; + + private final OptionalNullable maxAllowedExpiry; + + private final Map additionalProperties; + + private ConnectionProfileProvisioningScimTokens( + List scopes, + OptionalNullable defaultExpiry, + OptionalNullable maxAllowedExpiry, + Map additionalProperties) { + this.scopes = scopes; + this.defaultExpiry = defaultExpiry; + this.maxAllowedExpiry = maxAllowedExpiry; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("scopes") + public List getScopes() { + return scopes; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_expiry") + public OptionalNullable getDefaultExpiry() { + if (defaultExpiry == null) { + return OptionalNullable.absent(); + } + return defaultExpiry; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("max_allowed_expiry") + public OptionalNullable getMaxAllowedExpiry() { + if (maxAllowedExpiry == null) { + return OptionalNullable.absent(); + } + return maxAllowedExpiry; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_expiry") + private OptionalNullable _getDefaultExpiry() { + return defaultExpiry; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("max_allowed_expiry") + private OptionalNullable _getMaxAllowedExpiry() { + return maxAllowedExpiry; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileProvisioningScimTokens + && equalTo((ConnectionProfileProvisioningScimTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileProvisioningScimTokens other) { + return scopes.equals(other.scopes) + && defaultExpiry.equals(other.defaultExpiry) + && maxAllowedExpiry.equals(other.maxAllowedExpiry); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.scopes, this.defaultExpiry, this.maxAllowedExpiry); + } + + @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 scopes = new ArrayList<>(); + + private OptionalNullable defaultExpiry = OptionalNullable.absent(); + + private OptionalNullable maxAllowedExpiry = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConnectionProfileProvisioningScimTokens other) { + scopes(other.getScopes()); + defaultExpiry(other.getDefaultExpiry()); + maxAllowedExpiry(other.getMaxAllowedExpiry()); + return this; + } + + @JsonSetter(value = "scopes", nulls = Nulls.SKIP) + public Builder scopes(List scopes) { + this.scopes.clear(); + if (scopes != null) { + this.scopes.addAll(scopes); + } + return this; + } + + public Builder addScopes(ConnectionProfileProvisioningScimTokenScopeEnum scopes) { + this.scopes.add(scopes); + return this; + } + + public Builder addAllScopes(List scopes) { + if (scopes != null) { + this.scopes.addAll(scopes); + } + return this; + } + + @JsonSetter(value = "default_expiry", nulls = Nulls.SKIP) + public Builder defaultExpiry(@Nullable OptionalNullable defaultExpiry) { + this.defaultExpiry = defaultExpiry; + return this; + } + + public Builder defaultExpiry(Integer defaultExpiry) { + this.defaultExpiry = OptionalNullable.of(defaultExpiry); + return this; + } + + public Builder defaultExpiry(Optional defaultExpiry) { + if (defaultExpiry.isPresent()) { + this.defaultExpiry = OptionalNullable.of(defaultExpiry.get()); + } else { + this.defaultExpiry = OptionalNullable.absent(); + } + return this; + } + + public Builder defaultExpiry(com.auth0.client.mgmt.core.Nullable defaultExpiry) { + if (defaultExpiry.isNull()) { + this.defaultExpiry = OptionalNullable.ofNull(); + } else if (defaultExpiry.isEmpty()) { + this.defaultExpiry = OptionalNullable.absent(); + } else { + this.defaultExpiry = OptionalNullable.of(defaultExpiry.get()); + } + return this; + } + + @JsonSetter(value = "max_allowed_expiry", nulls = Nulls.SKIP) + public Builder maxAllowedExpiry(@Nullable OptionalNullable maxAllowedExpiry) { + this.maxAllowedExpiry = maxAllowedExpiry; + return this; + } + + public Builder maxAllowedExpiry(Integer maxAllowedExpiry) { + this.maxAllowedExpiry = OptionalNullable.of(maxAllowedExpiry); + return this; + } + + public Builder maxAllowedExpiry(Optional maxAllowedExpiry) { + if (maxAllowedExpiry.isPresent()) { + this.maxAllowedExpiry = OptionalNullable.of(maxAllowedExpiry.get()); + } else { + this.maxAllowedExpiry = OptionalNullable.absent(); + } + return this; + } + + public Builder maxAllowedExpiry(com.auth0.client.mgmt.core.Nullable maxAllowedExpiry) { + if (maxAllowedExpiry.isNull()) { + this.maxAllowedExpiry = OptionalNullable.ofNull(); + } else if (maxAllowedExpiry.isEmpty()) { + this.maxAllowedExpiry = OptionalNullable.absent(); + } else { + this.maxAllowedExpiry = OptionalNullable.of(maxAllowedExpiry.get()); + } + return this; + } + + public ConnectionProfileProvisioningScimTokens build() { + return new ConnectionProfileProvisioningScimTokens( + scopes, defaultExpiry, maxAllowedExpiry, 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/ConnectionProfileStrategyOverride.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverride.java index 0298a55e..d47a90ec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverride.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverride.java @@ -25,14 +25,18 @@ public final class ConnectionProfileStrategyOverride { private final Optional connectionConfig; + private final Optional provisioning; + private final Map additionalProperties; private ConnectionProfileStrategyOverride( Optional> enabledFeatures, Optional connectionConfig, + Optional provisioning, Map additionalProperties) { this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; + this.provisioning = provisioning; this.additionalProperties = additionalProperties; } @@ -46,6 +50,11 @@ public Optional getConnectio return connectionConfig; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -58,12 +67,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionProfileStrategyOverride other) { - return enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig); + return enabledFeatures.equals(other.enabledFeatures) + && connectionConfig.equals(other.connectionConfig) + && provisioning.equals(other.provisioning); } @java.lang.Override public int hashCode() { - return Objects.hash(this.enabledFeatures, this.connectionConfig); + return Objects.hash(this.enabledFeatures, this.connectionConfig, this.provisioning); } @java.lang.Override @@ -81,6 +92,8 @@ public static final class Builder { private Optional connectionConfig = Optional.empty(); + private Optional provisioning = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -89,6 +102,7 @@ private Builder() {} public Builder from(ConnectionProfileStrategyOverride other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); + provisioning(other.getProvisioning()); return this; } @@ -114,8 +128,20 @@ public Builder connectionConfig(ConnectionProfileStrategyOverridesConnectionConf return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileStrategyOverridesProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + return this; + } + public ConnectionProfileStrategyOverride build() { - return new ConnectionProfileStrategyOverride(enabledFeatures, connectionConfig, additionalProperties); + return new ConnectionProfileStrategyOverride( + enabledFeatures, connectionConfig, provisioning, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverridesProvisioning.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverridesProvisioning.java new file mode 100644 index 00000000..0dc66ae3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverridesProvisioning.java @@ -0,0 +1,131 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionProfileStrategyOverridesProvisioning.Builder.class) +public final class ConnectionProfileStrategyOverridesProvisioning { + private final Optional scim; + + private final Optional googleWorkspace; + + private final Map additionalProperties; + + private ConnectionProfileStrategyOverridesProvisioning( + Optional scim, + Optional googleWorkspace, + Map additionalProperties) { + this.scim = scim; + this.googleWorkspace = googleWorkspace; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("scim") + public Optional getScim() { + return scim; + } + + @JsonProperty("google_workspace") + public Optional getGoogleWorkspace() { + return googleWorkspace; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionProfileStrategyOverridesProvisioning + && equalTo((ConnectionProfileStrategyOverridesProvisioning) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionProfileStrategyOverridesProvisioning other) { + return scim.equals(other.scim) && googleWorkspace.equals(other.googleWorkspace); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.scim, this.googleWorkspace); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional scim = Optional.empty(); + + private Optional googleWorkspace = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConnectionProfileStrategyOverridesProvisioning other) { + scim(other.getScim()); + googleWorkspace(other.getGoogleWorkspace()); + return this; + } + + @JsonSetter(value = "scim", nulls = Nulls.SKIP) + public Builder scim(Optional scim) { + this.scim = scim; + return this; + } + + public Builder scim(ConnectionProfileProvisioningScim scim) { + this.scim = Optional.ofNullable(scim); + return this; + } + + @JsonSetter(value = "google_workspace", nulls = Nulls.SKIP) + public Builder googleWorkspace(Optional googleWorkspace) { + this.googleWorkspace = googleWorkspace; + return this; + } + + public Builder googleWorkspace(ConnectionProfileProvisioningGoogleWorkspace googleWorkspace) { + this.googleWorkspace = Optional.ofNullable(googleWorkspace); + return this; + } + + public ConnectionProfileStrategyOverridesProvisioning build() { + return new ConnectionProfileStrategyOverridesProvisioning(scim, googleWorkspace, 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/ConnectionProfileTemplate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplate.java index 2dfd766c..7c1225b5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplate.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplate.java @@ -33,6 +33,8 @@ public final class ConnectionProfileTemplate { private final Optional strategyOverrides; + private final Optional provisioning; + private final Map additionalProperties; private ConnectionProfileTemplate( @@ -42,6 +44,7 @@ private ConnectionProfileTemplate( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, Map additionalProperties) { this.name = name; this.organization = organization; @@ -49,6 +52,7 @@ private ConnectionProfileTemplate( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; this.additionalProperties = additionalProperties; } @@ -82,6 +86,11 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -99,7 +108,8 @@ private boolean equalTo(ConnectionProfileTemplate other) { && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) && enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); + && strategyOverrides.equals(other.strategyOverrides) + && provisioning.equals(other.provisioning); } @java.lang.Override @@ -110,7 +120,8 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning); } @java.lang.Override @@ -136,6 +147,8 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional provisioning = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -148,6 +161,7 @@ public Builder from(ConnectionProfileTemplate other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); return this; } @@ -217,6 +231,17 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + return this; + } + public ConnectionProfileTemplate build() { return new ConnectionProfileTemplate( name, @@ -225,6 +250,7 @@ public ConnectionProfileTemplate build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, additionalProperties); } 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 30dd990f..7e11b47f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java @@ -42,6 +42,8 @@ public final class ConnectionPropertiesOptions { private final Optional customScripts; + private final Optional otpSettings; + private final OptionalNullable authenticationMethods; private final OptionalNullable passkeyOptions; @@ -83,8 +85,6 @@ public final class ConnectionPropertiesOptions { private final OptionalNullable gatewayAuthentication; - private final OptionalNullable federatedConnectionsAccessTokens; - private final Optional passwordOptions; private final Optional assertionDecryptionSettings; @@ -93,6 +93,10 @@ public final class ConnectionPropertiesOptions { private final Optional dpopSigningAlg; + private final Optional enablePushedAuthorizationRequests; + + private final Optional pushedAuthorizationRequestEndpoint; + private final OptionalNullable tokenEndpointAuthMethod; private final OptionalNullable tokenEndpointAuthSigningAlg; @@ -101,6 +105,20 @@ public final class ConnectionPropertiesOptions { private final Optional idTokenSessionExpirySupported; + private final Optional useOauthSpecScope; + + private final OptionalNullable clientId; + + private final OptionalNullable> allowedAudiences; + + private final OptionalNullable discoveryUrl; + + private final OptionalNullable oidcMetadata; + + private final Optional> thumbprints; + + private final Optional> thumbprintsSha384; + private final Map additionalProperties; private ConnectionPropertiesOptions( @@ -113,6 +131,7 @@ private ConnectionPropertiesOptions( Optional importMode, OptionalNullable>> configuration, Optional customScripts, + Optional otpSettings, OptionalNullable authenticationMethods, OptionalNullable passkeyOptions, OptionalNullable passwordPolicy, @@ -133,15 +152,23 @@ private ConnectionPropertiesOptions( OptionalNullable>> upstreamParams, Optional setUserRootAttributes, OptionalNullable gatewayAuthentication, - OptionalNullable federatedConnectionsAccessTokens, Optional passwordOptions, Optional assertionDecryptionSettings, OptionalNullable> idTokenSignedResponseAlgs, Optional dpopSigningAlg, + Optional enablePushedAuthorizationRequests, + Optional pushedAuthorizationRequestEndpoint, OptionalNullable tokenEndpointAuthMethod, OptionalNullable tokenEndpointAuthSigningAlg, Optional tokenEndpointJwtcaAudFormat, Optional idTokenSessionExpirySupported, + Optional useOauthSpecScope, + OptionalNullable clientId, + OptionalNullable> allowedAudiences, + OptionalNullable discoveryUrl, + OptionalNullable oidcMetadata, + Optional> thumbprints, + Optional> thumbprintsSha384, Map additionalProperties) { this.validation = validation; this.nonPersistentAttrs = nonPersistentAttrs; @@ -152,6 +179,7 @@ private ConnectionPropertiesOptions( this.importMode = importMode; this.configuration = configuration; this.customScripts = customScripts; + this.otpSettings = otpSettings; this.authenticationMethods = authenticationMethods; this.passkeyOptions = passkeyOptions; this.passwordPolicy = passwordPolicy; @@ -172,15 +200,23 @@ private ConnectionPropertiesOptions( this.upstreamParams = upstreamParams; this.setUserRootAttributes = setUserRootAttributes; this.gatewayAuthentication = gatewayAuthentication; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.passwordOptions = passwordOptions; this.assertionDecryptionSettings = assertionDecryptionSettings; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.dpopSigningAlg = dpopSigningAlg; + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.useOauthSpecScope = useOauthSpecScope; + this.clientId = clientId; + this.allowedAudiences = allowedAudiences; + this.discoveryUrl = discoveryUrl; + this.oidcMetadata = oidcMetadata; + this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.additionalProperties = additionalProperties; } @@ -259,6 +295,11 @@ public Optional getCustomScripts() { return customScripts; } + @JsonProperty("otp_settings") + public Optional getOtpSettings() { + return otpSettings; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authentication_methods") public OptionalNullable getAuthenticationMethods() { @@ -395,15 +436,6 @@ public OptionalNullable getGatewayAuthenticatio return gatewayAuthentication; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - @JsonProperty("password_options") public Optional getPasswordOptions() { return passwordOptions; @@ -428,6 +460,16 @@ public Optional getDpopSigningAlg() { return dpopSigningAlg; } + @JsonProperty("enable_pushed_authorization_requests") + public Optional getEnablePushedAuthorizationRequests() { + return enablePushedAuthorizationRequests; + } + + @JsonProperty("pushed_authorization_request_endpoint") + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_endpoint_auth_method") public OptionalNullable getTokenEndpointAuthMethod() { @@ -456,6 +498,63 @@ public Optional getIdTokenSessionExpirySupported() { return idTokenSessionExpirySupported; } + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return The client ID registered with the identity provider + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + public OptionalNullable getClientId() { + if (clientId == null) { + return OptionalNullable.absent(); + } + return clientId; + } + + /** + * @return Additional Google client IDs accepted as the aud (audience) of Google ID tokens, used by Google native login and Google Streamlined Linking. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allowed_audiences") + public OptionalNullable> getAllowedAudiences() { + if (allowedAudiences == null) { + return OptionalNullable.absent(); + } + return allowedAudiences; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("discovery_url") + public OptionalNullable getDiscoveryUrl() { + if (discoveryUrl == null) { + return OptionalNullable.absent(); + } + return discoveryUrl; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("oidc_metadata") + public OptionalNullable getOidcMetadata() { + if (oidcMetadata == null) { + return OptionalNullable.absent(); + } + return oidcMetadata; + } + + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("thumbprints_sha384") + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("validation") private OptionalNullable _getValidation() { @@ -529,12 +628,6 @@ private OptionalNullable _getGatewayAuthenticat return gatewayAuthentication; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") private OptionalNullable> _getIdTokenSignedResponseAlgs() { @@ -553,6 +646,30 @@ private OptionalNullable _getTokenEnd return tokenEndpointAuthSigningAlg; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allowed_audiences") + private OptionalNullable> _getAllowedAudiences() { + return allowedAudiences; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("discovery_url") + private OptionalNullable _getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("oidc_metadata") + private OptionalNullable _getOidcMetadata() { + return oidcMetadata; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -574,6 +691,7 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && importMode.equals(other.importMode) && configuration.equals(other.configuration) && customScripts.equals(other.customScripts) + && otpSettings.equals(other.otpSettings) && authenticationMethods.equals(other.authenticationMethods) && passkeyOptions.equals(other.passkeyOptions) && passwordPolicy.equals(other.passwordPolicy) @@ -594,15 +712,23 @@ private boolean equalTo(ConnectionPropertiesOptions other) { && upstreamParams.equals(other.upstreamParams) && setUserRootAttributes.equals(other.setUserRootAttributes) && gatewayAuthentication.equals(other.gatewayAuthentication) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && passwordOptions.equals(other.passwordOptions) && assertionDecryptionSettings.equals(other.assertionDecryptionSettings) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && dpopSigningAlg.equals(other.dpopSigningAlg) + && enablePushedAuthorizationRequests.equals(other.enablePushedAuthorizationRequests) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) - && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported); + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && clientId.equals(other.clientId) + && allowedAudiences.equals(other.allowedAudiences) + && discoveryUrl.equals(other.discoveryUrl) + && oidcMetadata.equals(other.oidcMetadata) + && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384); } @java.lang.Override @@ -617,6 +743,7 @@ public int hashCode() { this.importMode, this.configuration, this.customScripts, + this.otpSettings, this.authenticationMethods, this.passkeyOptions, this.passwordPolicy, @@ -637,15 +764,23 @@ public int hashCode() { this.upstreamParams, this.setUserRootAttributes, this.gatewayAuthentication, - this.federatedConnectionsAccessTokens, this.passwordOptions, this.assertionDecryptionSettings, this.idTokenSignedResponseAlgs, this.dpopSigningAlg, + this.enablePushedAuthorizationRequests, + this.pushedAuthorizationRequestEndpoint, this.tokenEndpointAuthMethod, this.tokenEndpointAuthSigningAlg, this.tokenEndpointJwtcaAudFormat, - this.idTokenSessionExpirySupported); + this.idTokenSessionExpirySupported, + this.useOauthSpecScope, + this.clientId, + this.allowedAudiences, + this.discoveryUrl, + this.oidcMetadata, + this.thumbprints, + this.thumbprintsSha384); } @java.lang.Override @@ -677,6 +812,8 @@ public static final class Builder { private Optional customScripts = Optional.empty(); + private Optional otpSettings = Optional.empty(); + private OptionalNullable authenticationMethods = OptionalNullable.absent(); private OptionalNullable passkeyOptions = OptionalNullable.absent(); @@ -720,9 +857,6 @@ public static final class Builder { private OptionalNullable gatewayAuthentication = OptionalNullable.absent(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - private Optional passwordOptions = Optional.empty(); private Optional assertionDecryptionSettings = Optional.empty(); @@ -732,6 +866,10 @@ public static final class Builder { private Optional dpopSigningAlg = Optional.empty(); + private Optional enablePushedAuthorizationRequests = Optional.empty(); + + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + private OptionalNullable tokenEndpointAuthMethod = OptionalNullable.absent(); @@ -742,6 +880,20 @@ public static final class Builder { private Optional idTokenSessionExpirySupported = Optional.empty(); + private Optional useOauthSpecScope = Optional.empty(); + + private OptionalNullable clientId = OptionalNullable.absent(); + + private OptionalNullable> allowedAudiences = OptionalNullable.absent(); + + private OptionalNullable discoveryUrl = OptionalNullable.absent(); + + private OptionalNullable oidcMetadata = OptionalNullable.absent(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> thumbprintsSha384 = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -757,6 +909,7 @@ public Builder from(ConnectionPropertiesOptions other) { importMode(other.getImportMode()); configuration(other.getConfiguration()); customScripts(other.getCustomScripts()); + otpSettings(other.getOtpSettings()); authenticationMethods(other.getAuthenticationMethods()); passkeyOptions(other.getPasskeyOptions()); passwordPolicy(other.getPasswordPolicy()); @@ -777,15 +930,23 @@ public Builder from(ConnectionPropertiesOptions other) { upstreamParams(other.getUpstreamParams()); setUserRootAttributes(other.getSetUserRootAttributes()); gatewayAuthentication(other.getGatewayAuthentication()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); passwordOptions(other.getPasswordOptions()); assertionDecryptionSettings(other.getAssertionDecryptionSettings()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); dpopSigningAlg(other.getDpopSigningAlg()); + enablePushedAuthorizationRequests(other.getEnablePushedAuthorizationRequests()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + useOauthSpecScope(other.getUseOauthSpecScope()); + clientId(other.getClientId()); + allowedAudiences(other.getAllowedAudiences()); + discoveryUrl(other.getDiscoveryUrl()); + oidcMetadata(other.getOidcMetadata()); + thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); return this; } @@ -967,6 +1128,17 @@ public Builder customScripts(ConnectionCustomScripts customScripts) { return this; } + @JsonSetter(value = "otp_settings", nulls = Nulls.SKIP) + public Builder otpSettings(Optional otpSettings) { + this.otpSettings = otpSettings; + return this; + } + + public Builder otpSettings(ConnectionOtpSettings otpSettings) { + this.otpSettings = Optional.ofNullable(otpSettings); + return this; + } + @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) public Builder authenticationMethods( @Nullable OptionalNullable authenticationMethods) { @@ -1389,43 +1561,6 @@ public Builder gatewayAuthentication( return this; } - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public Builder federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - return this; - } - - public Builder federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); - return this; - } - - public Builder federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - public Builder federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } - return this; - } - @JsonSetter(value = "password_options", nulls = Nulls.SKIP) public Builder passwordOptions(Optional passwordOptions) { this.passwordOptions = passwordOptions; @@ -1496,6 +1631,28 @@ public Builder dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { return this; } + @JsonSetter(value = "enable_pushed_authorization_requests", nulls = Nulls.SKIP) + public Builder enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; + return this; + } + + public Builder enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = Optional.ofNullable(enablePushedAuthorizationRequests); + return this; + } + + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public Builder pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + + public Builder pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) public Builder tokenEndpointAuthMethod( @Nullable OptionalNullable tokenEndpointAuthMethod) { @@ -1590,6 +1747,169 @@ 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; + } + + /** + *

                                                              The client ID registered with the identity provider

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

                                                              Additional Google client IDs accepted as the aud (audience) of Google ID tokens, used by Google native login and Google Streamlined Linking.

                                                              + */ + @JsonSetter(value = "allowed_audiences", nulls = Nulls.SKIP) + public Builder allowedAudiences(@Nullable OptionalNullable> allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + public Builder allowedAudiences(List allowedAudiences) { + this.allowedAudiences = OptionalNullable.of(allowedAudiences); + return this; + } + + public Builder allowedAudiences(Optional> allowedAudiences) { + if (allowedAudiences.isPresent()) { + this.allowedAudiences = OptionalNullable.of(allowedAudiences.get()); + } else { + this.allowedAudiences = OptionalNullable.absent(); + } + return this; + } + + public Builder allowedAudiences(com.auth0.client.mgmt.core.Nullable> allowedAudiences) { + if (allowedAudiences.isNull()) { + this.allowedAudiences = OptionalNullable.ofNull(); + } else if (allowedAudiences.isEmpty()) { + this.allowedAudiences = OptionalNullable.absent(); + } else { + this.allowedAudiences = OptionalNullable.of(allowedAudiences.get()); + } + return this; + } + + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(@Nullable OptionalNullable discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = OptionalNullable.of(discoveryUrl); + return this; + } + + public Builder discoveryUrl(Optional discoveryUrl) { + if (discoveryUrl.isPresent()) { + this.discoveryUrl = OptionalNullable.of(discoveryUrl.get()); + } else { + this.discoveryUrl = OptionalNullable.absent(); + } + return this; + } + + public Builder discoveryUrl(com.auth0.client.mgmt.core.Nullable discoveryUrl) { + if (discoveryUrl.isNull()) { + this.discoveryUrl = OptionalNullable.ofNull(); + } else if (discoveryUrl.isEmpty()) { + this.discoveryUrl = OptionalNullable.absent(); + } else { + this.discoveryUrl = OptionalNullable.of(discoveryUrl.get()); + } + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata(@Nullable OptionalNullable oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata(ConnectionsOidcMetadata oidcMetadata) { + this.oidcMetadata = OptionalNullable.of(oidcMetadata); + return this; + } + + public Builder oidcMetadata(Optional oidcMetadata) { + if (oidcMetadata.isPresent()) { + this.oidcMetadata = OptionalNullable.of(oidcMetadata.get()); + } else { + this.oidcMetadata = OptionalNullable.absent(); + } + return this; + } + + public Builder oidcMetadata(com.auth0.client.mgmt.core.Nullable oidcMetadata) { + if (oidcMetadata.isNull()) { + this.oidcMetadata = OptionalNullable.ofNull(); + } else if (oidcMetadata.isEmpty()) { + this.oidcMetadata = OptionalNullable.absent(); + } else { + this.oidcMetadata = OptionalNullable.of(oidcMetadata.get()); + } + return this; + } + + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public Builder thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + + public Builder thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + public ConnectionPropertiesOptions build() { return new ConnectionPropertiesOptions( validation, @@ -1601,6 +1921,7 @@ public ConnectionPropertiesOptions build() { importMode, configuration, customScripts, + otpSettings, authenticationMethods, passkeyOptions, passwordPolicy, @@ -1621,15 +1942,23 @@ public ConnectionPropertiesOptions build() { upstreamParams, setUserRootAttributes, gatewayAuthentication, - federatedConnectionsAccessTokens, passwordOptions, assertionDecryptionSettings, idTokenSignedResponseAlgs, dpopSigningAlg, + enablePushedAuthorizationRequests, + pushedAuthorizationRequestEndpoint, tokenEndpointAuthMethod, tokenEndpointAuthSigningAlg, tokenEndpointJwtcaAudFormat, idTokenSessionExpirySupported, + useOauthSpecScope, + clientId, + allowedAudiences, + discoveryUrl, + oidcMetadata, + thumbprints, + thumbprintsSha384, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java index 137559f6..24a75f5c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java @@ -22,7 +22,9 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseCommon.Builder.class) -public final class ConnectionResponseCommon implements IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseCommon implements IConnectionResponseCommon { + private final String displayName; + private final String id; private final Optional> realms; @@ -31,8 +33,6 @@ public final class ConnectionResponseCommon implements IConnectionResponseCommon private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -40,24 +40,30 @@ public final class ConnectionResponseCommon implements IConnectionResponseCommon private final Map additionalProperties; private ConnectionResponseCommon( + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, Map additionalProperties) { + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.additionalProperties = additionalProperties; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -85,12 +91,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -115,11 +115,11 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionResponseCommon other) { - return id.equals(other.id) + return displayName.equals(other.displayName) + && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata); } @@ -127,11 +127,11 @@ private boolean equalTo(ConnectionResponseCommon other) { @java.lang.Override public int hashCode() { return Objects.hash( + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata); } @@ -141,16 +141,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseCommon other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { _FinalStage name(@NotNull String name); } @@ -173,10 +177,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -187,7 +187,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -196,8 +198,6 @@ public static final class Builder implements IdStage, NameStage, _FinalStage { private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -209,16 +209,23 @@ private Builder() {} @java.lang.Override public Builder from(ConnectionResponseCommon other) { + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -259,19 +266,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -308,7 +302,7 @@ public _FinalStage realms(Optional> realms) { @java.lang.Override public ConnectionResponseCommon build() { return new ConnectionResponseCommon( - id, realms, name, enabledClients, displayName, isDomainConnection, metadata, additionalProperties); + displayName, id, realms, name, enabledClients, isDomainConnection, metadata, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java index cb1bb84a..7d2f75de 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentAd.Builder.class) -public final class ConnectionResponseContentAd - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentAd implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentAd private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -53,11 +52,11 @@ public final class ConnectionResponseContentAd private ConnectionResponseContentAd( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAdStrategy strategy, @@ -66,11 +65,11 @@ private ConnectionResponseContentAd( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -91,6 +90,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -118,12 +123,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -165,11 +164,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentAd other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -182,11 +181,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -199,16 +198,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentAd other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -243,10 +246,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -265,7 +264,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -280,8 +281,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -299,11 +298,11 @@ private Builder() {} public Builder from(ConnectionResponseContentAd other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -312,6 +311,13 @@ public Builder from(ConnectionResponseContentAd other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -385,19 +391,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -462,11 +455,11 @@ public ConnectionResponseContentAd build() { return new ConnectionResponseContentAd( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java index 5916ad68..3c04d210 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentAdfs.Builder.class) -public final class ConnectionResponseContentAdfs - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentAdfs implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentAdfs private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -55,11 +54,11 @@ public final class ConnectionResponseContentAdfs private ConnectionResponseContentAdfs( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAdfsStrategy strategy, @@ -69,11 +68,11 @@ private ConnectionResponseContentAdfs( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -95,6 +94,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +127,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -174,11 +173,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentAdfs other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -192,11 +191,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -210,16 +209,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentAdfs other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -254,10 +257,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -280,7 +279,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -297,8 +298,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -316,11 +315,11 @@ private Builder() {} public Builder from(ConnectionResponseContentAdfs other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -330,6 +329,13 @@ public Builder from(ConnectionResponseContentAdfs other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -416,19 +422,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -493,11 +486,11 @@ public ConnectionResponseContentAdfs build() { return new ConnectionResponseContentAdfs( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java index dbb45b33..9d81e4c0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentAmazon.Builder.class) -public final class ConnectionResponseContentAmazon - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentAmazon implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentAmazon private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentAmazon private ConnectionResponseContentAmazon( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAmazonStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentAmazon( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentAmazon other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentAmazon other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentAmazon other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentAmazon other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentAmazon build() { return new ConnectionResponseContentAmazon( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java index ad956b28..b29e3d30 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentApple.Builder.class) -public final class ConnectionResponseContentApple - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentApple implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentApple private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentApple private ConnectionResponseContentApple( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAppleStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentApple( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentApple other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentApple other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentApple other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentApple other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentApple build() { return new ConnectionResponseContentApple( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java index 5e26f32c..ee06e9b8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentAuth0.Builder.class) -public final class ConnectionResponseContentAuth0 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentAuth0 implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentAuth0 private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentAuth0 private ConnectionResponseContentAuth0( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAuth0Strategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentAuth0( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentAuth0 other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentAuth0 other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentAuth0 other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentAuth0 other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentAuth0 build() { return new ConnectionResponseContentAuth0( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java index 9fe0306f..4d27f87d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentAuth0Oidc.Builder.class) -public final class ConnectionResponseContentAuth0Oidc - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentAuth0Oidc implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentAuth0Oidc private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentAuth0Oidc private ConnectionResponseContentAuth0Oidc( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAuth0OidcStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentAuth0Oidc( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentAuth0Oidc other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentAuth0Oidc other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentAuth0Oidc other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentAuth0Oidc other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentAuth0Oidc build() { return new ConnectionResponseContentAuth0Oidc( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java index 831897ac..d36957d4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentAzureAd.Builder.class) -public final class ConnectionResponseContentAzureAd - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentAzureAd implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentAzureAd private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -55,11 +54,11 @@ public final class ConnectionResponseContentAzureAd private ConnectionResponseContentAzureAd( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentAzureAdStrategy strategy, @@ -69,11 +68,11 @@ private ConnectionResponseContentAzureAd( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -95,6 +94,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +127,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -174,11 +173,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentAzureAd other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -192,11 +191,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -210,16 +209,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentAzureAd other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -254,10 +257,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -280,7 +279,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -297,8 +298,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -316,11 +315,11 @@ private Builder() {} public Builder from(ConnectionResponseContentAzureAd other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -330,6 +329,13 @@ public Builder from(ConnectionResponseContentAzureAd other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -416,19 +422,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -493,11 +486,11 @@ public ConnectionResponseContentAzureAd build() { return new ConnectionResponseContentAzureAd( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java index 19ae5aeb..7df9beae 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentBaidu.Builder.class) -public final class ConnectionResponseContentBaidu - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentBaidu implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentBaidu private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentBaidu private ConnectionResponseContentBaidu( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentBaiduStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentBaidu( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentBaidu other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentBaidu other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentBaidu other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentBaidu other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentBaidu build() { return new ConnectionResponseContentBaidu( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java index 10abc2e7..939b0ad3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentBitbucket.Builder.class) -public final class ConnectionResponseContentBitbucket - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentBitbucket implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentBitbucket private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentBitbucket private ConnectionResponseContentBitbucket( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentBitbucketStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentBitbucket( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentBitbucket other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentBitbucket other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentBitbucket other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentBitbucket other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentBitbucket build() { return new ConnectionResponseContentBitbucket( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java index be3b56ab..c1520b53 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentBitly.Builder.class) -public final class ConnectionResponseContentBitly - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentBitly implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentBitly private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentBitly private ConnectionResponseContentBitly( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentBitlyStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentBitly( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentBitly other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentBitly other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentBitly other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentBitly other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentBitly build() { return new ConnectionResponseContentBitly( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java index 14a5eb3f..90c0ed54 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentBox.Builder.class) -public final class ConnectionResponseContentBox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentBox implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentBox private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentBox private ConnectionResponseContentBox( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentBoxStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentBox( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentBox other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentBox other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentBox other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentBox other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentBox build() { return new ConnectionResponseContentBox( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java index 13a2077d..1e2b37f6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentCustom.Builder.class) -public final class ConnectionResponseContentCustom - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentCustom implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentCustom private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -53,11 +52,11 @@ public final class ConnectionResponseContentCustom private ConnectionResponseContentCustom( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentCustomStrategy strategy, @@ -66,11 +65,11 @@ private ConnectionResponseContentCustom( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -91,6 +90,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -118,12 +123,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -165,11 +164,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentCustom other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -182,11 +181,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -199,16 +198,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentCustom other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -243,10 +246,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -265,7 +264,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -280,8 +281,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -299,11 +298,11 @@ private Builder() {} public Builder from(ConnectionResponseContentCustom other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -312,6 +311,13 @@ public Builder from(ConnectionResponseContentCustom other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -385,19 +391,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -462,11 +455,11 @@ public ConnectionResponseContentCustom build() { return new ConnectionResponseContentCustom( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java index a0956e91..49aafc3b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentDaccount.Builder.class) -public final class ConnectionResponseContentDaccount - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentDaccount implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentDaccount private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentDaccount private ConnectionResponseContentDaccount( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentDaccountStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentDaccount( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentDaccount other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentDaccount other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentDaccount other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentDaccount other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentDaccount build() { return new ConnectionResponseContentDaccount( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java index 070ee7ff..16c487d6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentDropbox.Builder.class) -public final class ConnectionResponseContentDropbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentDropbox implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentDropbox private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentDropbox private ConnectionResponseContentDropbox( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentDropboxStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentDropbox( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentDropbox other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentDropbox other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentDropbox other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentDropbox other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentDropbox build() { return new ConnectionResponseContentDropbox( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java index cc7546bd..a1f21ce2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentDwolla.Builder.class) -public final class ConnectionResponseContentDwolla - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentDwolla implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentDwolla private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentDwolla private ConnectionResponseContentDwolla( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentDwollaStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentDwolla( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentDwolla other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentDwolla other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentDwolla other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentDwolla other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentDwolla build() { return new ConnectionResponseContentDwolla( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java index 95fb4cc2..ff1a58f0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentEmail.Builder.class) -public final class ConnectionResponseContentEmail - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentEmail implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentEmail private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentEmail private ConnectionResponseContentEmail( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentEmailStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentEmail( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentEmail other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentEmail other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentEmail other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentEmail other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentEmail build() { return new ConnectionResponseContentEmail( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java index 9cb54e48..781d84c4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentEvernote.Builder.class) -public final class ConnectionResponseContentEvernote - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentEvernote implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentEvernote private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentEvernote private ConnectionResponseContentEvernote( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentEvernoteStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentEvernote( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentEvernote other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentEvernote other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentEvernote other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentEvernote other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentEvernote build() { return new ConnectionResponseContentEvernote( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java index e537fcc8..716d38bc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentEvernoteSandbox.Builder.class) -public final class ConnectionResponseContentEvernoteSandbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentEvernoteSandbox implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentEvernoteSandbox private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentEvernoteSandbox private ConnectionResponseContentEvernoteSandbox( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentEvernoteSandboxStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentEvernoteSandbox( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentEvernoteSandbox other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentEvernoteSandbox other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentEvernoteSandbox other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentEvernoteSandbox other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentEvernoteSandbox build() { return new ConnectionResponseContentEvernoteSandbox( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java index a482f224..5da60b52 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentExact.Builder.class) -public final class ConnectionResponseContentExact - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentExact implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentExact private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentExact private ConnectionResponseContentExact( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentExactStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentExact( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentExact other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentExact other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentExact other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentExact other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentExact build() { return new ConnectionResponseContentExact( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java index 7e796603..b82361ab 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentFacebook.Builder.class) -public final class ConnectionResponseContentFacebook - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentFacebook implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentFacebook private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentFacebook private ConnectionResponseContentFacebook( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentFacebookStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentFacebook( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentFacebook other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentFacebook other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentFacebook other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentFacebook other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentFacebook build() { return new ConnectionResponseContentFacebook( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java index cac62812..c768824b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentFitbit.Builder.class) -public final class ConnectionResponseContentFitbit - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentFitbit implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentFitbit private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentFitbit private ConnectionResponseContentFitbit( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentFitbitStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentFitbit( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentFitbit other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentFitbit other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentFitbit other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentFitbit other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentFitbit build() { return new ConnectionResponseContentFitbit( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java index 7ab899f2..7b007788 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentGitHub.Builder.class) -public final class ConnectionResponseContentGitHub - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentGitHub implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentGitHub private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentGitHub private ConnectionResponseContentGitHub( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentGitHubStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentGitHub( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentGitHub other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentGitHub other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentGitHub other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentGitHub other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentGitHub build() { return new ConnectionResponseContentGitHub( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java index bea9e2ba..4799d4aa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentGoogleApps.Builder.class) -public final class ConnectionResponseContentGoogleApps - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentGoogleApps implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentGoogleApps private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -55,11 +54,11 @@ public final class ConnectionResponseContentGoogleApps private ConnectionResponseContentGoogleApps( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentGoogleAppsStrategy strategy, @@ -69,11 +68,11 @@ private ConnectionResponseContentGoogleApps( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -95,6 +94,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +127,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -175,11 +174,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentGoogleApps other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -193,11 +192,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -211,16 +210,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentGoogleApps other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -255,10 +258,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -281,7 +280,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -298,8 +299,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -317,11 +316,11 @@ private Builder() {} public Builder from(ConnectionResponseContentGoogleApps other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -331,6 +330,13 @@ public Builder from(ConnectionResponseContentGoogleApps other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -417,19 +423,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -494,11 +487,11 @@ public ConnectionResponseContentGoogleApps build() { return new ConnectionResponseContentGoogleApps( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java index 607e6ed2..24035419 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentGoogleOAuth2.Builder.class) -public final class ConnectionResponseContentGoogleOAuth2 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentGoogleOAuth2 implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentGoogleOAuth2 private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentGoogleOAuth2 private ConnectionResponseContentGoogleOAuth2( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentGoogleOAuth2Strategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentGoogleOAuth2( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentGoogleOAuth2 other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentGoogleOAuth2 other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentGoogleOAuth2 other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentGoogleOAuth2 other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentGoogleOAuth2 build() { return new ConnectionResponseContentGoogleOAuth2( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java index 10727a09..8ace1fcd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentInstagram.Builder.class) -public final class ConnectionResponseContentInstagram - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentInstagram implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentInstagram private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentInstagram private ConnectionResponseContentInstagram( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentInstagramStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentInstagram( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentInstagram other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentInstagram other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentInstagram other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentInstagram other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentInstagram build() { return new ConnectionResponseContentInstagram( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java index 2bf0d39a..acd681f3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentIp.Builder.class) -public final class ConnectionResponseContentIp - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentIp implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentIp private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -53,11 +52,11 @@ public final class ConnectionResponseContentIp private ConnectionResponseContentIp( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentIpStrategy strategy, @@ -66,11 +65,11 @@ private ConnectionResponseContentIp( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -91,6 +90,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -118,12 +123,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -165,11 +164,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentIp other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -182,11 +181,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -199,16 +198,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentIp other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -243,10 +246,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -265,7 +264,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -280,8 +281,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -299,11 +298,11 @@ private Builder() {} public Builder from(ConnectionResponseContentIp other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -312,6 +311,13 @@ public Builder from(ConnectionResponseContentIp other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -385,19 +391,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -462,11 +455,11 @@ public ConnectionResponseContentIp build() { return new ConnectionResponseContentIp( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java index bf3cfaa6..8b81f00e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentLine.Builder.class) -public final class ConnectionResponseContentLine - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentLine implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentLine private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentLine private ConnectionResponseContentLine( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentLineStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentLine( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentLine other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentLine other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentLine other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentLine other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentLine build() { return new ConnectionResponseContentLine( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java index 9eefe70d..8082b120 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentLinkedin.Builder.class) -public final class ConnectionResponseContentLinkedin - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentLinkedin implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentLinkedin private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentLinkedin private ConnectionResponseContentLinkedin( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentLinkedinStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentLinkedin( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentLinkedin other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentLinkedin other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentLinkedin other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentLinkedin other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentLinkedin build() { return new ConnectionResponseContentLinkedin( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java index 6e395ceb..4911c8e9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentOAuth1.Builder.class) -public final class ConnectionResponseContentOAuth1 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentOAuth1 implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentOAuth1 private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentOAuth1 private ConnectionResponseContentOAuth1( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentOAuth1Strategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentOAuth1( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentOAuth1 other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentOAuth1 other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentOAuth1 other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentOAuth1 other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentOAuth1 build() { return new ConnectionResponseContentOAuth1( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java index 9d29726a..d3d8b945 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentOAuth2.Builder.class) -public final class ConnectionResponseContentOAuth2 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentOAuth2 implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentOAuth2 private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentOAuth2 private ConnectionResponseContentOAuth2( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentOAuth2Strategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentOAuth2( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentOAuth2 other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentOAuth2 other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentOAuth2 other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentOAuth2 other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentOAuth2 build() { return new ConnectionResponseContentOAuth2( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java index 48fc0731..50309ef4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentOffice365.Builder.class) -public final class ConnectionResponseContentOffice365 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentOffice365 implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentOffice365 private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -55,11 +54,11 @@ public final class ConnectionResponseContentOffice365 private ConnectionResponseContentOffice365( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentOffice365Strategy strategy, @@ -69,11 +68,11 @@ private ConnectionResponseContentOffice365( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -95,6 +94,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +127,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -175,11 +174,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentOffice365 other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -193,11 +192,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -211,16 +210,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentOffice365 other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -255,10 +258,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -281,7 +280,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -298,8 +299,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -317,11 +316,11 @@ private Builder() {} public Builder from(ConnectionResponseContentOffice365 other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -331,6 +330,13 @@ public Builder from(ConnectionResponseContentOffice365 other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -417,19 +423,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -494,11 +487,11 @@ public ConnectionResponseContentOffice365 build() { return new ConnectionResponseContentOffice365( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java index 040dc79d..b36124f3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -19,10 +20,13 @@ 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 = ConnectionResponseContentOidc.Builder.class) -public final class ConnectionResponseContentOidc implements IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentOidc implements IConnectionResponseCommon { + private final String displayName; + private final String id; private final Optional> realms; @@ -31,8 +35,6 @@ public final class ConnectionResponseContentOidc implements IConnectionResponseC private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -45,6 +47,8 @@ public final class ConnectionResponseContentOidc implements IConnectionResponseC private final Optional crossAppAccessRequestingApp; + private final OptionalNullable crossAppAccessResourceApp; + private final Optional options; private final Optional showAsButton; @@ -52,36 +56,44 @@ public final class ConnectionResponseContentOidc implements IConnectionResponseC private final Map additionalProperties; private ConnectionResponseContentOidc( + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentOidcStrategy strategy, Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Optional options, Optional showAsButton, Map additionalProperties) { + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -109,12 +121,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -147,6 +153,15 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -157,6 +172,12 @@ public Optional getShowAsButton() { return showAsButton; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -169,17 +190,18 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConnectionResponseContentOidc other) { - return id.equals(other.id) + return displayName.equals(other.displayName) + && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -187,17 +209,18 @@ private boolean equalTo(ConnectionResponseContentOidc other) { @java.lang.Override public int hashCode() { return Objects.hash( + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, this.authentication, this.connectedAccounts, this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp, this.options, this.showAsButton); } @@ -207,16 +230,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentOidc other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -243,10 +270,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -267,6 +290,16 @@ public interface _FinalStage { _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(Optional crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsOidc options); @@ -277,7 +310,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -288,6 +323,9 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional options = Optional.empty(); + private OptionalNullable crossAppAccessResourceApp = + OptionalNullable.absent(); + private Optional crossAppAccessRequestingApp = Optional.empty(); private Optional connectedAccounts = Optional.empty(); @@ -298,8 +336,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -311,22 +347,30 @@ private Builder() {} @java.lang.Override public Builder from(ConnectionResponseContentOidc other) { + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -374,6 +418,44 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + @java.lang.Override public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); @@ -440,19 +522,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -489,17 +558,18 @@ public _FinalStage realms(Optional> realms) { @java.lang.Override public ConnectionResponseContentOidc build() { return new ConnectionResponseContentOidc( + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java index 950c53c5..e1f34862 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentOkta.Builder.class) -public final class ConnectionResponseContentOkta - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentOkta implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentOkta private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -55,11 +54,11 @@ public final class ConnectionResponseContentOkta private ConnectionResponseContentOkta( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentOktaStrategy strategy, @@ -69,11 +68,11 @@ private ConnectionResponseContentOkta( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -95,6 +94,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +127,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -174,11 +173,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentOkta other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -192,11 +191,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -210,16 +209,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentOkta other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -254,10 +257,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -280,7 +279,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -297,8 +298,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -316,11 +315,11 @@ private Builder() {} public Builder from(ConnectionResponseContentOkta other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -330,6 +329,13 @@ public Builder from(ConnectionResponseContentOkta other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -417,19 +423,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -494,11 +487,11 @@ public ConnectionResponseContentOkta build() { return new ConnectionResponseContentOkta( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java index 254b3be4..f68057bc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentPaypal.Builder.class) -public final class ConnectionResponseContentPaypal - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentPaypal implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentPaypal private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentPaypal private ConnectionResponseContentPaypal( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentPaypalStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentPaypal( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentPaypal other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentPaypal other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentPaypal other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentPaypal other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentPaypal build() { return new ConnectionResponseContentPaypal( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java index 00fa7f40..a78bf3a5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentPaypalSandbox.Builder.class) -public final class ConnectionResponseContentPaypalSandbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentPaypalSandbox implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentPaypalSandbox private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentPaypalSandbox private ConnectionResponseContentPaypalSandbox( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentPaypalSandboxStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentPaypalSandbox( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentPaypalSandbox other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentPaypalSandbox other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentPaypalSandbox other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentPaypalSandbox other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentPaypalSandbox build() { return new ConnectionResponseContentPaypalSandbox( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java index 3f799ae0..65a4bbf0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentPingFederate.Builder.class) -public final class ConnectionResponseContentPingFederate - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentPingFederate implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentPingFederate private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -55,11 +54,11 @@ public final class ConnectionResponseContentPingFederate private ConnectionResponseContentPingFederate( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentPingFederateStrategy strategy, @@ -69,11 +68,11 @@ private ConnectionResponseContentPingFederate( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -95,6 +94,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +127,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -175,11 +174,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentPingFederate other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -193,11 +192,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -211,16 +210,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentPingFederate other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -255,10 +258,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -281,7 +280,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -298,8 +299,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -317,11 +316,11 @@ private Builder() {} public Builder from(ConnectionResponseContentPingFederate other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -331,6 +330,13 @@ public Builder from(ConnectionResponseContentPingFederate other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -417,19 +423,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -494,11 +487,11 @@ public ConnectionResponseContentPingFederate build() { return new ConnectionResponseContentPingFederate( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java index 2930b305..a55103e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentPlanningCenter.Builder.class) -public final class ConnectionResponseContentPlanningCenter - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentPlanningCenter implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentPlanningCenter private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentPlanningCenter private ConnectionResponseContentPlanningCenter( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentPlanningCenterStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentPlanningCenter( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentPlanningCenter other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentPlanningCenter other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentPlanningCenter other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentPlanningCenter other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentPlanningCenter build() { return new ConnectionResponseContentPlanningCenter( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java index f5b843e4..36bacba4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentSalesforce.Builder.class) -public final class ConnectionResponseContentSalesforce - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentSalesforce implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentSalesforce private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentSalesforce private ConnectionResponseContentSalesforce( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSalesforceStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentSalesforce( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSalesforce other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSalesforce other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentSalesforce other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentSalesforce other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentSalesforce build() { return new ConnectionResponseContentSalesforce( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java index 4664bbd5..f8bc25e7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java @@ -23,11 +23,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentSalesforceCommunity.Builder.class) public final class ConnectionResponseContentSalesforceCommunity - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { + implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +38,6 @@ public final class ConnectionResponseContentSalesforceCommunity private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +51,11 @@ public final class ConnectionResponseContentSalesforceCommunity private ConnectionResponseContentSalesforceCommunity( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSalesforceCommunityStrategy strategy, @@ -63,11 +63,11 @@ private ConnectionResponseContentSalesforceCommunity( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +87,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +120,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +157,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSalesforceCommunity other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +173,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +189,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSalesforceCommunity other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +237,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +251,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +266,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +283,11 @@ private Builder() {} public Builder from(ConnectionResponseContentSalesforceCommunity other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +295,13 @@ public Builder from(ConnectionResponseContentSalesforceCommunity other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +362,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +426,11 @@ public ConnectionResponseContentSalesforceCommunity build() { return new ConnectionResponseContentSalesforceCommunity( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java index 6b03e1e1..5df665b3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java @@ -23,11 +23,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentSalesforceSandbox.Builder.class) public final class ConnectionResponseContentSalesforceSandbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { + implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +38,6 @@ public final class ConnectionResponseContentSalesforceSandbox private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +51,11 @@ public final class ConnectionResponseContentSalesforceSandbox private ConnectionResponseContentSalesforceSandbox( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSalesforceSandboxStrategy strategy, @@ -63,11 +63,11 @@ private ConnectionResponseContentSalesforceSandbox( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +87,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +120,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +157,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSalesforceSandbox other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +173,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +189,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSalesforceSandbox other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +237,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +251,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +266,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +283,11 @@ private Builder() {} public Builder from(ConnectionResponseContentSalesforceSandbox other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +295,13 @@ public Builder from(ConnectionResponseContentSalesforceSandbox other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +362,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +426,11 @@ public ConnectionResponseContentSalesforceSandbox build() { return new ConnectionResponseContentSalesforceSandbox( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java index 0f67f907..526653ad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -19,15 +20,17 @@ 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 = ConnectionResponseContentSaml.Builder.class) -public final class ConnectionResponseContentSaml - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentSaml implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,14 +39,16 @@ public final class ConnectionResponseContentSaml private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; private final ConnectionResponseContentSamlStrategy strategy; + private final Optional crossAppAccessRequestingApp; + + private final OptionalNullable crossAppAccessResourceApp; + private final Optional options; private final Optional provisioningTicketUrl; @@ -55,28 +60,32 @@ public final class ConnectionResponseContentSaml private ConnectionResponseContentSaml( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSamlStrategy strategy, + Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Optional options, Optional provisioningTicketUrl, Optional showAsButton, Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.options = options; this.provisioningTicketUrl = provisioningTicketUrl; this.showAsButton = showAsButton; @@ -95,6 +104,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -122,12 +137,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -145,6 +154,20 @@ public ConnectionResponseContentSamlStrategy getStrategy() { return strategy; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -160,6 +183,12 @@ public Optional getShowAsButton() { return showAsButton; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -174,14 +203,16 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSaml other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp) && options.equals(other.options) && provisioningTicketUrl.equals(other.provisioningTicketUrl) && showAsButton.equals(other.showAsButton); @@ -192,14 +223,16 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp, this.options, this.provisioningTicketUrl, this.showAsButton); @@ -210,16 +243,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSaml other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -254,10 +291,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -266,6 +299,20 @@ public interface _FinalStage { _FinalStage metadata(Map> metadata); + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + + _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(Optional crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsSaml options); @@ -280,7 +327,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -293,12 +342,15 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional options = Optional.empty(); + private OptionalNullable crossAppAccessResourceApp = + OptionalNullable.absent(); + + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional>> metadata = Optional.empty(); private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -316,20 +368,29 @@ private Builder() {} public Builder from(ConnectionResponseContentSaml other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); options(other.getOptions()); provisioningTicketUrl(other.getProvisioningTicketUrl()); showAsButton(other.getShowAsButton()); return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -390,6 +451,58 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage metadata(Map> metadata) { this.metadata = Optional.ofNullable(metadata); @@ -416,19 +529,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -493,14 +593,16 @@ public ConnectionResponseContentSaml build() { return new ConnectionResponseContentSaml( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, + crossAppAccessRequestingApp, + crossAppAccessResourceApp, options, provisioningTicketUrl, showAsButton, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java index bdfd9414..878fd95f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentSharepoint.Builder.class) -public final class ConnectionResponseContentSharepoint - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentSharepoint implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentSharepoint private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -53,11 +52,11 @@ public final class ConnectionResponseContentSharepoint private ConnectionResponseContentSharepoint( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSharepointStrategy strategy, @@ -66,11 +65,11 @@ private ConnectionResponseContentSharepoint( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -91,6 +90,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -118,12 +123,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -166,11 +165,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSharepoint other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -183,11 +182,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -200,16 +199,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSharepoint other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -244,10 +247,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -266,7 +265,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -281,8 +282,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -300,11 +299,11 @@ private Builder() {} public Builder from(ConnectionResponseContentSharepoint other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -313,6 +312,13 @@ public Builder from(ConnectionResponseContentSharepoint other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -386,19 +392,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -463,11 +456,11 @@ public ConnectionResponseContentSharepoint build() { return new ConnectionResponseContentSharepoint( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java index b33addf8..c7d93e67 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentShop.Builder.class) -public final class ConnectionResponseContentShop - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentShop implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentShop private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentShop private ConnectionResponseContentShop( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentShopStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentShop( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentShop other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentShop other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentShop other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentShop other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentShop build() { return new ConnectionResponseContentShop( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java index b07ce6e3..597bc9ea 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentShopify.Builder.class) -public final class ConnectionResponseContentShopify - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentShopify implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentShopify private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentShopify private ConnectionResponseContentShopify( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentShopifyStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentShopify( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentShopify other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentShopify other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentShopify other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentShopify other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentShopify build() { return new ConnectionResponseContentShopify( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java index 879db62a..31d2779c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentSms.Builder.class) -public final class ConnectionResponseContentSms - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentSms implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentSms private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentSms private ConnectionResponseContentSms( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSmsStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentSms( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSms other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSms other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentSms other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentSms other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentSms build() { return new ConnectionResponseContentSms( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java index 701aacd9..82137eea 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentSoundcloud.Builder.class) -public final class ConnectionResponseContentSoundcloud - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentSoundcloud implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentSoundcloud private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentSoundcloud private ConnectionResponseContentSoundcloud( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentSoundcloudStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentSoundcloud( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentSoundcloud other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentSoundcloud other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentSoundcloud other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentSoundcloud other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentSoundcloud build() { return new ConnectionResponseContentSoundcloud( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java index c4b78f38..9641e320 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java @@ -23,11 +23,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentThirtySevenSignals.Builder.class) public final class ConnectionResponseContentThirtySevenSignals - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { + implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +38,6 @@ public final class ConnectionResponseContentThirtySevenSignals private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +51,11 @@ public final class ConnectionResponseContentThirtySevenSignals private ConnectionResponseContentThirtySevenSignals( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentThirtySevenSignalsStrategy strategy, @@ -63,11 +63,11 @@ private ConnectionResponseContentThirtySevenSignals( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +87,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +120,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +157,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentThirtySevenSignals other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +173,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +189,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentThirtySevenSignals other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +237,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +251,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +266,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +283,11 @@ private Builder() {} public Builder from(ConnectionResponseContentThirtySevenSignals other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +295,13 @@ public Builder from(ConnectionResponseContentThirtySevenSignals other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +362,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +426,11 @@ public ConnectionResponseContentThirtySevenSignals build() { return new ConnectionResponseContentThirtySevenSignals( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java index 196c1061..3bdef759 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentTwitter.Builder.class) -public final class ConnectionResponseContentTwitter - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentTwitter implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentTwitter private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentTwitter private ConnectionResponseContentTwitter( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentTwitterStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentTwitter( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentTwitter other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentTwitter other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentTwitter other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentTwitter other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentTwitter build() { return new ConnectionResponseContentTwitter( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java index edc2f685..bac8bf0b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentUntappd.Builder.class) -public final class ConnectionResponseContentUntappd - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentUntappd implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentUntappd private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentUntappd private ConnectionResponseContentUntappd( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentUntappdStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentUntappd( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentUntappd other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentUntappd other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentUntappd other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentUntappd other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentUntappd build() { return new ConnectionResponseContentUntappd( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java index 60144a7c..208e9e57 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentVkontakte.Builder.class) -public final class ConnectionResponseContentVkontakte - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentVkontakte implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentVkontakte private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentVkontakte private ConnectionResponseContentVkontakte( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentVkontakteStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentVkontakte( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentVkontakte other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentVkontakte other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentVkontakte other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentVkontakte other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentVkontakte build() { return new ConnectionResponseContentVkontakte( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java index 0a2c280e..97818415 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentWeibo.Builder.class) -public final class ConnectionResponseContentWeibo - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentWeibo implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentWeibo private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentWeibo private ConnectionResponseContentWeibo( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentWeiboStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentWeibo( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentWeibo other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentWeibo other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentWeibo other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentWeibo other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentWeibo build() { return new ConnectionResponseContentWeibo( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java index 2a83ff47..46626b8d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentWindowsLive.Builder.class) -public final class ConnectionResponseContentWindowsLive - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentWindowsLive implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentWindowsLive private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentWindowsLive private ConnectionResponseContentWindowsLive( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentWindowsLiveStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentWindowsLive( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentWindowsLive other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentWindowsLive other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentWindowsLive other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentWindowsLive other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentWindowsLive build() { return new ConnectionResponseContentWindowsLive( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java index d3613d8d..e97d1400 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentWordpress.Builder.class) -public final class ConnectionResponseContentWordpress - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentWordpress implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentWordpress private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentWordpress private ConnectionResponseContentWordpress( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentWordpressStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentWordpress( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -157,11 +156,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentWordpress other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -173,11 +172,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -189,16 +188,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentWordpress other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -233,10 +236,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -251,7 +250,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -264,8 +265,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -283,11 +282,11 @@ private Builder() {} public Builder from(ConnectionResponseContentWordpress other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -295,6 +294,13 @@ public Builder from(ConnectionResponseContentWordpress other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -355,19 +361,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -432,11 +425,11 @@ public ConnectionResponseContentWordpress build() { return new ConnectionResponseContentWordpress( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java index f41177c5..dae54bd4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentYahoo.Builder.class) -public final class ConnectionResponseContentYahoo - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentYahoo implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentYahoo private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentYahoo private ConnectionResponseContentYahoo( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentYahooStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentYahoo( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentYahoo other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentYahoo other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentYahoo other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentYahoo other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentYahoo build() { return new ConnectionResponseContentYahoo( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java index 2e9b8066..cb72f499 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java @@ -22,12 +22,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConnectionResponseContentYandex.Builder.class) -public final class ConnectionResponseContentYandex - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon { +public final class ConnectionResponseContentYandex implements IConnectionPurposes, IConnectionResponseCommon { private final Optional authentication; private final Optional connectedAccounts; + private final String displayName; + private final String id; private final Optional> realms; @@ -36,8 +37,6 @@ public final class ConnectionResponseContentYandex private final Optional> enabledClients; - private final Optional displayName; - private final Optional isDomainConnection; private final Optional>> metadata; @@ -51,11 +50,11 @@ public final class ConnectionResponseContentYandex private ConnectionResponseContentYandex( Optional authentication, Optional connectedAccounts, + String displayName, String id, Optional> realms, String name, Optional> enabledClients, - Optional displayName, Optional isDomainConnection, Optional>> metadata, ConnectionResponseContentYandexStrategy strategy, @@ -63,11 +62,11 @@ private ConnectionResponseContentYandex( Map additionalProperties) { this.authentication = authentication; this.connectedAccounts = connectedAccounts; + this.displayName = displayName; this.id = id; this.realms = realms; this.name = name; this.enabledClients = enabledClients; - this.displayName = displayName; this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; @@ -87,6 +86,12 @@ public Optional getConnectedAccounts() { return connectedAccounts; } + @JsonProperty("display_name") + @java.lang.Override + public String getDisplayName() { + return displayName; + } + @JsonProperty("id") @java.lang.Override public String getId() { @@ -114,12 +119,6 @@ public Optional> getEnabledClients() { return enabledClients; } - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - @JsonProperty("is_domain_connection") @java.lang.Override public Optional getIsDomainConnection() { @@ -156,11 +155,11 @@ public Map getAdditionalProperties() { private boolean equalTo(ConnectionResponseContentYandex other) { return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) && id.equals(other.id) && realms.equals(other.realms) && name.equals(other.name) && enabledClients.equals(other.enabledClients) - && displayName.equals(other.displayName) && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) @@ -172,11 +171,11 @@ public int hashCode() { return Objects.hash( this.authentication, this.connectedAccounts, + this.displayName, this.id, this.realms, this.name, this.enabledClients, - this.displayName, this.isDomainConnection, this.metadata, this.strategy, @@ -188,16 +187,20 @@ public String toString() { return ObjectMappers.stringify(this); } - public static IdStage builder() { + public static DisplayNameStage builder() { return new Builder(); } - public interface IdStage { - NameStage id(@NotNull String id); + public interface DisplayNameStage { + IdStage displayName(@NotNull String displayName); Builder from(ConnectionResponseContentYandex other); } + public interface IdStage { + NameStage id(@NotNull String id); + } + public interface NameStage { StrategyStage name(@NotNull String name); } @@ -232,10 +235,6 @@ public interface _FinalStage { _FinalStage enabledClients(List enabledClients); - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - _FinalStage isDomainConnection(Optional isDomainConnection); _FinalStage isDomainConnection(Boolean isDomainConnection); @@ -250,7 +249,9 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + public static final class Builder implements DisplayNameStage, IdStage, NameStage, StrategyStage, _FinalStage { + private String displayName; + private String id; private String name; @@ -263,8 +264,6 @@ public static final class Builder implements IdStage, NameStage, StrategyStage, private Optional isDomainConnection = Optional.empty(); - private Optional displayName = Optional.empty(); - private Optional> enabledClients = Optional.empty(); private Optional> realms = Optional.empty(); @@ -282,11 +281,11 @@ private Builder() {} public Builder from(ConnectionResponseContentYandex other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); id(other.getId()); realms(other.getRealms()); name(other.getName()); enabledClients(other.getEnabledClients()); - displayName(other.getDisplayName()); isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); @@ -294,6 +293,13 @@ public Builder from(ConnectionResponseContentYandex other) { return this; } + @java.lang.Override + @JsonSetter("display_name") + public IdStage displayName(@NotNull String displayName) { + this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); + return this; + } + @java.lang.Override @JsonSetter("id") public NameStage id(@NotNull String id) { @@ -354,19 +360,6 @@ public _FinalStage isDomainConnection(Optional isDomainConnection) { return this; } - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - /** *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -431,11 +424,11 @@ public ConnectionResponseContentYandex build() { return new ConnectionResponseContentYandex( authentication, connectedAccounts, + displayName, id, realms, name, enabledClients, - displayName, isDomainConnection, metadata, strategy, diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java index 16be79e8..2df97a46 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java @@ -53,8 +53,12 @@ public final class ConnectionStrategyEnum { public static final ConnectionStrategyEnum IP = new ConnectionStrategyEnum(Value.IP, "ip"); + public static final ConnectionStrategyEnum ATLASSIAN = new ConnectionStrategyEnum(Value.ATLASSIAN, "atlassian"); + public static final ConnectionStrategyEnum ADFS = new ConnectionStrategyEnum(Value.ADFS, "adfs"); + public static final ConnectionStrategyEnum GITLAB = new ConnectionStrategyEnum(Value.GITLAB, "gitlab"); + public static final ConnectionStrategyEnum EMAIL = new ConnectionStrategyEnum(Value.EMAIL, "email"); public static final ConnectionStrategyEnum YAHOO = new ConnectionStrategyEnum(Value.YAHOO, "yahoo"); @@ -65,6 +69,11 @@ public final class ConnectionStrategyEnum { public static final ConnectionStrategyEnum PAYPAL = new ConnectionStrategyEnum(Value.PAYPAL, "paypal"); + public static final ConnectionStrategyEnum HUBSPOT_MCP = + new ConnectionStrategyEnum(Value.HUBSPOT_MCP, "hubspot-mcp"); + + public static final ConnectionStrategyEnum LINEAR_MCP = new ConnectionStrategyEnum(Value.LINEAR_MCP, "linear-mcp"); + public static final ConnectionStrategyEnum LINKEDIN = new ConnectionStrategyEnum(Value.LINKEDIN, "linkedin"); public static final ConnectionStrategyEnum GOOGLE_APPS = @@ -72,8 +81,13 @@ public final class ConnectionStrategyEnum { public static final ConnectionStrategyEnum DWOLLA = new ConnectionStrategyEnum(Value.DWOLLA, "dwolla"); + public static final ConnectionStrategyEnum NOTION_MCP = new ConnectionStrategyEnum(Value.NOTION_MCP, "notion-mcp"); + public static final ConnectionStrategyEnum SHOP = new ConnectionStrategyEnum(Value.SHOP, "shop"); + public static final ConnectionStrategyEnum CLOUDFLARE_MCP = + new ConnectionStrategyEnum(Value.CLOUDFLARE_MCP, "cloudflare-mcp"); + public static final ConnectionStrategyEnum AUTH0OIDC = new ConnectionStrategyEnum(Value.AUTH0OIDC, "auth0-oidc"); public static final ConnectionStrategyEnum PLANNINGCENTER = @@ -90,6 +104,8 @@ public final class ConnectionStrategyEnum { public static final ConnectionStrategyEnum EXACT = new ConnectionStrategyEnum(Value.EXACT, "exact"); + public static final ConnectionStrategyEnum ASANA = new ConnectionStrategyEnum(Value.ASANA, "asana"); + public static final ConnectionStrategyEnum FITBIT = new ConnectionStrategyEnum(Value.FITBIT, "fitbit"); public static final ConnectionStrategyEnum EVERNOTE = new ConnectionStrategyEnum(Value.EVERNOTE, "evernote"); @@ -101,6 +117,10 @@ public final class ConnectionStrategyEnum { public static final ConnectionStrategyEnum SALESFORCE_SANDBOX = new ConnectionStrategyEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + public static final ConnectionStrategyEnum SLACK = new ConnectionStrategyEnum(Value.SLACK, "slack"); + + public static final ConnectionStrategyEnum SENTRY_MCP = new ConnectionStrategyEnum(Value.SENTRY_MCP, "sentry-mcp"); + public static final ConnectionStrategyEnum FACEBOOK = new ConnectionStrategyEnum(Value.FACEBOOK, "facebook"); public static final ConnectionStrategyEnum APPLE = new ConnectionStrategyEnum(Value.APPLE, "apple"); @@ -203,8 +223,12 @@ public T visit(Visitor visitor) { return visitor.visitBox(); case IP: return visitor.visitIp(); + case ATLASSIAN: + return visitor.visitAtlassian(); case ADFS: return visitor.visitAdfs(); + case GITLAB: + return visitor.visitGitlab(); case EMAIL: return visitor.visitEmail(); case YAHOO: @@ -215,14 +239,22 @@ public T visit(Visitor visitor) { return visitor.visitCustom(); case PAYPAL: return visitor.visitPaypal(); + case HUBSPOT_MCP: + return visitor.visitHubspotMcp(); + case LINEAR_MCP: + return visitor.visitLinearMcp(); case LINKEDIN: return visitor.visitLinkedin(); case GOOGLE_APPS: return visitor.visitGoogleApps(); case DWOLLA: return visitor.visitDwolla(); + case NOTION_MCP: + return visitor.visitNotionMcp(); case SHOP: return visitor.visitShop(); + case CLOUDFLARE_MCP: + return visitor.visitCloudflareMcp(); case AUTH0OIDC: return visitor.visitAuth0Oidc(); case PLANNINGCENTER: @@ -237,6 +269,8 @@ public T visit(Visitor visitor) { return visitor.visitWordpress(); case EXACT: return visitor.visitExact(); + case ASANA: + return visitor.visitAsana(); case FITBIT: return visitor.visitFitbit(); case EVERNOTE: @@ -247,6 +281,10 @@ public T visit(Visitor visitor) { return visitor.visitShopify(); case SALESFORCE_SANDBOX: return visitor.visitSalesforceSandbox(); + case SLACK: + return visitor.visitSlack(); + case SENTRY_MCP: + return visitor.visitSentryMcp(); case FACEBOOK: return visitor.visitFacebook(); case APPLE: @@ -324,8 +362,12 @@ public static ConnectionStrategyEnum valueOf(String value) { return BOX; case "ip": return IP; + case "atlassian": + return ATLASSIAN; case "adfs": return ADFS; + case "gitlab": + return GITLAB; case "email": return EMAIL; case "yahoo": @@ -336,14 +378,22 @@ public static ConnectionStrategyEnum valueOf(String value) { return CUSTOM; case "paypal": return PAYPAL; + case "hubspot-mcp": + return HUBSPOT_MCP; + case "linear-mcp": + return LINEAR_MCP; case "linkedin": return LINKEDIN; case "google-apps": return GOOGLE_APPS; case "dwolla": return DWOLLA; + case "notion-mcp": + return NOTION_MCP; case "shop": return SHOP; + case "cloudflare-mcp": + return CLOUDFLARE_MCP; case "auth0-oidc": return AUTH0OIDC; case "planningcenter": @@ -358,6 +408,8 @@ public static ConnectionStrategyEnum valueOf(String value) { return WORDPRESS; case "exact": return EXACT; + case "asana": + return ASANA; case "fitbit": return FITBIT; case "evernote": @@ -368,6 +420,10 @@ public static ConnectionStrategyEnum valueOf(String value) { return SHOPIFY; case "salesforce-sandbox": return SALESFORCE_SANDBOX; + case "slack": + return SLACK; + case "sentry-mcp": + return SENTRY_MCP; case "facebook": return FACEBOOK; case "apple": @@ -512,6 +568,24 @@ public enum Value { YANDEX, + NOTION_MCP, + + ASANA, + + ATLASSIAN, + + CLOUDFLARE_MCP, + + GITLAB, + + HUBSPOT_MCP, + + LINEAR_MCP, + + SENTRY_MCP, + + SLACK, + AUTH0ADLDAP, UNKNOWN @@ -628,6 +702,24 @@ public interface Visitor { T visitYandex(); + T visitNotionMcp(); + + T visitAsana(); + + T visitAtlassian(); + + T visitCloudflareMcp(); + + T visitGitlab(); + + T visitHubspotMcp(); + + T visitLinearMcp(); + + T visitSentryMcp(); + + T visitSlack(); + T visitAuth0Adldap(); T visitUnknown(String unknownType); diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionsOidcMetadata.java new file mode 100644 index 00000000..0d39b2d8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConnectionsOidcMetadata.java @@ -0,0 +1,1408 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConnectionsOidcMetadata.Builder.class) +public final class ConnectionsOidcMetadata { + private final Optional issuer; + + private final Optional authorizationEndpoint; + + private final Optional tokenEndpoint; + + private final Optional userinfoEndpoint; + + private final Optional jwksUri; + + private final Optional registrationEndpoint; + + private final OptionalNullable> scopesSupported; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> grantTypesSupported; + + private final Optional> acrValuesSupported; + + private final OptionalNullable> subjectTypesSupported; + + private final Optional> idTokenSigningAlgValuesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> displayValuesSupported; + + private final Optional> claimTypesSupported; + + private final Optional> claimsSupported; + + private final Optional serviceDocumentation; + + private final Optional> claimsLocalesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional endSessionEndpoint; + + private final Optional pushedAuthorizationRequestEndpoint; + + private final Optional requirePushedAuthorizationRequests; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Map additionalProperties; + + private ConnectionsOidcMetadata( + Optional issuer, + Optional authorizationEndpoint, + Optional tokenEndpoint, + Optional userinfoEndpoint, + Optional jwksUri, + Optional registrationEndpoint, + OptionalNullable> scopesSupported, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> grantTypesSupported, + Optional> acrValuesSupported, + OptionalNullable> subjectTypesSupported, + Optional> idTokenSigningAlgValuesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + Optional> userinfoSigningAlgValuesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> displayValuesSupported, + Optional> claimTypesSupported, + Optional> claimsSupported, + Optional serviceDocumentation, + Optional> claimsLocalesSupported, + Optional> uiLocalesSupported, + Optional claimsParameterSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional opPolicyUri, + Optional opTosUri, + Optional endSessionEndpoint, + Optional pushedAuthorizationRequestEndpoint, + Optional requirePushedAuthorizationRequests, + Optional> dpopSigningAlgValuesSupported, + Map additionalProperties) { + this.issuer = issuer; + this.authorizationEndpoint = authorizationEndpoint; + this.tokenEndpoint = tokenEndpoint; + this.userinfoEndpoint = userinfoEndpoint; + this.jwksUri = jwksUri; + this.registrationEndpoint = registrationEndpoint; + this.scopesSupported = scopesSupported; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.grantTypesSupported = grantTypesSupported; + this.acrValuesSupported = acrValuesSupported; + this.subjectTypesSupported = subjectTypesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.displayValuesSupported = displayValuesSupported; + this.claimTypesSupported = claimTypesSupported; + this.claimsSupported = claimsSupported; + this.serviceDocumentation = serviceDocumentation; + this.claimsLocalesSupported = claimsLocalesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.endSessionEndpoint = endSessionEndpoint; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("scopes_supported") + public OptionalNullable> getScopesSupported() { + if (scopesSupported == null) { + return OptionalNullable.absent(); + } + return scopesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("subject_types_supported") + public OptionalNullable> getSubjectTypesSupported() { + if (subjectTypesSupported == null) { + return OptionalNullable.absent(); + } + return subjectTypesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public Optional> getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the display parameter values that the OpenID Provider supports. These values are described in Section 3.1.2.1 of OpenID Connect Core 1.0 [OpenID.Core] + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return URL of the identity provider's Pushed Authorization Request (PAR) endpoint, as per https://datatracker.ietf.org/doc/html/rfc9126. Must use HTTPS scheme. + */ + @JsonProperty("pushed_authorization_request_endpoint") + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + + /** + * @return Boolean parameter indicating whether the identity provider requires Pushed Authorization Requests (PAR), as per https://datatracker.ietf.org/doc/html/rfc9126. Discovered from the identity provider's metadata; not used to decide whether the server performs PAR. + */ + @JsonProperty("require_pushed_authorization_requests") + public Optional getRequirePushedAuthorizationRequests() { + return requirePushedAuthorizationRequests; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("scopes_supported") + private OptionalNullable> _getScopesSupported() { + return scopesSupported; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("subject_types_supported") + private OptionalNullable> _getSubjectTypesSupported() { + return subjectTypesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionsOidcMetadata && equalTo((ConnectionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConnectionsOidcMetadata other) { + return issuer.equals(other.issuer) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && tokenEndpoint.equals(other.tokenEndpoint) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && jwksUri.equals(other.jwksUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && scopesSupported.equals(other.scopesSupported) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && grantTypesSupported.equals(other.grantTypesSupported) + && acrValuesSupported.equals(other.acrValuesSupported) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsSupported.equals(other.claimsSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) + && requirePushedAuthorizationRequests.equals(other.requirePushedAuthorizationRequests) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.issuer, + this.authorizationEndpoint, + this.tokenEndpoint, + this.userinfoEndpoint, + this.jwksUri, + this.registrationEndpoint, + this.scopesSupported, + this.responseModesSupported, + this.responseTypesSupported, + this.grantTypesSupported, + this.acrValuesSupported, + this.subjectTypesSupported, + this.idTokenSigningAlgValuesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.userinfoSigningAlgValuesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.displayValuesSupported, + this.claimTypesSupported, + this.claimsSupported, + this.serviceDocumentation, + this.claimsLocalesSupported, + this.uiLocalesSupported, + this.claimsParameterSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.opPolicyUri, + this.opTosUri, + this.endSessionEndpoint, + this.pushedAuthorizationRequestEndpoint, + this.requirePushedAuthorizationRequests, + this.dpopSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional issuer = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private OptionalNullable> scopesSupported = OptionalNullable.absent(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + private OptionalNullable> subjectTypesSupported = OptionalNullable.absent(); + + private Optional> idTokenSigningAlgValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + + private Optional requirePushedAuthorizationRequests = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConnectionsOidcMetadata other) { + issuer(other.getIssuer()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + tokenEndpoint(other.getTokenEndpoint()); + userinfoEndpoint(other.getUserinfoEndpoint()); + jwksUri(other.getJwksUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + scopesSupported(other.getScopesSupported()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + grantTypesSupported(other.getGrantTypesSupported()); + acrValuesSupported(other.getAcrValuesSupported()); + subjectTypesSupported(other.getSubjectTypesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsSupported(other.getClaimsSupported()); + serviceDocumentation(other.getServiceDocumentation()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + endSessionEndpoint(other.getEndSessionEndpoint()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); + requirePushedAuthorizationRequests(other.getRequirePushedAuthorizationRequests()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public Builder issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + public Builder issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public Builder authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + public Builder authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public Builder tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + public Builder tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public Builder userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + public Builder userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public Builder jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + public Builder jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public Builder registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + public Builder registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public Builder responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + public Builder responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public Builder responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + public Builder responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public Builder grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + public Builder grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public Builder acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + public Builder acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public Builder idTokenSigningAlgValuesSupported(Optional> idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + return this; + } + + public Builder idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported = Optional.ofNullable(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public Builder idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + public Builder idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public Builder idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + public Builder idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public Builder userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + public Builder userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public Builder userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + public Builder userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public Builder userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + public Builder userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public Builder requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + public Builder requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public Builder requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + public Builder requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public Builder requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + public Builder requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + public Builder tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public Builder tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + public Builder tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the display parameter values that the OpenID Provider supports. These values are described in Section 3.1.2.1 of OpenID Connect Core 1.0 [OpenID.Core]

                                                              + */ + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public Builder displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + public Builder displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public Builder claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + public Builder claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public Builder claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + public Builder claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public Builder serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + public Builder serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public Builder claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + public Builder claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public Builder uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + public Builder uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public Builder claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + public Builder claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public Builder requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + public Builder requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public Builder requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + public Builder requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public Builder requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + public Builder requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public Builder opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + public Builder opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public Builder opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + public Builder opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public Builder endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + public Builder endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's Pushed Authorization Request (PAR) endpoint, as per https://datatracker.ietf.org/doc/html/rfc9126. Must use HTTPS scheme.

                                                              + */ + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public Builder pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + + public Builder pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + + /** + *

                                                              Boolean parameter indicating whether the identity provider requires Pushed Authorization Requests (PAR), as per https://datatracker.ietf.org/doc/html/rfc9126. Discovered from the identity provider's metadata; not used to decide whether the server performs PAR.

                                                              + */ + @JsonSetter(value = "require_pushed_authorization_requests", nulls = Nulls.SKIP) + public Builder requirePushedAuthorizationRequests(Optional requirePushedAuthorizationRequests) { + this.requirePushedAuthorizationRequests = requirePushedAuthorizationRequests; + return this; + } + + public Builder requirePushedAuthorizationRequests(Boolean requirePushedAuthorizationRequests) { + this.requirePushedAuthorizationRequests = Optional.ofNullable(requirePushedAuthorizationRequests); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public Builder dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + public Builder dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + public ConnectionsOidcMetadata build() { + return new ConnectionsOidcMetadata( + issuer, + authorizationEndpoint, + tokenEndpoint, + userinfoEndpoint, + jwksUri, + registrationEndpoint, + scopesSupported, + responseModesSupported, + responseTypesSupported, + grantTypesSupported, + acrValuesSupported, + subjectTypesSupported, + idTokenSigningAlgValuesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + userinfoSigningAlgValuesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + displayValuesSupported, + claimTypesSupported, + claimsSupported, + serviceDocumentation, + claimsLocalesSupported, + uiLocalesSupported, + claimsParameterSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + opPolicyUri, + opTosUri, + endSessionEndpoint, + pushedAuthorizationRequestEndpoint, + requirePushedAuthorizationRequests, + dpopSigningAlgValuesSupported, + 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/ConsentSigningKey.java b/src/main/java/com/auth0/client/mgmt/types/ConsentSigningKey.java new file mode 100644 index 00000000..9bfea26c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ConsentSigningKey.java @@ -0,0 +1,234 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConsentSigningKey.Builder.class) +public final class ConsentSigningKey { + private final String kid; + + private final String deviceIdentifier; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime expiresAt; + + private final Map additionalProperties; + + private ConsentSigningKey( + String kid, + String deviceIdentifier, + OffsetDateTime createdAt, + OffsetDateTime expiresAt, + Map additionalProperties) { + this.kid = kid; + this.deviceIdentifier = deviceIdentifier; + this.createdAt = createdAt; + this.expiresAt = expiresAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The key identifier of the consent signing key. + */ + @JsonProperty("kid") + public String getKid() { + return kid; + } + + /** + * @return A human-readable label for the device holding the corresponding private key. + */ + @JsonProperty("device_identifier") + public String getDeviceIdentifier() { + return deviceIdentifier; + } + + /** + * @return The ISO 8601 timestamp at which the key was registered. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp at which the key expires and can no longer be used to verify consent decisions. + */ + @JsonProperty("expires_at") + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConsentSigningKey && equalTo((ConsentSigningKey) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConsentSigningKey other) { + return kid.equals(other.kid) + && deviceIdentifier.equals(other.deviceIdentifier) + && createdAt.equals(other.createdAt) + && expiresAt.equals(other.expiresAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.kid, this.deviceIdentifier, this.createdAt, this.expiresAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static KidStage builder() { + return new Builder(); + } + + public interface KidStage { + /** + *

                                                              The key identifier of the consent signing key.

                                                              + */ + DeviceIdentifierStage kid(@NotNull String kid); + + Builder from(ConsentSigningKey other); + } + + public interface DeviceIdentifierStage { + /** + *

                                                              A human-readable label for the device holding the corresponding private key.

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

                                                              The ISO 8601 timestamp at which the key was registered.

                                                              + */ + ExpiresAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface ExpiresAtStage { + /** + *

                                                              The ISO 8601 timestamp at which the key expires and can no longer be used to verify consent decisions.

                                                              + */ + _FinalStage expiresAt(@NotNull OffsetDateTime expiresAt); + } + + public interface _FinalStage { + ConsentSigningKey build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements KidStage, DeviceIdentifierStage, CreatedAtStage, ExpiresAtStage, _FinalStage { + private String kid; + + private String deviceIdentifier; + + private OffsetDateTime createdAt; + + private OffsetDateTime expiresAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConsentSigningKey other) { + kid(other.getKid()); + deviceIdentifier(other.getDeviceIdentifier()); + createdAt(other.getCreatedAt()); + expiresAt(other.getExpiresAt()); + return this; + } + + /** + *

                                                              The key identifier of the consent signing key.

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

                                                              A human-readable label for the device holding the corresponding private key.

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

                                                              The ISO 8601 timestamp at which the key was registered.

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

                                                              The ISO 8601 timestamp at which the key expires and can no longer be used to verify consent decisions.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("expires_at") + public _FinalStage expiresAt(@NotNull OffsetDateTime expiresAt) { + this.expiresAt = Objects.requireNonNull(expiresAt, "expiresAt must not be null"); + return this; + } + + @java.lang.Override + public ConsentSigningKey build() { + return new ConsentSigningKey(kid, deviceIdentifier, createdAt, expiresAt, 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/CreateActionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java index 75994ec6..5c7f8161 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java @@ -275,7 +275,6 @@ public Builder from(CreateActionRequestContent other) { } /** - *

                                                              The name of an action.

                                                              *

                                                              The name of an action.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateAgentRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateAgentRequestContent.java new file mode 100644 index 00000000..bf77f658 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateAgentRequestContent.java @@ -0,0 +1,248 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateAgentRequestContent.Builder.class) +public final class CreateAgentRequestContent { + private final String name; + + private final Optional clientId; + + private final Optional externalAgentId; + + private final Optional> metadata; + + private final Map additionalProperties; + + private CreateAgentRequestContent( + String name, + Optional clientId, + Optional externalAgentId, + Optional> metadata, + Map additionalProperties) { + this.name = name; + this.clientId = clientId; + this.externalAgentId = externalAgentId; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The agent name. Cannot contain <, >, or null bytes. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Optional client ID to associate with the agent + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + /** + * @return Optional external identifier for the agent. Immutable after creation. Must be unique within the tenant. + */ + @JsonProperty("external_agent_id") + public Optional getExternalAgentId() { + return externalAgentId; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateAgentRequestContent && equalTo((CreateAgentRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateAgentRequestContent other) { + return name.equals(other.name) + && clientId.equals(other.clientId) + && externalAgentId.equals(other.externalAgentId) + && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.clientId, this.externalAgentId, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

                                                              The agent name. Cannot contain <, >, or null bytes.

                                                              + */ + _FinalStage name(@NotNull String name); + + Builder from(CreateAgentRequestContent other); + } + + public interface _FinalStage { + CreateAgentRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Optional client ID to associate with the agent

                                                              + */ + _FinalStage clientId(Optional clientId); + + _FinalStage clientId(String clientId); + + /** + *

                                                              Optional external identifier for the agent. Immutable after creation. Must be unique within the tenant.

                                                              + */ + _FinalStage externalAgentId(Optional externalAgentId); + + _FinalStage externalAgentId(String externalAgentId); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional> metadata = Optional.empty(); + + private Optional externalAgentId = Optional.empty(); + + private Optional clientId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateAgentRequestContent other) { + name(other.getName()); + clientId(other.getClientId()); + externalAgentId(other.getExternalAgentId()); + metadata(other.getMetadata()); + return this; + } + + /** + *

                                                              The agent name. Cannot contain <, >, or null bytes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              Optional external identifier for the agent. Immutable after creation. Must be unique within the tenant.

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

                                                              Optional external identifier for the agent. Immutable after creation. Must be unique within the tenant.

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

                                                              Optional client ID to associate with the agent

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

                                                              Optional client ID to associate with the agent

                                                              + */ + @java.lang.Override + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public _FinalStage clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + @java.lang.Override + public CreateAgentRequestContent build() { + return new CreateAgentRequestContent(name, clientId, externalAgentId, metadata, 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/CreateAnonymousSessions.java b/src/main/java/com/auth0/client/mgmt/types/CreateAnonymousSessions.java new file mode 100644 index 00000000..68189944 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateAnonymousSessions.java @@ -0,0 +1,127 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateAnonymousSessions.Builder.class) +public final class CreateAnonymousSessions { + private final boolean active; + + private final Map additionalProperties; + + private CreateAnonymousSessions(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return If set to true, this client is allowed to create anonymous sessions. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateAnonymousSessions && equalTo((CreateAnonymousSessions) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateAnonymousSessions other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              If set to true, this client is allowed to create anonymous sessions.

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

                                                              If set to true, this client is allowed to create anonymous sessions.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public CreateAnonymousSessions build() { + return new CreateAnonymousSessions(active, 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/CreateBrandingThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateBrandingThemeResponseContent.java index 9f71be38..15a1c453 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateBrandingThemeResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateBrandingThemeResponseContent.java @@ -10,10 +10,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -27,6 +29,8 @@ public final class CreateBrandingThemeResponseContent { private final BrandingThemeFonts fonts; + private final Optional identifiers; + private final BrandingThemePageBackground pageBackground; private final String themeId; @@ -40,6 +44,7 @@ private CreateBrandingThemeResponseContent( BrandingThemeColors colors, String displayName, BrandingThemeFonts fonts, + Optional identifiers, BrandingThemePageBackground pageBackground, String themeId, BrandingThemeWidget widget, @@ -48,6 +53,7 @@ private CreateBrandingThemeResponseContent( this.colors = colors; this.displayName = displayName; this.fonts = fonts; + this.identifiers = identifiers; this.pageBackground = pageBackground; this.themeId = themeId; this.widget = widget; @@ -77,6 +83,11 @@ public BrandingThemeFonts getFonts() { return fonts; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("page_background") public BrandingThemePageBackground getPageBackground() { return pageBackground; @@ -112,6 +123,7 @@ private boolean equalTo(CreateBrandingThemeResponseContent other) { && colors.equals(other.colors) && displayName.equals(other.displayName) && fonts.equals(other.fonts) + && identifiers.equals(other.identifiers) && pageBackground.equals(other.pageBackground) && themeId.equals(other.themeId) && widget.equals(other.widget); @@ -124,6 +136,7 @@ public int hashCode() { this.colors, this.displayName, this.fonts, + this.identifiers, this.pageBackground, this.themeId, this.widget); @@ -180,6 +193,10 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage identifiers(Optional identifiers); + + _FinalStage identifiers(BrandingThemeIdentifiers identifiers); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -206,6 +223,8 @@ public static final class Builder private BrandingThemeWidget widget; + private Optional identifiers = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -217,6 +236,7 @@ public Builder from(CreateBrandingThemeResponseContent other) { colors(other.getColors()); displayName(other.getDisplayName()); fonts(other.getFonts()); + identifiers(other.getIdentifiers()); pageBackground(other.getPageBackground()); themeId(other.getThemeId()); widget(other.getWidget()); @@ -238,7 +258,6 @@ public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { } /** - *

                                                              Display Name

                                                              *

                                                              Display Name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -264,7 +283,6 @@ public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBack } /** - *

                                                              Theme Id

                                                              *

                                                              Theme Id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -282,10 +300,31 @@ public _FinalStage widget(@NotNull BrandingThemeWidget widget) { return this; } + @java.lang.Override + public _FinalStage identifiers(BrandingThemeIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public _FinalStage identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + @java.lang.Override public CreateBrandingThemeResponseContent build() { return new CreateBrandingThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); + borders, + colors, + displayName, + fonts, + identifiers, + pageBackground, + themeId, + widget, + additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java index 103d7460..b52aade2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java @@ -278,7 +278,6 @@ public Builder from(CreateClientGrantRequestContent other) { } /** - *

                                                              The audience (API identifier) of this client grant

                                                              *

                                                              The audience (API identifier) of this client grant

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientProfileRequestContent.java new file mode 100644 index 00000000..d854e845 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientProfileRequestContent.java @@ -0,0 +1,241 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateClientProfileRequestContent.Builder.class) +public final class CreateClientProfileRequestContent { + private final String name; + + private final OptionalNullable description; + + private final ClientProfileClientConfiguration clientConfiguration; + + private final ClientProfileApplyPolicy applyPolicy; + + private final Map additionalProperties; + + private CreateClientProfileRequestContent( + String name, + OptionalNullable description, + ClientProfileClientConfiguration clientConfiguration, + ClientProfileApplyPolicy applyPolicy, + Map additionalProperties) { + this.name = name; + this.description = description; + this.clientConfiguration = clientConfiguration; + this.applyPolicy = applyPolicy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + @JsonProperty("client_configuration") + public ClientProfileClientConfiguration getClientConfiguration() { + return clientConfiguration; + } + + @JsonProperty("apply_policy") + public ClientProfileApplyPolicy getApplyPolicy() { + return applyPolicy; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateClientProfileRequestContent && equalTo((CreateClientProfileRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateClientProfileRequestContent other) { + return name.equals(other.name) + && description.equals(other.description) + && clientConfiguration.equals(other.clientConfiguration) + && applyPolicy.equals(other.applyPolicy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.clientConfiguration, this.applyPolicy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + ClientConfigurationStage name(@NotNull String name); + + Builder from(CreateClientProfileRequestContent other); + } + + public interface ClientConfigurationStage { + ApplyPolicyStage clientConfiguration(@NotNull ClientProfileClientConfiguration clientConfiguration); + } + + public interface ApplyPolicyStage { + _FinalStage applyPolicy(@NotNull ClientProfileApplyPolicy applyPolicy); + } + + public interface _FinalStage { + CreateClientProfileRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(@Nullable OptionalNullable description); + + _FinalStage description(String description); + + _FinalStage description(Optional description); + + _FinalStage description(com.auth0.client.mgmt.core.Nullable description); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, ClientConfigurationStage, ApplyPolicyStage, _FinalStage { + private String name; + + private ClientProfileClientConfiguration clientConfiguration; + + private ClientProfileApplyPolicy applyPolicy; + + private OptionalNullable description = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateClientProfileRequestContent other) { + name(other.getName()); + description(other.getDescription()); + clientConfiguration(other.getClientConfiguration()); + applyPolicy(other.getApplyPolicy()); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public ClientConfigurationStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("client_configuration") + public ApplyPolicyStage clientConfiguration(@NotNull ClientProfileClientConfiguration clientConfiguration) { + this.clientConfiguration = + Objects.requireNonNull(clientConfiguration, "clientConfiguration must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("apply_policy") + public _FinalStage applyPolicy(@NotNull ClientProfileApplyPolicy applyPolicy) { + this.applyPolicy = Objects.requireNonNull(applyPolicy, "applyPolicy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage description(com.auth0.client.mgmt.core.Nullable description) { + if (description.isNull()) { + this.description = OptionalNullable.ofNull(); + } else if (description.isEmpty()) { + this.description = OptionalNullable.absent(); + } else { + this.description = OptionalNullable.of(description.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage description(Optional description) { + if (description.isPresent()) { + this.description = OptionalNullable.of(description.get()); + } else { + this.description = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = OptionalNullable.of(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(@Nullable OptionalNullable description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateClientProfileRequestContent build() { + return new CreateClientProfileRequestContent( + name, description, clientConfiguration, applyPolicy, 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/CreateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java index 196dbebd..007a9a39 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java @@ -125,16 +125,30 @@ public final class CreateClientRequestContent { private final Optional resourceServerIdentifier; + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional thirdPartySecurityMode; private final Optional redirectionPolicy; private final Optional expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional googleAccountLinking; + private final Optional> asyncApprovalNotificationChannels; + private final OptionalNullable agentId; + + private final Optional oidcSupport; + private final Map additionalProperties; private CreateClientRequestContent( @@ -188,11 +202,18 @@ private CreateClientRequestContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional resourceServerIdentifier, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional thirdPartySecurityMode, Optional redirectionPolicy, Optional expressConfiguration, + Optional b2BIntegrationConfiguration, Optional myOrganizationConfiguration, + Optional googleAccountLinking, Optional> asyncApprovalNotificationChannels, + OptionalNullable agentId, + Optional oidcSupport, Map additionalProperties) { this.name = name; this.description = description; @@ -244,11 +265,18 @@ private CreateClientRequestContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.resourceServerIdentifier = resourceServerIdentifier; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.thirdPartySecurityMode = thirdPartySecurityMode; this.redirectionPolicy = redirectionPolicy; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; + this.agentId = agentId; + this.oidcSupport = oidcSupport; this.additionalProperties = additionalProperties; } @@ -615,6 +643,21 @@ public Optional getResourceServerIdentifier() { return resourceServerIdentifier; } + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + @JsonProperty("third_party_security_mode") public Optional getThirdPartySecurityMode() { return thirdPartySecurityMode; @@ -630,16 +673,43 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonProperty("my_organization_configuration") public Optional getMyOrganizationConfiguration() { return myOrganizationConfiguration; } + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + @JsonProperty("async_approval_notification_channels") public Optional> getAsyncApprovalNotificationChannels() { return asyncApprovalNotificationChannels; } + /** + * @return ID of the agent to associate with this client. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("agent_id") + public OptionalNullable getAgentId() { + if (agentId == null) { + return OptionalNullable.absent(); + } + return agentId; + } + + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_transfer") private OptionalNullable _getSessionTransfer() { @@ -676,6 +746,12 @@ private OptionalNullable _getParRequestExpiry() { return parRequestExpiry; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("agent_id") + private OptionalNullable _getAgentId() { + return agentId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -739,11 +815,18 @@ private boolean equalTo(CreateClientRequestContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && resourceServerIdentifier.equals(other.resourceServerIdentifier) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) && redirectionPolicy.equals(other.redirectionPolicy) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); + && googleAccountLinking.equals(other.googleAccountLinking) + && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) + && agentId.equals(other.agentId) + && oidcSupport.equals(other.oidcSupport); } @java.lang.Override @@ -799,11 +882,18 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.resourceServerIdentifier, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.thirdPartySecurityMode, this.redirectionPolicy, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, - this.asyncApprovalNotificationChannels); + this.googleAccountLinking, + this.asyncApprovalNotificationChannels, + this.agentId, + this.oidcSupport); } @java.lang.Override @@ -1145,6 +1235,22 @@ _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( _FinalStage resourceServerIdentifier(String resourceServerIdentifier); + _FinalStage identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant); + + _FinalStage identityAssertionAuthorizationGrant( + CreateIdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant); + + _FinalStage anonymousSessions(Optional anonymousSessions); + + _FinalStage anonymousSessions(CreateAnonymousSessions anonymousSessions); + + _FinalStage enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding); + + _FinalStage enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding); + _FinalStage thirdPartySecurityMode(Optional thirdPartySecurityMode); _FinalStage thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPartySecurityMode); @@ -1157,33 +1263,72 @@ _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( _FinalStage expressConfiguration(ExpressConfiguration expressConfiguration); + _FinalStage b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration); + + _FinalStage b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration); + _FinalStage myOrganizationConfiguration( Optional myOrganizationConfiguration); _FinalStage myOrganizationConfiguration(ClientMyOrganizationPostConfiguration myOrganizationConfiguration); + _FinalStage googleAccountLinking(Optional googleAccountLinking); + + _FinalStage googleAccountLinking(GoogleAccountLinkingConfigurationCreate googleAccountLinking); + _FinalStage asyncApprovalNotificationChannels( Optional> asyncApprovalNotificationChannels); _FinalStage asyncApprovalNotificationChannels( List asyncApprovalNotificationChannels); + + /** + *

                                                              ID of the agent to associate with this client.

                                                              + */ + _FinalStage agentId(@Nullable OptionalNullable agentId); + + _FinalStage agentId(String agentId); + + _FinalStage agentId(Optional agentId); + + _FinalStage agentId(com.auth0.client.mgmt.core.Nullable agentId); + + _FinalStage oidcSupport(Optional oidcSupport); + + _FinalStage oidcSupport(ClientOidcSupportPost oidcSupport); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional oidcSupport = Optional.empty(); + + private OptionalNullable agentId = OptionalNullable.absent(); + private Optional> asyncApprovalNotificationChannels = Optional.empty(); + private Optional googleAccountLinking = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private Optional expressConfiguration = Optional.empty(); private Optional redirectionPolicy = Optional.empty(); private Optional thirdPartySecurityMode = Optional.empty(); + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = + Optional.empty(); + private Optional resourceServerIdentifier = Optional.empty(); private Optional tokenQuota = Optional.empty(); @@ -1339,16 +1484,22 @@ public Builder from(CreateClientRequestContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); resourceServerIdentifier(other.getResourceServerIdentifier()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); redirectionPolicy(other.getRedirectionPolicy()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); + agentId(other.getAgentId()); + oidcSupport(other.getOidcSupport()); return this; } /** - *

                                                              Name of this client (min length: 1 character, does not allow < or >).

                                                              *

                                                              Name of this client (min length: 1 character, does not allow < or >).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -1359,6 +1510,69 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage oidcSupport(ClientOidcSupportPost oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public _FinalStage oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + /** + *

                                                              ID of the agent to associate with this client.

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

                                                              ID of the agent to associate with this client.

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

                                                              ID of the agent to associate with this client.

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

                                                              ID of the agent to associate with this client.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public _FinalStage agentId(@Nullable OptionalNullable agentId) { + this.agentId = agentId; + return this; + } + @java.lang.Override public _FinalStage asyncApprovalNotificationChannels( List asyncApprovalNotificationChannels) { @@ -1374,6 +1588,20 @@ public _FinalStage asyncApprovalNotificationChannels( return this; } + @java.lang.Override + public _FinalStage googleAccountLinking(GoogleAccountLinkingConfigurationCreate googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @java.lang.Override + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public _FinalStage googleAccountLinking( + Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + @java.lang.Override public _FinalStage myOrganizationConfiguration( ClientMyOrganizationPostConfiguration myOrganizationConfiguration) { @@ -1389,6 +1617,20 @@ public _FinalStage myOrganizationConfiguration( return this; } + @java.lang.Override + public _FinalStage b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + + @java.lang.Override + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public _FinalStage b2BIntegrationConfiguration( + Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + @java.lang.Override public _FinalStage expressConfiguration(ExpressConfiguration expressConfiguration) { this.expressConfiguration = Optional.ofNullable(expressConfiguration); @@ -1428,6 +1670,50 @@ public _FinalStage thirdPartySecurityMode(Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + @java.lang.Override + public _FinalStage anonymousSessions(CreateAnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @java.lang.Override + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public _FinalStage anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + @java.lang.Override + public _FinalStage identityAssertionAuthorizationGrant( + CreateIdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public _FinalStage identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + /** *

                                                              The identifier of the resource server that this client is linked to.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -2475,11 +2761,18 @@ public CreateClientRequestContent build() { parRequestExpiry, tokenQuota, resourceServerIdentifier, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, thirdPartySecurityMode, redirectionPolicy, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, asyncApprovalNotificationChannels, + agentId, + oidcSupport, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java index 7f909743..d38be3d4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,6 +27,10 @@ public final class CreateClientResponseContent { private final Optional clientId; + private final Optional createdAt; + + private final Optional updatedAt; + private final Optional tenant; private final Optional name; @@ -132,10 +137,22 @@ public final class CreateClientResponseContent { private final Optional expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional googleAccountLinking; + + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional thirdPartySecurityMode; + private final Optional oidcSupport; + private final Optional redirectionPolicy; private final Optional resourceServerIdentifier; @@ -146,6 +163,10 @@ public final class CreateClientResponseContent { private final Optional externalMetadataCreatedBy; + private final Optional externalMetadataStatus; + + private final Optional agentId; + private final Optional externalClientId; private final Optional jwksUri; @@ -154,6 +175,8 @@ public final class CreateClientResponseContent { private CreateClientResponseContent( Optional clientId, + Optional createdAt, + Optional updatedAt, Optional tenant, Optional name, Optional description, @@ -207,17 +230,27 @@ private CreateClientResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional b2BIntegrationConfiguration, Optional myOrganizationConfiguration, + Optional googleAccountLinking, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional thirdPartySecurityMode, + Optional oidcSupport, Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, Optional externalMetadataCreatedBy, + Optional externalMetadataStatus, + Optional agentId, Optional externalClientId, Optional jwksUri, Map additionalProperties) { this.clientId = clientId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; this.tenant = tenant; this.name = name; this.description = description; @@ -271,13 +304,21 @@ private CreateClientResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.thirdPartySecurityMode = thirdPartySecurityMode; + this.oidcSupport = oidcSupport; this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.externalMetadataStatus = externalMetadataStatus; + this.agentId = agentId; this.externalClientId = externalClientId; this.jwksUri = jwksUri; this.additionalProperties = additionalProperties; @@ -291,6 +332,22 @@ public Optional getClientId() { return clientId; } + /** + * @return The ISO 8601 timestamp of when this client was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp of when this client was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + /** * @return Name of the tenant this client belongs to. */ @@ -680,16 +737,46 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonProperty("my_organization_configuration") public Optional getMyOrganizationConfiguration() { return myOrganizationConfiguration; } + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + @JsonProperty("third_party_security_mode") public Optional getThirdPartySecurityMode() { return thirdPartySecurityMode; } + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + @JsonProperty("redirection_policy") public Optional getRedirectionPolicy() { return redirectionPolicy; @@ -718,6 +805,19 @@ public Optional getExternalMetadataCreatedB return externalMetadataCreatedBy; } + @JsonProperty("external_metadata_status") + public Optional getExternalMetadataStatus() { + return externalMetadataStatus; + } + + /** + * @return ID of the agent associated with this client. + */ + @JsonProperty("agent_id") + public Optional getAgentId() { + return agentId; + } + /** * @return An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers. */ @@ -795,6 +895,8 @@ public Map getAdditionalProperties() { private boolean equalTo(CreateClientResponseContent other) { return clientId.equals(other.clientId) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) && tenant.equals(other.tenant) && name.equals(other.name) && description.equals(other.description) @@ -849,13 +951,21 @@ private boolean equalTo(CreateClientResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && oidcSupport.equals(other.oidcSupport) && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) + && externalMetadataStatus.equals(other.externalMetadataStatus) + && agentId.equals(other.agentId) && externalClientId.equals(other.externalClientId) && jwksUri.equals(other.jwksUri); } @@ -864,6 +974,8 @@ private boolean equalTo(CreateClientResponseContent other) { public int hashCode() { return Objects.hash( this.clientId, + this.createdAt, + this.updatedAt, this.tenant, this.name, this.description, @@ -917,13 +1029,21 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, + this.googleAccountLinking, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.thirdPartySecurityMode, + this.oidcSupport, this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, this.externalMetadataCreatedBy, + this.externalMetadataStatus, + this.agentId, this.externalClientId, this.jwksUri); } @@ -941,6 +1061,10 @@ public static Builder builder() { public static final class Builder { private Optional clientId = Optional.empty(); + private Optional createdAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + private Optional tenant = Optional.empty(); private Optional name = Optional.empty(); @@ -1048,10 +1172,23 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional googleAccountLinking = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + private Optional thirdPartySecurityMode = Optional.empty(); + private Optional oidcSupport = Optional.empty(); + private Optional redirectionPolicy = Optional.empty(); private Optional resourceServerIdentifier = Optional.empty(); @@ -1063,6 +1200,10 @@ public static final class Builder { private Optional externalMetadataCreatedBy = Optional.empty(); + private Optional externalMetadataStatus = Optional.empty(); + + private Optional agentId = Optional.empty(); + private Optional externalClientId = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -1074,6 +1215,8 @@ private Builder() {} public Builder from(CreateClientResponseContent other) { clientId(other.getClientId()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); tenant(other.getTenant()); name(other.getName()); description(other.getDescription()); @@ -1127,13 +1270,21 @@ public Builder from(CreateClientResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); + oidcSupport(other.getOidcSupport()); redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + externalMetadataStatus(other.getExternalMetadataStatus()); + agentId(other.getAgentId()); externalClientId(other.getExternalClientId()); jwksUri(other.getJwksUri()); return this; @@ -1153,6 +1304,34 @@ public Builder clientId(String clientId) { return this; } + /** + *

                                                              The ISO 8601 timestamp of when this client was created.

                                                              + */ + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public Builder createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was last updated.

                                                              + */ + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public Builder updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + /** *

                                                              Name of the tenant this client belongs to.

                                                              */ @@ -2000,6 +2179,17 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) public Builder myOrganizationConfiguration( Optional myOrganizationConfiguration) { @@ -2013,6 +2203,55 @@ public Builder myOrganizationConfiguration( return this; } + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking(Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfiguration googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + IdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(AnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { this.thirdPartySecurityMode = thirdPartySecurityMode; @@ -2024,6 +2263,17 @@ public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPart return this; } + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) public Builder redirectionPolicy(Optional redirectionPolicy) { this.redirectionPolicy = redirectionPolicy; @@ -2085,6 +2335,31 @@ public Builder externalMetadataCreatedBy(ClientExternalMetadataCreatedByEnum ext return this; } + @JsonSetter(value = "external_metadata_status", nulls = Nulls.SKIP) + public Builder externalMetadataStatus(Optional externalMetadataStatus) { + this.externalMetadataStatus = externalMetadataStatus; + return this; + } + + public Builder externalMetadataStatus(ClientExternalMetadataStatusEnum externalMetadataStatus) { + this.externalMetadataStatus = Optional.ofNullable(externalMetadataStatus); + return this; + } + + /** + *

                                                              ID of the agent associated with this client.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(Optional agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = Optional.ofNullable(agentId); + return this; + } + /** *

                                                              An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers.

                                                              */ @@ -2116,6 +2391,8 @@ public Builder jwksUri(String jwksUri) { public CreateClientResponseContent build() { return new CreateClientResponseContent( clientId, + createdAt, + updatedAt, tenant, name, description, @@ -2169,13 +2446,21 @@ public CreateClientResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, thirdPartySecurityMode, + oidcSupport, redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, externalMetadataCreatedBy, + externalMetadataStatus, + agentId, externalClientId, jwksUri, 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 28eeefe0..efe877fd 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,10 @@ public final class CreateConnectionProfileRequestContent { private final Optional strategyOverrides; + private final Optional provisioning; + + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private CreateConnectionProfileRequestContent( @@ -43,6 +47,8 @@ private CreateConnectionProfileRequestContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.organization = organization; @@ -50,6 +56,8 @@ private CreateConnectionProfileRequestContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -83,6 +91,16 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @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 +119,9 @@ 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) + && provisioning.equals(other.provisioning) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -112,7 +132,9 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -156,12 +178,25 @@ public interface _FinalStage { _FinalStage strategyOverrides(Optional strategyOverrides); _FinalStage strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides); + + _FinalStage provisioning(Optional provisioning); + + _FinalStage provisioning(ConnectionProfileProvisioning provisioning); + + _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 provisioning = Optional.empty(); + private Optional strategyOverrides = Optional.empty(); private Optional connectionConfig = Optional.empty(); @@ -185,6 +220,8 @@ public Builder from(CreateConnectionProfileRequestContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -195,6 +232,34 @@ 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 provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + return this; + } + + @java.lang.Override + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public _FinalStage provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + @java.lang.Override public _FinalStage strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { this.strategyOverrides = Optional.ofNullable(strategyOverrides); @@ -269,6 +334,8 @@ public CreateConnectionProfileRequestContent build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, + 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 c1eb3e2d..5aac8aeb 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,10 @@ public final class CreateConnectionProfileResponseContent { private final Optional strategyOverrides; + private final Optional provisioning; + + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private CreateConnectionProfileResponseContent( @@ -45,6 +49,8 @@ private CreateConnectionProfileResponseContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +59,8 @@ private CreateConnectionProfileResponseContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +99,16 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @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 +128,9 @@ 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) + && provisioning.equals(other.provisioning) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -122,7 +142,9 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -150,6 +172,10 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional provisioning = Optional.empty(); + + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -163,6 +189,8 @@ public Builder from(CreateConnectionProfileResponseContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -243,6 +271,29 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + 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 +303,8 @@ public CreateConnectionProfileResponseContent build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java index 7957af75..061777d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java @@ -47,6 +47,8 @@ public final class CreateConnectionRequestContent { private final Optional crossAppAccessRequestingApp; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private CreateConnectionRequestContent( @@ -62,6 +64,7 @@ private CreateConnectionRequestContent( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -75,6 +78,7 @@ private CreateConnectionRequestContent( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -156,6 +160,11 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -179,7 +188,8 @@ private boolean equalTo(CreateConnectionRequestContent other) { && metadata.equals(other.metadata) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) - && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -196,7 +206,8 @@ public int hashCode() { this.metadata, this.authentication, this.connectedAccounts, - this.crossAppAccessRequestingApp); + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -282,6 +293,10 @@ public interface _FinalStage { _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + + _FinalStage crossAppAccessResourceApp(Optional crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(CreateCrossAppAccessResourceApp crossAppAccessResourceApp); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -290,6 +305,8 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private ConnectionIdentityProviderEnum strategy; + private Optional crossAppAccessResourceApp = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); private Optional connectedAccounts = Optional.empty(); @@ -329,11 +346,11 @@ public Builder from(CreateConnectionRequestContent other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } /** - *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -351,6 +368,20 @@ public _FinalStage strategy(@NotNull ConnectionIdentityProviderEnum strategy) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessResourceApp(CreateCrossAppAccessResourceApp 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 crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); @@ -532,6 +563,7 @@ public CreateConnectionRequestContent build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java index f9df64c6..e061026a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -19,6 +20,7 @@ import java.util.Objects; import java.util.Optional; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentOidc.Builder.class) @@ -41,6 +43,8 @@ public final class CreateConnectionRequestContentOidc implements ICreateConnecti private final Optional crossAppAccessRequestingApp; + private final OptionalNullable crossAppAccessResourceApp; + private final Optional options; private final Optional showAsButton; @@ -57,6 +61,7 @@ private CreateConnectionRequestContentOidc( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -69,6 +74,7 @@ private CreateConnectionRequestContentOidc( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -127,6 +133,15 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -137,6 +152,12 @@ public Optional getShowAsButton() { return showAsButton; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -159,6 +180,7 @@ private boolean equalTo(CreateConnectionRequestContentOidc other) { && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -175,6 +197,7 @@ public int hashCode() { this.authentication, this.connectedAccounts, this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp, this.options, this.showAsButton); } @@ -236,6 +259,16 @@ public interface _FinalStage { _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(Optional crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsOidc options); @@ -255,6 +288,9 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional options = Optional.empty(); + private OptionalNullable crossAppAccessResourceApp = + OptionalNullable.absent(); + private Optional crossAppAccessRequestingApp = Optional.empty(); private Optional connectedAccounts = Optional.empty(); @@ -285,6 +321,7 @@ public Builder from(CreateConnectionRequestContentOidc other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -330,6 +367,44 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + @java.lang.Override public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); @@ -441,6 +516,7 @@ public CreateConnectionRequestContentOidc build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java index f0790ca2..cd0c80bf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -19,6 +20,7 @@ import java.util.Objects; import java.util.Optional; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateConnectionRequestContentSaml.Builder.class) @@ -35,6 +37,10 @@ public final class CreateConnectionRequestContentSaml implements ICreateConnecti private final CreateConnectionRequestContentSamlStrategy strategy; + private final Optional crossAppAccessRequestingApp; + + private final OptionalNullable crossAppAccessResourceApp; + private final Optional options; private final Optional showAsButton; @@ -48,6 +54,8 @@ private CreateConnectionRequestContentSaml( Optional isDomainConnection, Optional>> metadata, CreateConnectionRequestContentSamlStrategy strategy, + Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Optional options, Optional showAsButton, Map additionalProperties) { @@ -57,6 +65,8 @@ private CreateConnectionRequestContentSaml( this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.strategy = strategy; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.options = options; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; @@ -100,6 +110,20 @@ public CreateConnectionRequestContentSamlStrategy getStrategy() { return strategy; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonProperty("options") public Optional getOptions() { return options; @@ -110,6 +134,12 @@ public Optional getShowAsButton() { return showAsButton; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -129,6 +159,8 @@ private boolean equalTo(CreateConnectionRequestContentSaml other) { && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && strategy.equals(other.strategy) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp) && options.equals(other.options) && showAsButton.equals(other.showAsButton); } @@ -142,6 +174,8 @@ public int hashCode() { this.isDomainConnection, this.metadata, this.strategy, + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp, this.options, this.showAsButton); } @@ -191,6 +225,20 @@ public interface _FinalStage { _FinalStage metadata(Map> metadata); + _FinalStage crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp); + + _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp); + + _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp(Optional crossAppAccessResourceApp); + + _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp); + _FinalStage options(Optional options); _FinalStage options(ConnectionOptionsSaml options); @@ -210,6 +258,11 @@ public static final class Builder implements NameStage, StrategyStage, _FinalSta private Optional options = Optional.empty(); + private OptionalNullable crossAppAccessResourceApp = + OptionalNullable.absent(); + + private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional>> metadata = Optional.empty(); private Optional isDomainConnection = Optional.empty(); @@ -231,6 +284,8 @@ public Builder from(CreateConnectionRequestContentSaml other) { isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); strategy(other.getStrategy()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); options(other.getOptions()); showAsButton(other.getShowAsButton()); return this; @@ -276,6 +331,58 @@ public _FinalStage options(Optional options) { return this; } + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public _FinalStage crossAppAccessRequestingApp( + Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + @java.lang.Override public _FinalStage metadata(Map> metadata) { this.metadata = Optional.ofNullable(metadata); @@ -344,6 +451,8 @@ public CreateConnectionRequestContentSaml build() { isDomainConnection, metadata, strategy, + crossAppAccessRequestingApp, + crossAppAccessResourceApp, options, showAsButton, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java index 93142c14..e92f8f2e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java @@ -48,6 +48,8 @@ public final class CreateConnectionResponseContent { private final Optional crossAppAccessRequestingApp; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private CreateConnectionResponseContent( @@ -64,6 +66,7 @@ private CreateConnectionResponseContent( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -78,6 +81,7 @@ private CreateConnectionResponseContent( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -170,6 +174,11 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -194,7 +203,8 @@ private boolean equalTo(CreateConnectionResponseContent other) { && metadata.equals(other.metadata) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) - && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -212,7 +222,8 @@ public int hashCode() { this.metadata, this.authentication, this.connectedAccounts, - this.crossAppAccessRequestingApp); + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -252,6 +263,8 @@ public static final class Builder { private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -271,6 +284,7 @@ public Builder from(CreateConnectionResponseContent other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -441,6 +455,17 @@ public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppA 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(CrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public CreateConnectionResponseContent build() { return new CreateConnectionResponseContent( name, @@ -456,6 +481,7 @@ public CreateConnectionResponseContent build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateCrossAppAccessResourceApp.java b/src/main/java/com/auth0/client/mgmt/types/CreateCrossAppAccessResourceApp.java new file mode 100644 index 00000000..60cf3acc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateCrossAppAccessResourceApp.java @@ -0,0 +1,119 @@ +/** + * 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 = CreateCrossAppAccessResourceApp.Builder.class) +public final class CreateCrossAppAccessResourceApp { + private final CrossAppAccessResourceAppStatusEnum status; + + private final Map additionalProperties; + + private CreateCrossAppAccessResourceApp( + CrossAppAccessResourceAppStatusEnum status, Map additionalProperties) { + this.status = status; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("status") + public CrossAppAccessResourceAppStatusEnum getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateCrossAppAccessResourceApp && equalTo((CreateCrossAppAccessResourceApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateCrossAppAccessResourceApp 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 CrossAppAccessResourceAppStatusEnum status); + + Builder from(CreateCrossAppAccessResourceApp other); + } + + public interface _FinalStage { + CreateCrossAppAccessResourceApp build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements StatusStage, _FinalStage { + private CrossAppAccessResourceAppStatusEnum status; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateCrossAppAccessResourceApp other) { + status(other.getStatus()); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public _FinalStage status(@NotNull CrossAppAccessResourceAppStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + public CreateCrossAppAccessResourceApp build() { + return new CreateCrossAppAccessResourceApp(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/CreateCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java index 7c33e18d..881376d4 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); @@ -225,7 +236,6 @@ public Builder from(CreateCustomDomainRequestContent other) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -277,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()) { @@ -307,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/CreateCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainResponseContent.java index 56378f8d..0beb4a79 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainResponseContent.java @@ -361,7 +361,6 @@ public Builder from(CreateCustomDomainResponseContent other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -373,7 +372,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -385,7 +383,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

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

                                                              *

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

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java index 9538773e..28d5f202 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java @@ -350,7 +350,6 @@ public Builder from(CreateDirectoryProvisioningResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -362,7 +361,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -374,7 +372,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -386,7 +383,6 @@ public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { } /** - *

                                                              Whether periodic automatic synchronization is enabled

                                                              *

                                                              Whether periodic automatic synchronization is enabled

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -398,7 +394,6 @@ public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) } /** - *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -410,7 +405,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java index af32124c..d43f27db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java @@ -144,7 +144,6 @@ public Builder from(CreateDirectorySynchronizationResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -156,7 +155,6 @@ public SynchronizationIdStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The synchronization's identifier

                                                              *

                                                              The synchronization's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -168,7 +166,6 @@ public StatusStage synchronizationId(@NotNull String synchronizationId) { } /** - *

                                                              The synchronization status

                                                              *

                                                              The synchronization status

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java index 8f945052..398a1889 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java @@ -117,7 +117,6 @@ public Builder from(CreateEncryptionKeyPublicWrappingResponseContent other) { } /** - *

                                                              Public wrapping key in PEM format

                                                              *

                                                              Public wrapping key in PEM format

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java index 08839950..c4b4dc75 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java @@ -263,7 +263,6 @@ public Builder from(CreateEncryptionKeyResponseContent other) { } /** - *

                                                              Key ID

                                                              *

                                                              Key ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -289,7 +288,6 @@ public CreatedAtStage state(@NotNull EncryptionKeyState state) { } /** - *

                                                              Key creation timestamp

                                                              *

                                                              Key creation timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -301,7 +299,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Key update timestamp

                                                              *

                                                              Key update timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java index 1421fc9d..b2872adb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java @@ -204,7 +204,6 @@ public Builder from(CreateEventStreamTestEventResponseContent other) { } /** - *

                                                              Unique identifier for the delivery

                                                              *

                                                              Unique identifier for the delivery

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -216,7 +215,6 @@ public EventStreamIdStage id(@NotNull String id) { } /** - *

                                                              Unique identifier for the event stream.

                                                              *

                                                              Unique identifier for the event stream.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateExperimentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateExperimentResponseContent.java new file mode 100644 index 00000000..23929b7c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateExperimentResponseContent.java @@ -0,0 +1,829 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +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; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateExperimentResponseContent.Builder.class) +public final class CreateExperimentResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final String featureFlagId; + + private final Optional featureFlagName; + + private final String authenticationFlow; + + private final AllocationStrategyEnum allocationStrategy; + + private final ExperimentStatusEnum status; + + private final boolean isValid; + + private final Optional defaultConfig; + + private final OptionalNullable> featureFlagSnapshot; + + private final List allocations; + + private final List editableFields; + + private final Optional> levels; + + private final OptionalNullable currentLevel; + + private final Optional startedAt; + + private final Optional endedAt; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private CreateExperimentResponseContent( + String id, + String name, + Optional description, + String featureFlagId, + Optional featureFlagName, + String authenticationFlow, + AllocationStrategyEnum allocationStrategy, + ExperimentStatusEnum status, + boolean isValid, + Optional defaultConfig, + OptionalNullable> featureFlagSnapshot, + List allocations, + List editableFields, + Optional> levels, + OptionalNullable currentLevel, + Optional startedAt, + Optional endedAt, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.featureFlagId = featureFlagId; + this.featureFlagName = featureFlagName; + this.authenticationFlow = authenticationFlow; + this.allocationStrategy = allocationStrategy; + this.status = status; + this.isValid = isValid; + this.defaultConfig = defaultConfig; + this.featureFlagSnapshot = featureFlagSnapshot; + this.allocations = allocations; + this.editableFields = editableFields; + this.levels = levels; + this.currentLevel = currentLevel; + this.startedAt = startedAt; + this.endedAt = endedAt; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("feature_flag_name") + public Optional getFeatureFlagName() { + return featureFlagName; + } + + @JsonProperty("authentication_flow") + public String getAuthenticationFlow() { + return authenticationFlow; + } + + @JsonProperty("allocation_strategy") + public AllocationStrategyEnum getAllocationStrategy() { + return allocationStrategy; + } + + @JsonProperty("status") + public ExperimentStatusEnum getStatus() { + return status; + } + + /** + * @return Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result. + */ + @JsonProperty("is_valid") + public boolean getIsValid() { + return isValid; + } + + @JsonProperty("default_config") + public Optional getDefaultConfig() { + return defaultConfig; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + public OptionalNullable> getFeatureFlagSnapshot() { + if (featureFlagSnapshot == null) { + return OptionalNullable.absent(); + } + return featureFlagSnapshot; + } + + @JsonProperty("allocations") + public List getAllocations() { + return allocations; + } + + /** + * @return Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic. + */ + @JsonProperty("editable_fields") + public List getEditableFields() { + return editableFields; + } + + /** + * @return Ramp experiment levels configuration. + */ + @JsonProperty("levels") + public Optional> getLevels() { + return levels; + } + + /** + * @return Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + public OptionalNullable getCurrentLevel() { + if (currentLevel == null) { + return OptionalNullable.absent(); + } + return currentLevel; + } + + @JsonProperty("started_at") + public Optional getStartedAt() { + return startedAt; + } + + @JsonProperty("ended_at") + public Optional getEndedAt() { + return endedAt; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + private OptionalNullable> _getFeatureFlagSnapshot() { + return featureFlagSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + private OptionalNullable _getCurrentLevel() { + return currentLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateExperimentResponseContent && equalTo((CreateExperimentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateExperimentResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && featureFlagId.equals(other.featureFlagId) + && featureFlagName.equals(other.featureFlagName) + && authenticationFlow.equals(other.authenticationFlow) + && allocationStrategy.equals(other.allocationStrategy) + && status.equals(other.status) + && isValid == other.isValid + && defaultConfig.equals(other.defaultConfig) + && featureFlagSnapshot.equals(other.featureFlagSnapshot) + && allocations.equals(other.allocations) + && editableFields.equals(other.editableFields) + && levels.equals(other.levels) + && currentLevel.equals(other.currentLevel) + && startedAt.equals(other.startedAt) + && endedAt.equals(other.endedAt) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.featureFlagId, + this.featureFlagName, + this.authenticationFlow, + this.allocationStrategy, + this.status, + this.isValid, + this.defaultConfig, + this.featureFlagSnapshot, + this.allocations, + this.editableFields, + this.levels, + this.currentLevel, + this.startedAt, + this.endedAt, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(CreateExperimentResponseContent other); + } + + public interface NameStage { + FeatureFlagIdStage name(@NotNull String name); + } + + public interface FeatureFlagIdStage { + AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId); + } + + public interface AuthenticationFlowStage { + AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow); + } + + public interface AllocationStrategyStage { + StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy); + } + + public interface StatusStage { + IsValidStage status(@NotNull ExperimentStatusEnum status); + } + + public interface IsValidStage { + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + */ + CreatedAtStage isValid(boolean isValid); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + CreateExperimentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage featureFlagName(Optional featureFlagName); + + _FinalStage featureFlagName(String featureFlagName); + + _FinalStage defaultConfig(Optional defaultConfig); + + _FinalStage defaultConfig(DefaultConfigEnum defaultConfig); + + _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Map featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot); + + _FinalStage allocations(List allocations); + + _FinalStage addAllocations(AllocationItem allocations); + + _FinalStage addAllAllocations(List allocations); + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + _FinalStage editableFields(List editableFields); + + _FinalStage addEditableFields(String editableFields); + + _FinalStage addAllEditableFields(List editableFields); + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + _FinalStage levels(Optional> levels); + + _FinalStage levels(List levels); + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + _FinalStage currentLevel(@Nullable OptionalNullable currentLevel); + + _FinalStage currentLevel(Integer currentLevel); + + _FinalStage currentLevel(Optional currentLevel); + + _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel); + + _FinalStage startedAt(Optional startedAt); + + _FinalStage startedAt(OffsetDateTime startedAt); + + _FinalStage endedAt(Optional endedAt); + + _FinalStage endedAt(OffsetDateTime endedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, + NameStage, + FeatureFlagIdStage, + AuthenticationFlowStage, + AllocationStrategyStage, + StatusStage, + IsValidStage, + CreatedAtStage, + UpdatedAtStage, + _FinalStage { + private String id; + + private String name; + + private String featureFlagId; + + private String authenticationFlow; + + private AllocationStrategyEnum allocationStrategy; + + private ExperimentStatusEnum status; + + private boolean isValid; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional endedAt = Optional.empty(); + + private Optional startedAt = Optional.empty(); + + private OptionalNullable currentLevel = OptionalNullable.absent(); + + private Optional> levels = Optional.empty(); + + private List editableFields = new ArrayList<>(); + + private List allocations = new ArrayList<>(); + + private OptionalNullable> featureFlagSnapshot = OptionalNullable.absent(); + + private Optional defaultConfig = Optional.empty(); + + private Optional featureFlagName = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateExperimentResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + featureFlagId(other.getFeatureFlagId()); + featureFlagName(other.getFeatureFlagName()); + authenticationFlow(other.getAuthenticationFlow()); + allocationStrategy(other.getAllocationStrategy()); + status(other.getStatus()); + isValid(other.getIsValid()); + defaultConfig(other.getDefaultConfig()); + featureFlagSnapshot(other.getFeatureFlagSnapshot()); + allocations(other.getAllocations()); + editableFields(other.getEditableFields()); + levels(other.getLevels()); + currentLevel(other.getCurrentLevel()); + startedAt(other.getStartedAt()); + endedAt(other.getEndedAt()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public FeatureFlagIdStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("authentication_flow") + public AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow) { + this.authenticationFlow = Objects.requireNonNull(authenticationFlow, "authenticationFlow must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("allocation_strategy") + public StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy) { + this.allocationStrategy = Objects.requireNonNull(allocationStrategy, "allocationStrategy must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public IsValidStage status(@NotNull ExperimentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_valid") + public CreatedAtStage isValid(boolean isValid) { + this.isValid = isValid; + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage endedAt(OffsetDateTime endedAt) { + this.endedAt = Optional.ofNullable(endedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) + public _FinalStage endedAt(Optional endedAt) { + this.endedAt = endedAt; + return this; + } + + @java.lang.Override + public _FinalStage startedAt(OffsetDateTime startedAt) { + this.startedAt = Optional.ofNullable(startedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "started_at", nulls = Nulls.SKIP) + public _FinalStage startedAt(Optional startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

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

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

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

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

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

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

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

                                                              Ramp experiment levels configuration.

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

                                                              Ramp experiment levels configuration.

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

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

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

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

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

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "editable_fields", nulls = Nulls.SKIP) + public _FinalStage editableFields(List editableFields) { + this.editableFields.clear(); + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllAllocations(List allocations) { + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllocations(AllocationItem allocations) { + this.allocations.add(allocations); + return this; + } + + @java.lang.Override + @JsonSetter(value = "allocations", nulls = Nulls.SKIP) + public _FinalStage allocations(List allocations) { + this.allocations.clear(); + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot( + com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot) { + if (featureFlagSnapshot.isNull()) { + this.featureFlagSnapshot = OptionalNullable.ofNull(); + } else if (featureFlagSnapshot.isEmpty()) { + this.featureFlagSnapshot = OptionalNullable.absent(); + } else { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot) { + if (featureFlagSnapshot.isPresent()) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } else { + this.featureFlagSnapshot = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Map featureFlagSnapshot) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_snapshot", nulls = Nulls.SKIP) + public _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot) { + this.featureFlagSnapshot = featureFlagSnapshot; + return this; + } + + @java.lang.Override + public _FinalStage defaultConfig(DefaultConfigEnum defaultConfig) { + this.defaultConfig = Optional.ofNullable(defaultConfig); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default_config", nulls = Nulls.SKIP) + public _FinalStage defaultConfig(Optional defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + @java.lang.Override + public _FinalStage featureFlagName(String featureFlagName) { + this.featureFlagName = Optional.ofNullable(featureFlagName); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_name", nulls = Nulls.SKIP) + public _FinalStage featureFlagName(Optional featureFlagName) { + this.featureFlagName = featureFlagName; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateExperimentResponseContent build() { + return new CreateExperimentResponseContent( + id, + name, + description, + featureFlagId, + featureFlagName, + authenticationFlow, + allocationStrategy, + status, + isValid, + defaultConfig, + featureFlagSnapshot, + allocations, + editableFields, + levels, + currentLevel, + startedAt, + endedAt, + 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/CreateExportUsersFields.java b/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersFields.java index d98a7b0a..628db241 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersFields.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersFields.java @@ -121,7 +121,6 @@ public Builder from(CreateExportUsersFields other) { } /** - *

                                                              Name of the field in the profile.

                                                              *

                                                              Name of the field in the profile.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java index 31a11a0b..8c97e50b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java @@ -266,7 +266,6 @@ public Builder from(CreateExportUsersResponseContent other) { } /** - *

                                                              Status of this job.

                                                              *

                                                              Status of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -278,7 +277,6 @@ public TypeStage status(@NotNull String status) { } /** - *

                                                              Type of job this is.

                                                              *

                                                              Type of job this is.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -290,7 +288,6 @@ public IdStage type(@NotNull String type) { } /** - *

                                                              ID of this job.

                                                              *

                                                              ID of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFeatureFlagResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFeatureFlagResponseContent.java new file mode 100644 index 00000000..c9a64509 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFeatureFlagResponseContent.java @@ -0,0 +1,313 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateFeatureFlagResponseContent.Builder.class) +public final class CreateFeatureFlagResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final FeatureFlagTypeEnum type; + + private final FeatureFlagStatusEnum status; + + private final Optional> parameters; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private CreateFeatureFlagResponseContent( + String id, + String name, + Optional description, + FeatureFlagTypeEnum type, + FeatureFlagStatusEnum status, + Optional> parameters, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.parameters = parameters; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public FeatureFlagTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public FeatureFlagStatusEnum getStatus() { + return status; + } + + @JsonProperty("parameters") + public Optional> getParameters() { + return parameters; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateFeatureFlagResponseContent && equalTo((CreateFeatureFlagResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateFeatureFlagResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && parameters.equals(other.parameters) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.parameters, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(CreateFeatureFlagResponseContent other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull FeatureFlagTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull FeatureFlagStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + CreateFeatureFlagResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage parameters(Optional> parameters); + + _FinalStage parameters(Map parameters); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private FeatureFlagTypeEnum type; + + private FeatureFlagStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional> parameters = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateFeatureFlagResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + parameters(other.getParameters()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull FeatureFlagTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull FeatureFlagStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage parameters(Map parameters) { + this.parameters = Optional.ofNullable(parameters); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parameters", nulls = Nulls.SKIP) + public _FinalStage parameters(Optional> parameters) { + this.parameters = parameters; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateFeatureFlagResponseContent build() { + return new CreateFeatureFlagResponseContent( + id, name, description, type, status, parameters, 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/CreateFlowsVaultConnectionActivecampaignApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignApiKey.java index 4b9f4b2f..8c0db6f5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionActivecampaignApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java index 0a6b54c7..a6a70ccd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionActivecampaignUninitialized other) } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java index 1a298c34..60bb5d23 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionAirtableApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java index 73bec5fe..c46ccaa8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionAirtableUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java index 5301b141..2d5e300b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionAuth0OauthApp other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java index be7b9c47..8c5d5863 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionAuth0Uninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java index 83ad39ca..579c4a7b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionBigqueryJwt other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java index 64309c78..869c4aa7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionBigqueryUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java index 47c25b64..7b68f713 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionClearbitApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java index 3a5c776f..a5ac651a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionClearbitUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java index a7b26704..786956d0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionDocusignOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java index d98b3ab2..8a376701 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionDocusignUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java index b3d8b851..7751082d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionGoogleSheetsOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java index a6582ca2..8961ae27 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionGoogleSheetsUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java index e92d0581..44f1e93e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionHttpApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java index ed376185..09beaf27 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionHttpBasicAuth other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java index 37290ead..c5eb428c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionHttpBearer other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java index 60888598..c67d197d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionHttpOauthClientCredentials other) } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java index aaaff6f0..00386624 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionHttpUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java index 9d4a11bd..eac2d835 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionHubspotApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java index 682862ea..903dfdf9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionHubspotOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java index 93935a48..c2ae0491 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionHubspotUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java index 0785b7bb..be983075 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java @@ -132,7 +132,6 @@ public Builder from(CreateFlowsVaultConnectionJwtJwt other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java index f0e8e415..dfc9ac72 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionJwtUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java index 4041a30f..b8ebddd1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionMailchimpApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java index d52bd220..5d9e8525 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionMailchimpOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java index ad41b4c8..e422648f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionMailchimpUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java index aabbdfc3..e59129ad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionMailjetApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java index e7685921..5b3c8877 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionMailjetUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java index c08c0013..2bdd9029 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionPipedriveOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java index 60d17bb8..362720db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionPipedriveToken other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java index 985f69d9..f0cc1174 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionPipedriveUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java index 87e6bcde..8801e14f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java @@ -323,7 +323,6 @@ public Builder from(CreateFlowsVaultConnectionResponseContent other) { } /** - *

                                                              Flows Vault Connection identifier.

                                                              *

                                                              Flows Vault Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -335,7 +334,6 @@ public AppIdStage id(@NotNull String id) { } /** - *

                                                              Flows Vault Connection app identifier.

                                                              *

                                                              Flows Vault Connection app identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -347,7 +345,6 @@ public NameStage appId(@NotNull String appId) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -359,7 +356,6 @@ public ReadyStage name(@NotNull String name) { } /** - *

                                                              Whether the Flows Vault Connection is configured.

                                                              *

                                                              Whether the Flows Vault Connection is configured.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -371,7 +367,6 @@ public CreatedAtStage ready(boolean ready) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -383,7 +378,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java index 49533d15..2c1a7b3e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionSalesforceOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java index 146ce72b..979322ea 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionSalesforceUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java index 9ef8e063..de94a204 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionSendgridApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java index 40eb5406..bb4fbf15 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionSendgridUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java index 63222a79..5614972c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionSlackOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java index 33fbd9dd..301999b4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionSlackUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java index 853ad61d..4dbfcacf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionSlackWebhook other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java index 1b2ad99c..c9994aa7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionStripeKeyPair other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java index 87f0ee04..3aebd325 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionStripeOauthCode other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java index 607e9ae2..45d0633c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionStripeUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java index 09b10661..a109b44a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionTelegramToken other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java index a088e49f..f352f129 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionTelegramUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java index 2921ee21..50fa117e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionTwilioApiKey other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java index abe3037e..12ab6829 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionTwilioUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java index 246626fe..a04e858a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionWhatsappToken other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java index ccbcf55e..b8a5b31d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionWhatsappUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java index 0e344a13..4ad15d2b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java @@ -115,7 +115,6 @@ public Builder from(CreateFlowsVaultConnectionZapierUninitialized other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java index 214722b1..664335ac 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java @@ -133,7 +133,6 @@ public Builder from(CreateFlowsVaultConnectionZapierWebhook other) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java index 679c70b3..9f0cff50 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java @@ -188,7 +188,6 @@ public Builder from(CreateHookRequestContent other) { } /** - *

                                                              Name of this hook.

                                                              *

                                                              Name of this hook.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -200,7 +199,6 @@ public ScriptStage name(@NotNull String name) { } /** - *

                                                              Code to be executed when this hook runs.

                                                              *

                                                              Code to be executed when this hook runs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -212,7 +210,6 @@ public TriggerIdStage script(@NotNull String script) { } /** - *

                                                              Execution stage of this rule. Can be credentials-exchange, pre-user-registration, post-user-registration, post-change-password, or send-phone-message.

                                                              *

                                                              Execution stage of this rule. Can be credentials-exchange, pre-user-registration, post-user-registration, post-change-password, or send-phone-message.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateIdentityAssertionAuthorizationGrant.java b/src/main/java/com/auth0/client/mgmt/types/CreateIdentityAssertionAuthorizationGrant.java new file mode 100644 index 00000000..6d815eef --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateIdentityAssertionAuthorizationGrant.java @@ -0,0 +1,128 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateIdentityAssertionAuthorizationGrant.Builder.class) +public final class CreateIdentityAssertionAuthorizationGrant { + private final boolean active; + + private final Map additionalProperties; + + private CreateIdentityAssertionAuthorizationGrant(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return If set to true, the client can exchange ID-JAGs for access tokens. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateIdentityAssertionAuthorizationGrant + && equalTo((CreateIdentityAssertionAuthorizationGrant) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateIdentityAssertionAuthorizationGrant other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              If set to true, the client can exchange ID-JAGs for access tokens.

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

                                                              If set to true, the client can exchange ID-JAGs for access tokens.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public CreateIdentityAssertionAuthorizationGrant build() { + return new CreateIdentityAssertionAuthorizationGrant(active, 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/CreateImportUsersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateImportUsersResponseContent.java index b563c018..647e19fd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateImportUsersResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateImportUsersResponseContent.java @@ -218,7 +218,6 @@ public Builder from(CreateImportUsersResponseContent other) { } /** - *

                                                              Status of this job.

                                                              *

                                                              Status of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -230,7 +229,6 @@ public TypeStage status(@NotNull String status) { } /** - *

                                                              Type of job this is.

                                                              *

                                                              Type of job this is.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -242,7 +240,6 @@ public CreatedAtStage type(@NotNull String type) { } /** - *

                                                              When this job was created.

                                                              *

                                                              When this job was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -254,7 +251,6 @@ public IdStage createdAt(@NotNull String createdAt) { } /** - *

                                                              ID of this job.

                                                              *

                                                              ID of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -266,7 +262,6 @@ public ConnectionIdStage id(@NotNull String id) { } /** - *

                                                              connection_id of the connection to which users will be imported.

                                                              *

                                                              connection_id of the connection to which users will be imported.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ 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 00000000..9348a305 --- /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/CreateNetworkAclRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateNetworkAclRequestContent.java index 9f4e9a90..8f8a1a08 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateNetworkAclRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateNetworkAclRequestContent.java @@ -166,7 +166,6 @@ public ActiveStage description(@NotNull String description) { } /** - *

                                                              Indicates whether or not this access control list is actively being used

                                                              *

                                                              Indicates whether or not this access control list is actively being used

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java index 72848bb6..250dbf70 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationAllConnectionResponseContent.java @@ -31,6 +31,8 @@ public final class CreateOrganizationAllConnectionResponseContent { private final Optional organizationAccessLevel; + private final Optional organizationMemberAccessLevel; + private final Optional isEnabled; private final String connectionId; @@ -45,6 +47,7 @@ private CreateOrganizationAllConnectionResponseContent( Optional showAsButton, Optional isSignupEnabled, Optional organizationAccessLevel, + Optional organizationMemberAccessLevel, Optional isEnabled, String connectionId, Optional connection, @@ -54,6 +57,7 @@ private CreateOrganizationAllConnectionResponseContent( this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.isEnabled = isEnabled; this.connectionId = connectionId; this.connection = connection; @@ -97,6 +101,11 @@ public Optional getOrganizationAccessLevel() { return organizationAccessLevel; } + @JsonProperty("organization_member_access_level") + public Optional getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + /** * @return Whether the connection is enabled for the organization. */ @@ -136,6 +145,7 @@ private boolean equalTo(CreateOrganizationAllConnectionResponseContent other) { && showAsButton.equals(other.showAsButton) && isSignupEnabled.equals(other.isSignupEnabled) && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel) && isEnabled.equals(other.isEnabled) && connectionId.equals(other.connectionId) && connection.equals(other.connection); @@ -149,6 +159,7 @@ public int hashCode() { this.showAsButton, this.isSignupEnabled, this.organizationAccessLevel, + this.organizationMemberAccessLevel, this.isEnabled, this.connectionId, this.connection); @@ -211,6 +222,11 @@ public interface _FinalStage { _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel(OrganizationMemberAccessLevelEnum organizationMemberAccessLevel); + /** *

                                                              Whether the connection is enabled for the organization.

                                                              */ @@ -231,6 +247,8 @@ public static final class Builder implements ConnectionIdStage, _FinalStage { private Optional isEnabled = Optional.empty(); + private Optional organizationMemberAccessLevel = Optional.empty(); + private Optional organizationAccessLevel = Optional.empty(); private Optional isSignupEnabled = Optional.empty(); @@ -253,6 +271,7 @@ public Builder from(CreateOrganizationAllConnectionResponseContent other) { showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); isEnabled(other.getIsEnabled()); connectionId(other.getConnectionId()); connection(other.getConnection()); @@ -260,7 +279,6 @@ public Builder from(CreateOrganizationAllConnectionResponseContent other) { } /** - *

                                                              Connection identifier.

                                                              *

                                                              Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -304,6 +322,21 @@ public _FinalStage isEnabled(Optional isEnabled) { return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + OrganizationMemberAccessLevelEnum organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + @java.lang.Override public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); @@ -405,6 +438,7 @@ public CreateOrganizationAllConnectionResponseContent build() { showAsButton, isSignupEnabled, organizationAccessLevel, + organizationMemberAccessLevel, isEnabled, connectionId, connection, diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationClientRequestItem.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationClientRequestItem.java new file mode 100644 index 00000000..4da36acf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationClientRequestItem.java @@ -0,0 +1,162 @@ +/** + * 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 = CreateOrganizationClientRequestItem.Builder.class) +public final class CreateOrganizationClientRequestItem { + private final String clientId; + + private final boolean useForMemberAccess; + + private final Map additionalProperties; + + private CreateOrganizationClientRequestItem( + String clientId, boolean useForMemberAccess, Map additionalProperties) { + this.clientId = clientId; + this.useForMemberAccess = useForMemberAccess; + this.additionalProperties = additionalProperties; + } + + /** + * @return The identifier of the client to associate. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Whether this client is used for member access to the organization. + */ + @JsonProperty("use_for_member_access") + public boolean getUseForMemberAccess() { + return useForMemberAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateOrganizationClientRequestItem + && equalTo((CreateOrganizationClientRequestItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateOrganizationClientRequestItem other) { + return clientId.equals(other.clientId) && useForMemberAccess == other.useForMemberAccess; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientId, this.useForMemberAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              The identifier of the client to associate.

                                                              + */ + UseForMemberAccessStage clientId(@NotNull String clientId); + + Builder from(CreateOrganizationClientRequestItem other); + } + + public interface UseForMemberAccessStage { + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + */ + _FinalStage useForMemberAccess(boolean useForMemberAccess); + } + + public interface _FinalStage { + CreateOrganizationClientRequestItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, UseForMemberAccessStage, _FinalStage { + private String clientId; + + private boolean useForMemberAccess; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateOrganizationClientRequestItem other) { + clientId(other.getClientId()); + useForMemberAccess(other.getUseForMemberAccess()); + return this; + } + + /** + *

                                                              The identifier of the client to associate.

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

                                                              Whether this client is used for member access to the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("use_for_member_access") + public _FinalStage useForMemberAccess(boolean useForMemberAccess) { + this.useForMemberAccess = useForMemberAccess; + return this; + } + + @java.lang.Override + public CreateOrganizationClientRequestItem build() { + return new CreateOrganizationClientRequestItem(clientId, useForMemberAccess, 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/CreateOrganizationDiscoveryDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationDiscoveryDomainResponseContent.java index c67e921e..ec97cb82 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationDiscoveryDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationDiscoveryDomainResponseContent.java @@ -219,7 +219,6 @@ public Builder from(CreateOrganizationDiscoveryDomainResponseContent other) { } /** - *

                                                              Organization discovery domain identifier.

                                                              *

                                                              Organization discovery domain identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -231,7 +230,6 @@ public DomainStage id(@NotNull String id) { } /** - *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +248,6 @@ public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus st } /** - *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +259,6 @@ public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { } /** - *

                                                              The full domain where the TXT record should be added.

                                                              *

                                                              The full domain where the TXT record should be added.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java index 81852cb7..5063fda9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java @@ -35,6 +35,10 @@ public final class CreateOrganizationRequestContent { private final Optional tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + private final Map additionalProperties; private CreateOrganizationRequestContent( @@ -44,6 +48,8 @@ private CreateOrganizationRequestContent( Optional>> metadata, Optional> enabledConnections, Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -51,6 +57,8 @@ private CreateOrganizationRequestContent( this.metadata = metadata; this.enabledConnections = enabledConnections; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; this.additionalProperties = additionalProperties; } @@ -93,6 +101,19 @@ public Optional getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -110,13 +131,22 @@ private boolean equalTo(CreateOrganizationRequestContent other) { && branding.equals(other.branding) && metadata.equals(other.metadata) && enabledConnections.equals(other.enabledConnections) - && tokenQuota.equals(other.tokenQuota); + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive); } @java.lang.Override public int hashCode() { return Objects.hash( - this.name, this.displayName, this.branding, this.metadata, this.enabledConnections, this.tokenQuota); + this.name, + this.displayName, + this.branding, + this.metadata, + this.enabledConnections, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive); } @java.lang.Override @@ -169,12 +199,27 @@ public interface _FinalStage { _FinalStage tokenQuota(Optional tokenQuota); _FinalStage tokenQuota(CreateTokenQuota tokenQuota); + + _FinalStage thirdPartyClientAccess(Optional thirdPartyClientAccess); + + _FinalStage thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess); + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + _FinalStage isAppEntitlementActive(Optional isAppEntitlementActive); + + _FinalStage isAppEntitlementActive(Boolean isAppEntitlementActive); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional isAppEntitlementActive = Optional.empty(); + + private Optional thirdPartyClientAccess = Optional.empty(); + private Optional tokenQuota = Optional.empty(); private Optional> enabledConnections = Optional.empty(); @@ -198,11 +243,12 @@ public Builder from(CreateOrganizationRequestContent other) { metadata(other.getMetadata()); enabledConnections(other.getEnabledConnections()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); return this; } /** - *

                                                              The name of this organization.

                                                              *

                                                              The name of this organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -213,6 +259,40 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

                                                              Whether app entitlement is active for this organization.

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

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public _FinalStage isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + @java.lang.Override + public _FinalStage thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum 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; + } + @java.lang.Override public _FinalStage tokenQuota(CreateTokenQuota tokenQuota) { this.tokenQuota = Optional.ofNullable(tokenQuota); @@ -295,7 +375,15 @@ public _FinalStage displayName(Optional displayName) { @java.lang.Override public CreateOrganizationRequestContent build() { return new CreateOrganizationRequestContent( - name, displayName, branding, metadata, enabledConnections, tokenQuota, additionalProperties); + name, + displayName, + branding, + metadata, + enabledConnections, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java index 1b8144fb..f91ffee9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java @@ -34,6 +34,12 @@ public final class CreateOrganizationResponseContent { private final Optional tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + + private final Optional client; + private final Optional> enabledConnections; private final Map additionalProperties; @@ -45,6 +51,9 @@ private CreateOrganizationResponseContent( Optional branding, Optional>> metadata, Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, + Optional client, Optional> enabledConnections, Map additionalProperties) { this.id = id; @@ -53,6 +62,9 @@ private CreateOrganizationResponseContent( this.branding = branding; this.metadata = metadata; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; + this.client = client; this.enabledConnections = enabledConnections; this.additionalProperties = additionalProperties; } @@ -96,6 +108,24 @@ public Optional getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + @JsonProperty("enabled_connections") public Optional> getEnabledConnections() { return enabledConnections; @@ -119,6 +149,9 @@ private boolean equalTo(CreateOrganizationResponseContent other) { && branding.equals(other.branding) && metadata.equals(other.metadata) && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive) + && client.equals(other.client) && enabledConnections.equals(other.enabledConnections); } @@ -131,6 +164,9 @@ public int hashCode() { this.branding, this.metadata, this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive, + this.client, this.enabledConnections); } @@ -157,6 +193,12 @@ public static final class Builder { private Optional tokenQuota = Optional.empty(); + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + + private Optional client = Optional.empty(); + private Optional> enabledConnections = Optional.empty(); @JsonAnySetter @@ -171,6 +213,9 @@ public Builder from(CreateOrganizationResponseContent other) { branding(other.getBranding()); metadata(other.getMetadata()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); + client(other.getClient()); enabledConnections(other.getEnabledConnections()); return this; } @@ -250,6 +295,42 @@ public Builder tokenQuota(TokenQuota tokenQuota) { return this; } + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public Builder client(Optional client) { + this.client = client; + return this; + } + + public Builder client(OrganizationClientAssociation client) { + this.client = Optional.ofNullable(client); + return this; + } + @JsonSetter(value = "enabled_connections", nulls = Nulls.SKIP) public Builder enabledConnections(Optional> enabledConnections) { this.enabledConnections = enabledConnections; @@ -263,7 +344,17 @@ public Builder enabledConnections(List enabledCon public CreateOrganizationResponseContent build() { return new CreateOrganizationResponseContent( - id, name, displayName, branding, metadata, tokenQuota, enabledConnections, additionalProperties); + id, + name, + displayName, + branding, + metadata, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + client, + enabledConnections, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java index 0117814c..f9ce4405 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java @@ -220,7 +220,6 @@ public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { } /** - *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePortalRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePortalRequestContent.java new file mode 100644 index 00000000..222bf282 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreatePortalRequestContent.java @@ -0,0 +1,261 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreatePortalRequestContent.Builder.class) +public final class CreatePortalRequestContent { + private final String slug; + + private final String name; + + private final PortalClientSecretPostRequest client; + + private final Optional navigation; + + private final Optional pages; + + private final Optional customCode; + + private final Map additionalProperties; + + private CreatePortalRequestContent( + String slug, + String name, + PortalClientSecretPostRequest client, + Optional navigation, + Optional pages, + Optional customCode, + Map additionalProperties) { + this.slug = slug; + this.name = name; + this.client = client; + this.navigation = navigation; + this.pages = pages; + this.customCode = customCode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("slug") + public String getSlug() { + return slug; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("client") + public PortalClientSecretPostRequest getClient() { + return client; + } + + @JsonProperty("navigation") + public Optional getNavigation() { + return navigation; + } + + @JsonProperty("pages") + public Optional getPages() { + return pages; + } + + @JsonProperty("custom_code") + public Optional getCustomCode() { + return customCode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreatePortalRequestContent && equalTo((CreatePortalRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreatePortalRequestContent other) { + return slug.equals(other.slug) + && name.equals(other.name) + && client.equals(other.client) + && navigation.equals(other.navigation) + && pages.equals(other.pages) + && customCode.equals(other.customCode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.slug, this.name, this.client, this.navigation, this.pages, this.customCode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SlugStage builder() { + return new Builder(); + } + + public interface SlugStage { + NameStage slug(@NotNull String slug); + + Builder from(CreatePortalRequestContent other); + } + + public interface NameStage { + ClientStage name(@NotNull String name); + } + + public interface ClientStage { + _FinalStage client(@NotNull PortalClientSecretPostRequest client); + } + + public interface _FinalStage { + CreatePortalRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage navigation(Optional navigation); + + _FinalStage navigation(PortalNavigation navigation); + + _FinalStage pages(Optional pages); + + _FinalStage pages(PortalPagesByType pages); + + _FinalStage customCode(Optional customCode); + + _FinalStage customCode(PortalCustomCode customCode); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SlugStage, NameStage, ClientStage, _FinalStage { + private String slug; + + private String name; + + private PortalClientSecretPostRequest client; + + private Optional customCode = Optional.empty(); + + private Optional pages = Optional.empty(); + + private Optional navigation = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreatePortalRequestContent other) { + slug(other.getSlug()); + name(other.getName()); + client(other.getClient()); + navigation(other.getNavigation()); + pages(other.getPages()); + customCode(other.getCustomCode()); + return this; + } + + @java.lang.Override + @JsonSetter("slug") + public NameStage slug(@NotNull String slug) { + this.slug = Objects.requireNonNull(slug, "slug must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public ClientStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("client") + public _FinalStage client(@NotNull PortalClientSecretPostRequest client) { + this.client = Objects.requireNonNull(client, "client must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage customCode(PortalCustomCode customCode) { + this.customCode = Optional.ofNullable(customCode); + return this; + } + + @java.lang.Override + @JsonSetter(value = "custom_code", nulls = Nulls.SKIP) + public _FinalStage customCode(Optional customCode) { + this.customCode = customCode; + return this; + } + + @java.lang.Override + public _FinalStage pages(PortalPagesByType pages) { + this.pages = Optional.ofNullable(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(Optional pages) { + this.pages = pages; + return this; + } + + @java.lang.Override + public _FinalStage navigation(PortalNavigation navigation) { + this.navigation = Optional.ofNullable(navigation); + return this; + } + + @java.lang.Override + @JsonSetter(value = "navigation", nulls = Nulls.SKIP) + public _FinalStage navigation(Optional navigation) { + this.navigation = navigation; + return this; + } + + @java.lang.Override + public CreatePortalRequestContent build() { + return new CreatePortalRequestContent( + slug, name, client, navigation, pages, customCode, 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/CreatePublicKeyDeviceCredentialRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialRequestContent.java index 02793485..3b2f12b9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialRequestContent.java @@ -189,7 +189,6 @@ public Builder from(CreatePublicKeyDeviceCredentialRequestContent other) { } /** - *

                                                              Name for this device easily recognized by owner.

                                                              *

                                                              Name for this device easily recognized by owner.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -208,7 +207,6 @@ public ValueStage type(@NotNull DeviceCredentialPublicKeyTypeEnum type) { } /** - *

                                                              Base64 encoded string containing the credential.

                                                              *

                                                              Base64 encoded string containing the credential.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -220,7 +218,6 @@ public DeviceIdStage value(@NotNull String value) { } /** - *

                                                              Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor.

                                                              *

                                                              Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java index 13a068cc..f8ac7653 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java @@ -99,7 +99,6 @@ public Builder from(CreatePublicKeyDeviceCredentialResponseContent other) { } /** - *

                                                              The credential's identifier

                                                              *

                                                              The credential's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyRequestContent.java index 57aa519d..bfc0f47f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyRequestContent.java @@ -167,7 +167,6 @@ public ConsumerSelectorStage consumer(@NotNull RateLimitPolicyConsumerEnum consu } /** - *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyResponseContent.java index ddd2b739..73baef50 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateRateLimitPolicyResponseContent.java @@ -232,7 +232,6 @@ public Builder from(CreateRateLimitPolicyResponseContent other) { } /** - *

                                                              Unique identifier for the Rate Limit Policy.

                                                              *

                                                              Unique identifier for the Rate Limit Policy.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -258,7 +257,6 @@ public ConsumerSelectorStage consumer(@NotNull RateLimitPolicyConsumerEnum consu } /** - *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java index 15c4fa3f..aec3904a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java @@ -43,16 +43,22 @@ public final class CreateResourceServerRequestContent { private final Optional tokenLifetime; + private final OptionalNullable tokenLifetimeForAnonymousAccessTokens; + private final Optional tokenDialect; private final Optional skipConsentForVerifiableFirstPartyClients; private final Optional enforcePolicies; + private final OptionalNullable accessToken; + private final OptionalNullable tokenEncryption; private final OptionalNullable consentPolicy; + private final Optional requireConsentNonRepudiation; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -61,6 +67,10 @@ public final class CreateResourceServerRequestContent { private final OptionalNullable authorizationPolicy; + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + private final Map additionalProperties; private CreateResourceServerRequestContent( @@ -73,15 +83,20 @@ private CreateResourceServerRequestContent( Optional allowOnlineAccess, Optional allowOnlineAccessWithEphemeralSessions, Optional tokenLifetime, + OptionalNullable tokenLifetimeForAnonymousAccessTokens, Optional tokenDialect, Optional skipConsentForVerifiableFirstPartyClients, Optional enforcePolicies, + OptionalNullable accessToken, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, OptionalNullable authorizationPolicy, + Optional agentSubjectClaims, + OptionalNullable type, Map additionalProperties) { this.name = name; this.identifier = identifier; @@ -92,15 +107,20 @@ private CreateResourceServerRequestContent( this.allowOnlineAccess = allowOnlineAccess; this.allowOnlineAccessWithEphemeralSessions = allowOnlineAccessWithEphemeralSessions; this.tokenLifetime = tokenLifetime; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; this.tokenDialect = tokenDialect; this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; this.enforcePolicies = enforcePolicies; + this.accessToken = accessToken; this.tokenEncryption = tokenEncryption; this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; this.authorizationPolicy = authorizationPolicy; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; this.additionalProperties = additionalProperties; } @@ -173,6 +193,18 @@ public Optional getTokenLifetime() { return tokenLifetime; } + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public OptionalNullable getTokenLifetimeForAnonymousAccessTokens() { + if (tokenLifetimeForAnonymousAccessTokens == null) { + return OptionalNullable.absent(); + } + return tokenLifetimeForAnonymousAccessTokens; + } + @JsonProperty("token_dialect") public Optional getTokenDialect() { return tokenDialect; @@ -194,6 +226,15 @@ public Optional getEnforcePolicies() { return enforcePolicies; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") public OptionalNullable getTokenEncryption() { @@ -212,6 +253,14 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") public OptionalNullable> getAuthorizationDetails() { @@ -244,6 +293,32 @@ public OptionalNullable getAuthorizationPolic return authorizationPolicy; } + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + private OptionalNullable _getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -274,6 +349,12 @@ private OptionalNullable _getAuthorizationPol return authorizationPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -296,15 +377,20 @@ private boolean equalTo(CreateResourceServerRequestContent other) { && allowOnlineAccess.equals(other.allowOnlineAccess) && allowOnlineAccessWithEphemeralSessions.equals(other.allowOnlineAccessWithEphemeralSessions) && tokenLifetime.equals(other.tokenLifetime) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) && tokenDialect.equals(other.tokenDialect) && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) && enforcePolicies.equals(other.enforcePolicies) + && accessToken.equals(other.accessToken) && tokenEncryption.equals(other.tokenEncryption) && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) - && authorizationPolicy.equals(other.authorizationPolicy); + && authorizationPolicy.equals(other.authorizationPolicy) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); } @java.lang.Override @@ -319,15 +405,20 @@ public int hashCode() { this.allowOnlineAccess, this.allowOnlineAccessWithEphemeralSessions, this.tokenLifetime, + this.tokenLifetimeForAnonymousAccessTokens, this.tokenDialect, this.skipConsentForVerifiableFirstPartyClients, this.enforcePolicies, + this.accessToken, this.tokenEncryption, this.consentPolicy, + this.requireConsentNonRepudiation, this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, - this.authorizationPolicy); + this.authorizationPolicy, + this.agentSubjectClaims, + this.type); } @java.lang.Override @@ -408,6 +499,19 @@ public interface _FinalStage { _FinalStage tokenLifetime(Integer tokenLifetime); + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + _FinalStage tokenLifetimeForAnonymousAccessTokens( + @Nullable OptionalNullable tokenLifetimeForAnonymousAccessTokens); + + _FinalStage tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens); + + _FinalStage tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens); + + _FinalStage tokenLifetimeForAnonymousAccessTokens( + com.auth0.client.mgmt.core.Nullable tokenLifetimeForAnonymousAccessTokens); + _FinalStage tokenDialect(Optional tokenDialect); _FinalStage tokenDialect(ResourceServerTokenDialectSchemaEnum tokenDialect); @@ -427,6 +531,14 @@ _FinalStage skipConsentForVerifiableFirstPartyClients( _FinalStage enforcePolicies(Boolean enforcePolicies); + _FinalStage accessToken(@Nullable OptionalNullable accessToken); + + _FinalStage accessToken(ResourceServerAccessToken accessToken); + + _FinalStage accessToken(Optional accessToken); + + _FinalStage accessToken(com.auth0.client.mgmt.core.Nullable accessToken); + _FinalStage tokenEncryption(@Nullable OptionalNullable tokenEncryption); _FinalStage tokenEncryption(ResourceServerTokenEncryption tokenEncryption); @@ -443,6 +555,13 @@ _FinalStage skipConsentForVerifiableFirstPartyClients( _FinalStage consentPolicy(com.auth0.client.mgmt.core.Nullable consentPolicy); + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + _FinalStage requireConsentNonRepudiation(Optional requireConsentNonRepudiation); + + _FinalStage requireConsentNonRepudiation(Boolean requireConsentNonRepudiation); + _FinalStage authorizationDetails(@Nullable OptionalNullable> authorizationDetails); _FinalStage authorizationDetails(List authorizationDetails); @@ -473,12 +592,28 @@ _FinalStage authorizationPolicy( _FinalStage authorizationPolicy( com.auth0.client.mgmt.core.Nullable authorizationPolicy); + + _FinalStage agentSubjectClaims(Optional agentSubjectClaims); + + _FinalStage agentSubjectClaims(ResourceServerAgentSubjectClaimsSchemaEnum agentSubjectClaims); + + _FinalStage type(@Nullable OptionalNullable type); + + _FinalStage type(ResourceServerTypeEnum type); + + _FinalStage type(Optional type); + + _FinalStage type(com.auth0.client.mgmt.core.Nullable type); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements IdentifierStage, _FinalStage { private String identifier; + private OptionalNullable type = OptionalNullable.absent(); + + private Optional agentSubjectClaims = Optional.empty(); + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); private Optional subjectTypeAuthorization = Optional.empty(); @@ -487,16 +622,22 @@ public static final class Builder implements IdentifierStage, _FinalStage { private OptionalNullable> authorizationDetails = OptionalNullable.absent(); + private Optional requireConsentNonRepudiation = Optional.empty(); + private OptionalNullable consentPolicy = OptionalNullable.absent(); private OptionalNullable tokenEncryption = OptionalNullable.absent(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private Optional enforcePolicies = Optional.empty(); private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); private Optional tokenDialect = Optional.empty(); + private OptionalNullable tokenLifetimeForAnonymousAccessTokens = OptionalNullable.absent(); + private Optional tokenLifetime = Optional.empty(); private Optional allowOnlineAccessWithEphemeralSessions = Optional.empty(); @@ -529,20 +670,24 @@ public Builder from(CreateResourceServerRequestContent other) { allowOnlineAccess(other.getAllowOnlineAccess()); allowOnlineAccessWithEphemeralSessions(other.getAllowOnlineAccessWithEphemeralSessions()); tokenLifetime(other.getTokenLifetime()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); tokenDialect(other.getTokenDialect()); skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); enforcePolicies(other.getEnforcePolicies()); + accessToken(other.getAccessToken()); tokenEncryption(other.getTokenEncryption()); consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); authorizationPolicy(other.getAuthorizationPolicy()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); return this; } /** - *

                                                              Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.

                                                              *

                                                              Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -553,6 +698,54 @@ public _FinalStage identifier(@NotNull String identifier) { return this; } + @java.lang.Override + public _FinalStage type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + @java.lang.Override + public _FinalStage agentSubjectClaims(ResourceServerAgentSubjectClaimsSchemaEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @java.lang.Override + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public _FinalStage agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + @java.lang.Override public _FinalStage authorizationPolicy( com.auth0.client.mgmt.core.Nullable authorizationPolicy) { @@ -677,6 +870,26 @@ public _FinalStage authorizationDetails(@Nullable OptionalNullable> return this; } + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

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

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public _FinalStage requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + @java.lang.Override public _FinalStage consentPolicy( com.auth0.client.mgmt.core.Nullable consentPolicy) { @@ -749,6 +962,41 @@ public _FinalStage tokenEncryption(@Nullable OptionalNullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + @java.lang.Override + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public _FinalStage accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + /** *

                                                              Whether to enforce authorization policies (true) or to ignore them (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -805,6 +1053,61 @@ public _FinalStage tokenDialect(Optional t return this; } + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

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

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

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

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

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

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

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

                                                              Expiration value (in seconds) for access tokens issued for this API from the token endpoint.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -971,15 +1274,20 @@ public CreateResourceServerRequestContent build() { allowOnlineAccess, allowOnlineAccessWithEphemeralSessions, tokenLifetime, + tokenLifetimeForAnonymousAccessTokens, tokenDialect, skipConsentForVerifiableFirstPartyClients, enforcePolicies, + accessToken, tokenEncryption, consentPolicy, + requireConsentNonRepudiation, authorizationDetails, proofOfPossession, subjectTypeAuthorization, authorizationPolicy, + agentSubjectClaims, + type, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java index b3c1f681..abec09bc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java @@ -52,12 +52,18 @@ public final class CreateResourceServerResponseContent { private final Optional enforcePolicies; + private final Optional tokenLifetimeForAnonymousAccessTokens; + private final Optional tokenDialect; + private final OptionalNullable accessToken; + private final OptionalNullable tokenEncryption; private final OptionalNullable consentPolicy; + private final Optional requireConsentNonRepudiation; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -68,6 +74,10 @@ public final class CreateResourceServerResponseContent { private final Optional clientId; + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + private final Map additionalProperties; private CreateResourceServerResponseContent( @@ -85,14 +95,19 @@ private CreateResourceServerResponseContent( Optional tokenLifetime, Optional tokenLifetimeForWeb, Optional enforcePolicies, + Optional tokenLifetimeForAnonymousAccessTokens, Optional tokenDialect, + OptionalNullable accessToken, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, OptionalNullable authorizationPolicy, Optional clientId, + Optional agentSubjectClaims, + OptionalNullable type, Map additionalProperties) { this.id = id; this.name = name; @@ -108,14 +123,19 @@ private CreateResourceServerResponseContent( this.tokenLifetime = tokenLifetime; this.tokenLifetimeForWeb = tokenLifetimeForWeb; this.enforcePolicies = enforcePolicies; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; this.tokenDialect = tokenDialect; + this.accessToken = accessToken; this.tokenEncryption = tokenEncryption; this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; this.additionalProperties = additionalProperties; } @@ -228,11 +248,28 @@ public Optional getEnforcePolicies() { return enforcePolicies; } + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public Optional getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + @JsonProperty("token_dialect") public Optional getTokenDialect() { return tokenDialect; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") public OptionalNullable getTokenEncryption() { @@ -251,6 +288,14 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") public OptionalNullable> getAuthorizationDetails() { @@ -291,6 +336,26 @@ public Optional getClientId() { return clientId; } + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -321,6 +386,12 @@ private OptionalNullable _getAuthorizationPol return authorizationPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -348,14 +419,19 @@ private boolean equalTo(CreateResourceServerResponseContent other) { && tokenLifetime.equals(other.tokenLifetime) && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) && enforcePolicies.equals(other.enforcePolicies) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) && tokenDialect.equals(other.tokenDialect) + && accessToken.equals(other.accessToken) && tokenEncryption.equals(other.tokenEncryption) && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) && authorizationPolicy.equals(other.authorizationPolicy) - && clientId.equals(other.clientId); + && clientId.equals(other.clientId) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); } @java.lang.Override @@ -375,14 +451,19 @@ public int hashCode() { this.tokenLifetime, this.tokenLifetimeForWeb, this.enforcePolicies, + this.tokenLifetimeForAnonymousAccessTokens, this.tokenDialect, + this.accessToken, this.tokenEncryption, this.consentPolicy, + this.requireConsentNonRepudiation, this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, this.authorizationPolicy, - this.clientId); + this.clientId, + this.agentSubjectClaims, + this.type); } @java.lang.Override @@ -424,12 +505,18 @@ public static final class Builder { private Optional enforcePolicies = Optional.empty(); + private Optional tokenLifetimeForAnonymousAccessTokens = Optional.empty(); + private Optional tokenDialect = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable tokenEncryption = OptionalNullable.absent(); private OptionalNullable consentPolicy = OptionalNullable.absent(); + private Optional requireConsentNonRepudiation = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -440,6 +527,10 @@ public static final class Builder { private Optional clientId = Optional.empty(); + private Optional agentSubjectClaims = Optional.empty(); + + private OptionalNullable type = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -460,14 +551,19 @@ public Builder from(CreateResourceServerResponseContent other) { tokenLifetime(other.getTokenLifetime()); tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); enforcePolicies(other.getEnforcePolicies()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); tokenDialect(other.getTokenDialect()); + accessToken(other.getAccessToken()); tokenEncryption(other.getTokenEncryption()); consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); return this; } @@ -667,6 +763,20 @@ public Builder enforcePolicies(Boolean enforcePolicies) { return this; } + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_anonymous_access_tokens", nulls = Nulls.SKIP) + public Builder tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = Optional.ofNullable(tokenLifetimeForAnonymousAccessTokens); + return this; + } + @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) public Builder tokenDialect(Optional tokenDialect) { this.tokenDialect = tokenDialect; @@ -678,6 +788,37 @@ public Builder tokenDialect(ResourceServerTokenDialectResponseEnum tokenDialect) return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) public Builder tokenEncryption(@Nullable OptionalNullable tokenEncryption) { this.tokenEncryption = tokenEncryption; @@ -742,6 +883,20 @@ public Builder consentPolicy( return this; } + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public Builder requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + + public Builder requireConsentNonRepudiation(Boolean requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = Optional.ofNullable(requireConsentNonRepudiation); + return this; + } + @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; @@ -865,6 +1020,48 @@ public Builder clientId(String clientId) { return this; } + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public Builder agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + + public Builder agentSubjectClaims(ResourceServerAgentSubjectClaimsResponseEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + public CreateResourceServerResponseContent build() { return new CreateResourceServerResponseContent( id, @@ -881,14 +1078,19 @@ public CreateResourceServerResponseContent build() { tokenLifetime, tokenLifetimeForWeb, enforcePolicies, + tokenLifetimeForAnonymousAccessTokens, tokenDialect, + accessToken, tokenEncryption, consentPolicy, + requireConsentNonRepudiation, authorizationDetails, proofOfPossession, subjectTypeAuthorization, authorizationPolicy, clientId, + agentSubjectClaims, + type, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRoleRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRoleRequestContent.java index ac4d8e96..2e9f5909 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRoleRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateRoleRequestContent.java @@ -25,12 +25,22 @@ public final class CreateRoleRequestContent { private final Optional description; + private final Optional type; + + private final Optional ownerId; + private final Map additionalProperties; private CreateRoleRequestContent( - String name, Optional description, Map additionalProperties) { + String name, + Optional description, + Optional type, + Optional ownerId, + Map additionalProperties) { this.name = name; this.description = description; + this.type = type; + this.ownerId = ownerId; this.additionalProperties = additionalProperties; } @@ -50,6 +60,22 @@ public Optional getDescription() { return description; } + /** + * @return The type of the role. Defaults to tenant. + */ + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The ID of the organization that owns this role. Required when type is "organization". + */ + @JsonProperty("owner_id") + public Optional getOwnerId() { + return ownerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -62,12 +88,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(CreateRoleRequestContent other) { - return name.equals(other.name) && description.equals(other.description); + return name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && ownerId.equals(other.ownerId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.name, this.description); + return Objects.hash(this.name, this.description, this.type, this.ownerId); } @java.lang.Override @@ -101,12 +130,30 @@ public interface _FinalStage { _FinalStage description(Optional description); _FinalStage description(String description); + + /** + *

                                                              The type of the role. Defaults to tenant.

                                                              + */ + _FinalStage type(Optional type); + + _FinalStage type(RoleTypeEnum type); + + /** + *

                                                              The ID of the organization that owns this role. Required when type is "organization".

                                                              + */ + _FinalStage ownerId(Optional ownerId); + + _FinalStage ownerId(String ownerId); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional ownerId = Optional.empty(); + + private Optional type = Optional.empty(); + private Optional description = Optional.empty(); @JsonAnySetter @@ -118,11 +165,12 @@ private Builder() {} public Builder from(CreateRoleRequestContent other) { name(other.getName()); description(other.getDescription()); + type(other.getType()); + ownerId(other.getOwnerId()); return this; } /** - *

                                                              Name of the role.

                                                              *

                                                              Name of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,6 +181,46 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

                                                              The ID of the organization that owns this role. Required when type is "organization".

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

                                                              The ID of the organization that owns this role. Required when type is "organization".

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

                                                              The type of the role. Defaults to tenant.

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

                                                              The type of the role. Defaults to tenant.

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

                                                              Description of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -155,7 +243,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public CreateRoleRequestContent build() { - return new CreateRoleRequestContent(name, description, additionalProperties); + return new CreateRoleRequestContent(name, description, type, ownerId, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java index a58277c5..26a983b2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java @@ -26,16 +26,24 @@ public final class CreateRoleResponseContent { private final Optional description; + private final Optional type; + + private final Optional ownerId; + private final Map additionalProperties; private CreateRoleResponseContent( Optional id, Optional name, Optional description, + Optional type, + Optional ownerId, Map additionalProperties) { this.id = id; this.name = name; this.description = description; + this.type = type; + this.ownerId = ownerId; this.additionalProperties = additionalProperties; } @@ -63,6 +71,16 @@ public Optional getDescription() { return description; } + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("owner_id") + public Optional getOwnerId() { + return ownerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -75,12 +93,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(CreateRoleResponseContent other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && ownerId.equals(other.ownerId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.description); + return Objects.hash(this.id, this.name, this.description, this.type, this.ownerId); } @java.lang.Override @@ -100,6 +122,10 @@ public static final class Builder { private Optional description = Optional.empty(); + private Optional type = Optional.empty(); + + private Optional ownerId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -109,6 +135,8 @@ public Builder from(CreateRoleResponseContent other) { id(other.getId()); name(other.getName()); description(other.getDescription()); + type(other.getType()); + ownerId(other.getOwnerId()); return this; } @@ -154,8 +182,30 @@ public Builder description(String description) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(RoleTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) + public Builder ownerId(Optional ownerId) { + this.ownerId = ownerId; + return this; + } + + public Builder ownerId(String ownerId) { + this.ownerId = Optional.ofNullable(ownerId); + return this; + } + public CreateRoleResponseContent build() { - return new CreateRoleResponseContent(id, name, description, additionalProperties); + return new CreateRoleResponseContent(id, name, description, type, ownerId, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java index 70234113..b2485576 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java @@ -171,7 +171,6 @@ public Builder from(CreateRuleRequestContent other) { } /** - *

                                                              Name of this rule.

                                                              *

                                                              Name of this rule.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -183,7 +182,6 @@ public ScriptStage name(@NotNull String name) { } /** - *

                                                              Code to be executed when this rule runs.

                                                              *

                                                              Code to be executed when this rule runs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java index 6a60aeff..6fdc78e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java @@ -284,7 +284,6 @@ public Builder from(CreateScimConfigurationResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -296,7 +295,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -308,7 +306,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -320,7 +317,6 @@ public TenantNameStage strategy(@NotNull String strategy) { } /** - *

                                                              The tenant's name

                                                              *

                                                              The tenant's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -332,7 +328,6 @@ public UserIdAttributeStage tenantName(@NotNull String tenantName) { } /** - *

                                                              User ID attribute for generating unique user ids

                                                              *

                                                              User ID attribute for generating unique user ids

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -344,7 +339,6 @@ public CreatedAtStage userIdAttribute(@NotNull String userIdAttribute) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -356,7 +350,6 @@ public UpdatedOnStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateSegmentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSegmentResponseContent.java new file mode 100644 index 00000000..afb79e3e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateSegmentResponseContent.java @@ -0,0 +1,328 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = CreateSegmentResponseContent.Builder.class) +public final class CreateSegmentResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final SegmentTypeEnum type; + + private final SegmentStatusEnum status; + + private final List rules; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private CreateSegmentResponseContent( + String id, + String name, + Optional description, + SegmentTypeEnum type, + SegmentStatusEnum status, + List rules, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.rules = rules; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public SegmentTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public SegmentStatusEnum getStatus() { + return status; + } + + @JsonProperty("rules") + public List getRules() { + return rules; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateSegmentResponseContent && equalTo((CreateSegmentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateSegmentResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && rules.equals(other.rules) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.rules, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(CreateSegmentResponseContent other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull SegmentTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull SegmentStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + CreateSegmentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage rules(List rules); + + _FinalStage addRules(SegmentRule rules); + + _FinalStage addAllRules(List rules); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private SegmentTypeEnum type; + + private SegmentStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private List rules = new ArrayList<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateSegmentResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + rules(other.getRules()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull SegmentTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull SegmentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllRules(List rules) { + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage addRules(SegmentRule rules) { + this.rules.add(rules); + return this; + } + + @java.lang.Override + @JsonSetter(value = "rules", nulls = Nulls.SKIP) + public _FinalStage rules(List rules) { + this.rules.clear(); + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateSegmentResponseContent build() { + return new CreateSegmentResponseContent( + id, name, description, type, status, rules, 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/CreateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java index 2283ca8f..6f080c6e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java @@ -219,7 +219,6 @@ public Builder from(CreateSelfServiceProfileRequestContent other) { } /** - *

                                                              The name of the self-service Profile.

                                                              *

                                                              The name of the self-service Profile.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java index 191c7374..ae5b1482 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java @@ -165,7 +165,6 @@ public Builder from(CreateTokenExchangeProfileRequestContent other) { } /** - *

                                                              Friendly name of this profile.

                                                              *

                                                              Friendly name of this profile.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -177,7 +176,6 @@ public SubjectTokenTypeStage name(@NotNull String name) { } /** - *

                                                              Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI.

                                                              *

                                                              Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -189,7 +187,6 @@ public ActionIdStage subjectTokenType(@NotNull String subjectTokenType) { } /** - *

                                                              The ID of the Custom Token Exchange action to execute for this profile, in order to validate the subject_token. The action must use the custom-token-exchange trigger.

                                                              *

                                                              The ID of the Custom Token Exchange action to execute for this profile, in order to validate the subject_token. The action must use the custom-token-exchange trigger.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java index 20cd7844..6d6027e7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java @@ -475,7 +475,6 @@ public Builder from(CreateUserRequestContent other) { } /** - *

                                                              Name of the connection this user should be created in.

                                                              *

                                                              Name of the connection this user should be created in.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateVariationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateVariationResponseContent.java new file mode 100644 index 00000000..a6cd176e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CreateVariationResponseContent.java @@ -0,0 +1,302 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateVariationResponseContent.Builder.class) +public final class CreateVariationResponseContent { + private final String id; + + private final String featureFlagId; + + private final String name; + + private final Optional description; + + private final Map overrides; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private CreateVariationResponseContent( + String id, + String featureFlagId, + String name, + Optional description, + Map overrides, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.featureFlagId = featureFlagId; + this.name = name; + this.description = description; + this.overrides = overrides; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("overrides") + public Map getOverrides() { + return overrides; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateVariationResponseContent && equalTo((CreateVariationResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateVariationResponseContent other) { + return id.equals(other.id) + && featureFlagId.equals(other.featureFlagId) + && name.equals(other.name) + && description.equals(other.description) + && overrides.equals(other.overrides) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.featureFlagId, + this.name, + this.description, + this.overrides, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + FeatureFlagIdStage id(@NotNull String id); + + Builder from(CreateVariationResponseContent other); + } + + public interface FeatureFlagIdStage { + NameStage featureFlagId(@NotNull String featureFlagId); + } + + public interface NameStage { + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + CreateVariationResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage overrides(Map overrides); + + _FinalStage putAllOverrides(Map overrides); + + _FinalStage overrides(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, FeatureFlagIdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String featureFlagId; + + private String name; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Map overrides = new LinkedHashMap<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateVariationResponseContent other) { + id(other.getId()); + featureFlagId(other.getFeatureFlagId()); + name(other.getName()); + description(other.getDescription()); + overrides(other.getOverrides()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public FeatureFlagIdStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public NameStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage overrides(String key, Object value) { + this.overrides.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllOverrides(Map overrides) { + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "overrides", nulls = Nulls.SKIP) + public _FinalStage overrides(Map overrides) { + this.overrides.clear(); + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public CreateVariationResponseContent build() { + return new CreateVariationResponseContent( + id, featureFlagId, name, description, overrides, 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/CreateVerificationEmailResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateVerificationEmailResponseContent.java index c242bbf2..b33b8633 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CreateVerificationEmailResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/CreateVerificationEmailResponseContent.java @@ -172,7 +172,6 @@ public Builder from(CreateVerificationEmailResponseContent other) { } /** - *

                                                              Status of this job.

                                                              *

                                                              Status of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -184,7 +183,6 @@ public TypeStage status(@NotNull String status) { } /** - *

                                                              Type of job this is.

                                                              *

                                                              Type of job this is.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -196,7 +194,6 @@ public IdStage type(@NotNull String type) { } /** - *

                                                              ID of this job.

                                                              *

                                                              ID of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CredentialId.java b/src/main/java/com/auth0/client/mgmt/types/CredentialId.java index 9c6a9978..276cb45f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CredentialId.java +++ b/src/main/java/com/auth0/client/mgmt/types/CredentialId.java @@ -98,7 +98,6 @@ public Builder from(CredentialId other) { } /** - *

                                                              Credential ID

                                                              *

                                                              Credential ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java index c4f57616..269f7177 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java +++ b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessRequestingApp.java @@ -28,7 +28,7 @@ private CrossAppAccessRequestingApp(boolean active, Map addition } /** - * @return Set to true to enable the connection as a Requesting Application for Cross App Access. + * @return Set to true to enable the connection as a Requesting Application for Cross App Access. On oidc connections this requires options.type to be back_channel. Setting false is always accepted, so the role can be turned off even if the tenant or connection no longer supports it. */ @JsonProperty("active") public boolean getActive() { @@ -66,7 +66,7 @@ public static ActiveStage builder() { public interface ActiveStage { /** - *

                                                              Set to true to enable the connection as a Requesting Application for Cross App Access.

                                                              + *

                                                              Set to true to enable the connection as a Requesting Application for Cross App Access. On oidc connections this requires options.type to be back_channel. Setting false is always accepted, so the role can be turned off even if the tenant or connection no longer supports it.

                                                              */ _FinalStage active(boolean active); @@ -97,8 +97,7 @@ public Builder from(CrossAppAccessRequestingApp other) { } /** - *

                                                              Set to true to enable the connection as a Requesting Application for Cross App Access.

                                                              - *

                                                              Set to true to enable the connection as a Requesting Application for Cross App Access.

                                                              + *

                                                              Set to true to enable the connection as a Requesting Application for Cross App Access. On oidc connections this requires options.type to be back_channel. Setting false is always accepted, so the role can be turned off even if the tenant or connection no longer supports it.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessResourceApp.java b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessResourceApp.java new file mode 100644 index 00000000..caa3160c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessResourceApp.java @@ -0,0 +1,119 @@ +/** + * 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 = CrossAppAccessResourceApp.Builder.class) +public final class CrossAppAccessResourceApp { + private final CrossAppAccessResourceAppStatusEnum status; + + private final Map additionalProperties; + + private CrossAppAccessResourceApp( + CrossAppAccessResourceAppStatusEnum status, Map additionalProperties) { + this.status = status; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("status") + public CrossAppAccessResourceAppStatusEnum getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CrossAppAccessResourceApp && equalTo((CrossAppAccessResourceApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CrossAppAccessResourceApp 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 CrossAppAccessResourceAppStatusEnum status); + + Builder from(CrossAppAccessResourceApp other); + } + + public interface _FinalStage { + CrossAppAccessResourceApp build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements StatusStage, _FinalStage { + private CrossAppAccessResourceAppStatusEnum status; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CrossAppAccessResourceApp other) { + status(other.getStatus()); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public _FinalStage status(@NotNull CrossAppAccessResourceAppStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + public CrossAppAccessResourceApp build() { + return new CrossAppAccessResourceApp(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/CrossAppAccessResourceAppStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessResourceAppStatusEnum.java new file mode 100644 index 00000000..f7caaf76 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/CrossAppAccessResourceAppStatusEnum.java @@ -0,0 +1,86 @@ +/** + * 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 CrossAppAccessResourceAppStatusEnum { + public static final CrossAppAccessResourceAppStatusEnum ENABLED = + new CrossAppAccessResourceAppStatusEnum(Value.ENABLED, "enabled"); + + public static final CrossAppAccessResourceAppStatusEnum DISABLED = + new CrossAppAccessResourceAppStatusEnum(Value.DISABLED, "disabled"); + + private final Value value; + + private final String string; + + CrossAppAccessResourceAppStatusEnum(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 CrossAppAccessResourceAppStatusEnum + && this.string.equals(((CrossAppAccessResourceAppStatusEnum) 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 CrossAppAccessResourceAppStatusEnum valueOf(String value) { + switch (value) { + case "enabled": + return ENABLED; + case "disabled": + return DISABLED; + default: + return new CrossAppAccessResourceAppStatusEnum(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/CspPolicyReporting.java b/src/main/java/com/auth0/client/mgmt/types/CspPolicyReporting.java index 157587aa..4e60209e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CspPolicyReporting.java +++ b/src/main/java/com/auth0/client/mgmt/types/CspPolicyReporting.java @@ -42,7 +42,7 @@ public Optional getReportUri() { } /** - * @return Report-To group name for modern reporting. + * @return Report-To group name for modern reporting. Letters, digits, underscores and hyphens only; enforced on write by the request validator. */ @JsonProperty("report_to_group") public Optional getReportToGroup() { @@ -110,7 +110,7 @@ public Builder reportUri(String reportUri) { } /** - *

                                                              Report-To group name for modern reporting.

                                                              + *

                                                              Report-To group name for modern reporting. Letters, digits, underscores and hyphens only; enforced on write by the request validator.

                                                              */ @JsonSetter(value = "report_to_group", nulls = Nulls.SKIP) public Builder reportToGroup(Optional reportToGroup) { diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java index 0f22b859..f92c1a8c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java +++ b/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java @@ -379,7 +379,6 @@ public Builder from(CustomDomain other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -391,7 +390,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -403,7 +401,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

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

                                                              *

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

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/DefaultConfigEnum.java b/src/main/java/com/auth0/client/mgmt/types/DefaultConfigEnum.java new file mode 100644 index 00000000..22ac8029 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/DefaultConfigEnum.java @@ -0,0 +1,83 @@ +/** + * 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 DefaultConfigEnum { + public static final DefaultConfigEnum FLAG = new DefaultConfigEnum(Value.FLAG, "flag"); + + public static final DefaultConfigEnum TENANT = new DefaultConfigEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + DefaultConfigEnum(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 DefaultConfigEnum && this.string.equals(((DefaultConfigEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FLAG: + return visitor.visitFlag(); + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static DefaultConfigEnum valueOf(String value) { + switch (value) { + case "flag": + return FLAG; + case "tenant": + return TENANT; + default: + return new DefaultConfigEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + FLAG, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitFlag(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/DefaultMethodPhoneNumberIdentifierEnum.java b/src/main/java/com/auth0/client/mgmt/types/DefaultMethodPhoneNumberIdentifierEnum.java new file mode 100644 index 00000000..ac360aa8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/DefaultMethodPhoneNumberIdentifierEnum.java @@ -0,0 +1,86 @@ +/** + * 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 DefaultMethodPhoneNumberIdentifierEnum { + public static final DefaultMethodPhoneNumberIdentifierEnum PASSWORD = + new DefaultMethodPhoneNumberIdentifierEnum(Value.PASSWORD, "password"); + + public static final DefaultMethodPhoneNumberIdentifierEnum PHONE_OTP = + new DefaultMethodPhoneNumberIdentifierEnum(Value.PHONE_OTP, "phone_otp"); + + private final Value value; + + private final String string; + + DefaultMethodPhoneNumberIdentifierEnum(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 DefaultMethodPhoneNumberIdentifierEnum + && this.string.equals(((DefaultMethodPhoneNumberIdentifierEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PASSWORD: + return visitor.visitPassword(); + case PHONE_OTP: + return visitor.visitPhoneOtp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static DefaultMethodPhoneNumberIdentifierEnum valueOf(String value) { + switch (value) { + case "password": + return PASSWORD; + case "phone_otp": + return PHONE_OTP; + default: + return new DefaultMethodPhoneNumberIdentifierEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PASSWORD, + + PHONE_OTP, + + UNKNOWN + } + + public interface Visitor { + T visitPassword(); + + T visitPhoneOtp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java index 97dbcc51..829ea5e9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -34,7 +35,8 @@ private DeleteActionRequestParameters(OptionalNullable force, Map getForce() { if (force == null) { return OptionalNullable.absent(); @@ -42,6 +44,12 @@ public OptionalNullable getForce() { return force; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("force") + private OptionalNullable _getForce() { + return force; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java index c0b37bd2..c985d721 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java @@ -6,9 +6,9 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -31,7 +31,7 @@ private DeleteUserBlocksByIdentifierRequestParameters(String identifier, MapShould be any of a username, phone number, or email.

                                                              *

                                                              Should be any of a username, phone number, or email.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java index a6189f35..70afd837 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java @@ -6,9 +6,9 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -31,7 +31,7 @@ private DeleteUserGrantByUserIdRequestParameters(String userId, Mapuser_id of the grant to delete.

                                                              *

                                                              user_id of the grant to delete.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java index 83502077..1e29a101 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java @@ -266,7 +266,6 @@ public Builder from(DeleteUserIdentityResponseContentItem other) { } /** - *

                                                              The name of the connection for the identity.

                                                              *

                                                              The name of the connection for the identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -278,7 +277,6 @@ public UserIdStage connection(@NotNull String connection) { } /** - *

                                                              The unique identifier for the user for the identity.

                                                              *

                                                              The unique identifier for the user for the identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -290,7 +288,6 @@ public ProviderStage userId(@NotNull UserId userId) { } /** - *

                                                              The type of identity provider.

                                                              *

                                                              The type of identity provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java index dcddd0b3..5b35e810 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java +++ b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java @@ -349,7 +349,6 @@ public Builder from(DirectoryProvisioning other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -361,7 +360,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -373,7 +371,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -385,7 +382,6 @@ public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { } /** - *

                                                              Whether periodic automatic synchronization is enabled

                                                              *

                                                              Whether periodic automatic synchronization is enabled

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -397,7 +393,6 @@ public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) } /** - *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -409,7 +404,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java index 7340637f..40c38a64 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java @@ -119,7 +119,6 @@ public Builder from(DirectoryProvisioningMappingItem other) { } /** - *

                                                              The field location in the Auth0 schema

                                                              *

                                                              The field location in the Auth0 schema

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,7 +130,6 @@ public IdpStage auth0(@NotNull String auth0) { } /** - *

                                                              The field location in the IDP schema

                                                              *

                                                              The field location in the IDP schema

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java b/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java index a987492d..6fca99e8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java +++ b/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java @@ -147,7 +147,6 @@ public RecordStage name(@NotNull DomainVerificationMethodNameEnum name) { } /** - *

                                                              Value used to verify the domain.

                                                              *

                                                              Value used to verify the domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java b/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java index cc817432..f664a9ed 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java @@ -20,7 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmailAttribute.Builder.class) public final class EmailAttribute { - private final Optional identifier; + private final Optional identifier; private final Optional unique; @@ -33,7 +33,7 @@ public final class EmailAttribute { private final Map additionalProperties; private EmailAttribute( - Optional identifier, + Optional identifier, Optional unique, Optional profileRequired, Optional verificationMethod, @@ -48,7 +48,7 @@ private EmailAttribute( } @JsonProperty("identifier") - public Optional getIdentifier() { + public Optional getIdentifier() { return identifier; } @@ -113,7 +113,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional identifier = Optional.empty(); + private Optional identifier = Optional.empty(); private Optional unique = Optional.empty(); @@ -138,12 +138,12 @@ public Builder from(EmailAttribute other) { } @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public Builder identifier(Optional identifier) { + public Builder identifier(Optional identifier) { this.identifier = identifier; return this; } - public Builder identifier(ConnectionAttributeIdentifier identifier) { + public Builder identifier(EmailAttributeIdentifier identifier) { this.identifier = Optional.ofNullable(identifier); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeIdentifier.java b/src/main/java/com/auth0/client/mgmt/types/EmailAttributeIdentifier.java similarity index 87% rename from src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeIdentifier.java rename to src/main/java/com/auth0/client/mgmt/types/EmailAttributeIdentifier.java index d7ed08f5..b95a1dd7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeIdentifier.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailAttributeIdentifier.java @@ -18,15 +18,15 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionAttributeIdentifier.Builder.class) -public final class ConnectionAttributeIdentifier { +@JsonDeserialize(builder = EmailAttributeIdentifier.Builder.class) +public final class EmailAttributeIdentifier { private final Optional active; private final Optional defaultMethod; private final Map additionalProperties; - private ConnectionAttributeIdentifier( + private EmailAttributeIdentifier( Optional active, Optional defaultMethod, Map additionalProperties) { @@ -51,7 +51,7 @@ public Optional getDefaultMethod() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof ConnectionAttributeIdentifier && equalTo((ConnectionAttributeIdentifier) other); + return other instanceof EmailAttributeIdentifier && equalTo((EmailAttributeIdentifier) other); } @JsonAnyGetter @@ -59,7 +59,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(ConnectionAttributeIdentifier other) { + private boolean equalTo(EmailAttributeIdentifier other) { return active.equals(other.active) && defaultMethod.equals(other.defaultMethod); } @@ -88,7 +88,7 @@ public static final class Builder { private Builder() {} - public Builder from(ConnectionAttributeIdentifier other) { + public Builder from(EmailAttributeIdentifier other) { active(other.getActive()); defaultMethod(other.getDefaultMethod()); return this; @@ -119,8 +119,8 @@ public Builder defaultMethod(DefaultMethodEmailIdentifierEnum defaultMethod) { return this; } - public ConnectionAttributeIdentifier build() { - return new ConnectionAttributeIdentifier(active, defaultMethod, additionalProperties); + public EmailAttributeIdentifier build() { + return new EmailAttributeIdentifier(active, defaultMethod, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java index 64a339fc..27009dfc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java +++ b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java @@ -99,7 +99,6 @@ public Builder from(EmailProviderCredentialsSchemaZero other) { } /** - *

                                                              API Key

                                                              *

                                                              API Key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java index 0c8f0e43..d3df3e90 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java @@ -12,6 +12,9 @@ public final class EnabledFeaturesEnum { public static final EnabledFeaturesEnum UNIVERSAL_LOGOUT = new EnabledFeaturesEnum(Value.UNIVERSAL_LOGOUT, "universal_logout"); + public static final EnabledFeaturesEnum DIRECTORY_SYNC = + new EnabledFeaturesEnum(Value.DIRECTORY_SYNC, "directory_sync"); + private final Value value; private final String string; @@ -48,6 +51,8 @@ public T visit(Visitor visitor) { return visitor.visitScim(); case UNIVERSAL_LOGOUT: return visitor.visitUniversalLogout(); + case DIRECTORY_SYNC: + return visitor.visitDirectorySync(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -61,6 +66,8 @@ public static EnabledFeaturesEnum valueOf(String value) { return SCIM; case "universal_logout": return UNIVERSAL_LOGOUT; + case "directory_sync": + return DIRECTORY_SYNC; default: return new EnabledFeaturesEnum(Value.UNKNOWN, value); } @@ -71,6 +78,8 @@ public enum Value { UNIVERSAL_LOGOUT, + DIRECTORY_SYNC, + UNKNOWN } @@ -79,6 +88,8 @@ public interface Visitor { T visitUniversalLogout(); + T visitDirectorySync(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/EncryptionKey.java b/src/main/java/com/auth0/client/mgmt/types/EncryptionKey.java index 0f6dffd8..edb37d7f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EncryptionKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/EncryptionKey.java @@ -262,7 +262,6 @@ public Builder from(EncryptionKey other) { } /** - *

                                                              Key ID

                                                              *

                                                              Key ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -288,7 +287,6 @@ public CreatedAtStage state(@NotNull EncryptionKeyState state) { } /** - *

                                                              Key creation timestamp

                                                              *

                                                              Key creation timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -300,7 +298,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Key update timestamp

                                                              *

                                                              Key update timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java index 860e983c..3df3d5a0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java @@ -98,7 +98,6 @@ public Builder from(EventStreamActionConfiguration other) { } /** - *

                                                              Action ID for the action destination.

                                                              *

                                                              Action ID for the action destination.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java index 2395092e..4c6f7b3c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java @@ -31,7 +31,7 @@ public final class EventStreamCloudEvent { private final Optional time; - private final Optional data; + private final Optional> data; private final Map additionalProperties; @@ -41,7 +41,7 @@ private EventStreamCloudEvent( Optional specversion, Optional type, Optional time, - Optional data, + Optional> data, Map additionalProperties) { this.id = id; this.source = source; @@ -92,11 +92,8 @@ public Optional getTime() { return time; } - /** - * @return Event contents encoded as a string. - */ @JsonProperty("data") - public Optional getData() { + public Optional> getData() { return data; } @@ -146,7 +143,7 @@ public static final class Builder { private Optional time = Optional.empty(); - private Optional data = Optional.empty(); + private Optional> data = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -233,16 +230,13 @@ public Builder time(OffsetDateTime time) { return this; } - /** - *

                                                              Event contents encoded as a string.

                                                              - */ @JsonSetter(value = "data", nulls = Nulls.SKIP) - public Builder data(Optional data) { + public Builder data(Optional> data) { this.data = data; return this; } - public Builder data(String data) { + public Builder data(Map data) { this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreated.java new file mode 100644 index 00000000..9b23b018 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreated.java @@ -0,0 +1,154 @@ +/** + * 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 = EventStreamCloudEventConnectionCreated.Builder.class) +public final class EventStreamCloudEventConnectionCreated { + private final String offset; + + private final EventStreamCloudEventConnectionCreatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreated( + String offset, + EventStreamCloudEventConnectionCreatedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventConnectionCreatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreated + && equalTo((EventStreamCloudEventConnectionCreated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              + */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventConnectionCreated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventConnectionCreatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventConnectionCreatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventConnectionCreatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreated build() { + return new EventStreamCloudEventConnectionCreated(offset, event, 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/EventStreamCloudEventConnectionCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedCloudEvent.java new file mode 100644 index 00000000..52a96b25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedCloudEvent.Builder.class) +public final class EventStreamCloudEventConnectionCreatedCloudEvent { + private final EventStreamCloudEventSpecVersionEnum specversion; + + private final EventStreamCloudEventConnectionCreatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventConnectionCreatedData data; + + private final String a0Tenant; + + private final Optional a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedCloudEvent( + EventStreamCloudEventSpecVersionEnum specversion, + EventStreamCloudEventConnectionCreatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventConnectionCreatedData data, + String a0Tenant, + Optional a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("specversion") + public EventStreamCloudEventSpecVersionEnum getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventConnectionCreatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventConnectionCreatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). + */ + @JsonProperty("a0stream") + public Optional getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedCloudEvent + && equalTo((EventStreamCloudEventConnectionCreatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); + + Builder from(EventStreamCloudEventConnectionCreatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventConnectionCreatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              + */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

                                                              A unique identifier for the event.

                                                              + */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              + */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventConnectionCreatedData data); + } + + public interface A0TenantStage { + /** + *

                                                              The auth0 tenant ID to which the event is associated.

                                                              + */ + _FinalStage a0Tenant(@NotNull String a0Tenant); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + _FinalStage { + private EventStreamCloudEventSpecVersionEnum specversion; + + private EventStreamCloudEventConnectionCreatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventConnectionCreatedData data; + + private String a0Tenant; + + private Optional a0Purpose = Optional.empty(); + + private Optional a0Stream = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventConnectionCreatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

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

                                                              A unique identifier for the event.

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

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

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

                                                              The auth0 tenant ID to which the event is associated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public _FinalStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

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

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedCloudEvent build() { + return new EventStreamCloudEventConnectionCreatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, 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/EventStreamCloudEventConnectionCreatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedCloudEventTypeEnum.java new file mode 100644 index 00000000..f1851ae5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedCloudEventTypeEnum { + public static final EventStreamCloudEventConnectionCreatedCloudEventTypeEnum CONNECTION_CREATED = + new EventStreamCloudEventConnectionCreatedCloudEventTypeEnum( + Value.CONNECTION_CREATED, "connection.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedCloudEventTypeEnum(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 EventStreamCloudEventConnectionCreatedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION_CREATED: + return visitor.visitConnectionCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "connection.created": + return CONNECTION_CREATED; + default: + return new EventStreamCloudEventConnectionCreatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitConnectionCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedData.java new file mode 100644 index 00000000..be321263 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedData.java @@ -0,0 +1,185 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedData.Builder.class) +public final class EventStreamCloudEventConnectionCreatedData { + private final EventStreamCloudEventConnectionCreatedObject object; + + private final Optional previousObject; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedData( + EventStreamCloudEventConnectionCreatedObject object, + Optional previousObject, + Optional context, + Map additionalProperties) { + this.object = object; + this.previousObject = previousObject; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventConnectionCreatedObject getObject() { + return object; + } + + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedData + && equalTo((EventStreamCloudEventConnectionCreatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedData other) { + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.previousObject, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventConnectionCreatedObject object); + + Builder from(EventStreamCloudEventConnectionCreatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventConnectionCreatedPreviousObject previousObject); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventConnectionCreatedObject object; + + private Optional context = Optional.empty(); + + private Optional previousObject = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedData other) { + object(other.getObject()); + previousObject(other.getPreviousObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventConnectionCreatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventConnectionCreatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedData build() { + return new EventStreamCloudEventConnectionCreatedData( + object, previousObject, context, 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/EventStreamCloudEventConnectionCreatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject.java new file mode 100644 index 00000000..f0e3c2eb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventConnectionCreatedObject.Deserializer.class) +public final class EventStreamCloudEventConnectionCreatedObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventConnectionCreatedObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject2) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject3) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject4) this.value); + } else if (this.type == 5) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject5) this.value); + } else if (this.type == 6) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject6) this.value); + } else if (this.type == 7) { + return visitor.visit((EventStreamCloudEventConnectionCreatedObject7) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject + && equalTo((EventStreamCloudEventConnectionCreatedObject) other); + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject0 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 0); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject1 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 1); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject2 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 2); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject3 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 3); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject4 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 4); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject5 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 5); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject6 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 6); + } + + public static EventStreamCloudEventConnectionCreatedObject of(EventStreamCloudEventConnectionCreatedObject7 value) { + return new EventStreamCloudEventConnectionCreatedObject(value, 7); + } + + public interface Visitor { + T visit(EventStreamCloudEventConnectionCreatedObject0 value); + + T visit(EventStreamCloudEventConnectionCreatedObject1 value); + + T visit(EventStreamCloudEventConnectionCreatedObject2 value); + + T visit(EventStreamCloudEventConnectionCreatedObject3 value); + + T visit(EventStreamCloudEventConnectionCreatedObject4 value); + + T visit(EventStreamCloudEventConnectionCreatedObject5 value); + + T visit(EventStreamCloudEventConnectionCreatedObject6 value); + + T visit(EventStreamCloudEventConnectionCreatedObject7 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventConnectionCreatedObject.class); + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject2.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject3.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject4.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject5.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject6.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedObject7.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0.java new file mode 100644 index 00000000..66827bee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject0.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0 { + private final Optional authentication; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional connectedAccounts; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject0StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0( + Optional authentication, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional connectedAccounts, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject0StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.connectedAccounts = connectedAccounts; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject0StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0 + && equalTo((EventStreamCloudEventConnectionCreatedObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0 other) { + return authentication.equals(other.authentication) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && connectedAccounts.equals(other.connectedAccounts) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.connectedAccounts, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject0StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject0Authentication authentication); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject0Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts connectedAccounts); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject0Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject0StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject0 other) { + authentication(other.getAuthentication()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + connectedAccounts(other.getConnectedAccounts()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedObject0Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject0Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject0 build() { + return new EventStreamCloudEventConnectionCreatedObject0( + authentication, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + connectedAccounts, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject0Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0Authentication.java new file mode 100644 index 00000000..af0dd326 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject0Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject0Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject0Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject0Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject0Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject0Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject0Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts.java new file mode 100644 index 00000000..597d653f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts.java @@ -0,0 +1,150 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts { + private final boolean active; + + private final Optional crossAppAccess; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts( + boolean active, Optional crossAppAccess, Map additionalProperties) { + this.active = active; + this.crossAppAccess = crossAppAccess; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @JsonProperty("cross_app_access") + public Optional getCrossAppAccess() { + return crossAppAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts other) { + return active == other.active && crossAppAccess.equals(other.crossAppAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.crossAppAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage crossAppAccess(Optional crossAppAccess); + + _FinalStage crossAppAccess(Boolean crossAppAccess); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + private Optional crossAppAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts other) { + active(other.getActive()); + crossAppAccess(other.getCrossAppAccess()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccess(Boolean crossAppAccess) { + this.crossAppAccess = Optional.ofNullable(crossAppAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access", nulls = Nulls.SKIP) + public _FinalStage crossAppAccess(Optional crossAppAccess) { + this.crossAppAccess = crossAppAccess; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject0ConnectedAccounts( + active, crossAppAccess, 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/EventStreamCloudEventConnectionCreatedObject0Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0Metadata.java new file mode 100644 index 00000000..5576d0d3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject0Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject0Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject0Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject0Metadata(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/EventStreamCloudEventConnectionCreatedObject0Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0Options.java new file mode 100644 index 00000000..f4db5bf2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0Options.java @@ -0,0 +1,1286 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject0Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional connectionSettings; + + private final Optional> domainAliases; + + private final Optional dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional discoveryUrl; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional discoveryUrl, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.discoveryUrl = discoveryUrl; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0Options + && equalTo((EventStreamCloudEventConnectionCreatedObject0Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && discoveryUrl.equals(other.discoveryUrl) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.discoveryUrl, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedObject0Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject0Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion(EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap attributeMap); + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + _FinalStage discoveryUrl(Optional discoveryUrl); + + _FinalStage discoveryUrl(String discoveryUrl); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional dpopSigningAlg = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional connectionSettings = + Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject0Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + discoveryUrl(other.getDiscoveryUrl()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

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

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public _FinalStage discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap(EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              Tenant domain

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

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata(EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

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

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              https url of the icon to be shown

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

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

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

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject0Options build() { + return new EventStreamCloudEventConnectionCreatedObject0Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + discoveryUrl, + type, + 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/EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap.java new file mode 100644 index 00000000..47922b91 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap.java @@ -0,0 +1,166 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional mappingMode = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..55d3848d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum BIND_ALL = + new EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum( + Value.BIND_ALL, "bind_all"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum USE_MAP = + new EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BIND_ALL: + return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "bind_all": + return BIND_ALL; + case "use_map": + return USE_MAP; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BIND_ALL, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBindAll(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings.java new file mode 100644 index 00000000..e1f4cfba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce(EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..58e9be57 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum(Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum(Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum DISABLED = + new EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum(Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum valueOf(String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..5f5631cd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum.java @@ -0,0 +1,110 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsDpopSigningAlgEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..e21b1cb8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

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

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedObject0OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..10026ed5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,155 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS512 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum ES384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum PS384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum ES256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum PS256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum(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 + EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata.java new file mode 100644 index 00000000..7a661cdd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              A list of the Authentication Context Class References that this OP supports

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

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionCreatedObject0OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..6b04468b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum.java @@ -0,0 +1,88 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum(Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsSchemaVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..324f5aa1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..f898f2fa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..3676e767 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,153 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum RS512 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum PS384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum PS256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum RS384 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum RS256 = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..425f260b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum ISSUER = + new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum.java new file mode 100644 index 00000000..4602550a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum.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 EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum { + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum FRONT_CHANNEL = + new EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum(Value.FRONT_CHANNEL, "front_channel"); + + public static final EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum(Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum(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 EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FRONT_CHANNEL: + return visitor.visitFrontChannel(); + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum valueOf(String value) { + switch (value) { + case "front_channel": + return FRONT_CHANNEL; + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionCreatedObject0OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + FRONT_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitFrontChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0StrategyEnum.java new file mode 100644 index 00000000..e45f7559 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject0StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject0StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject0StrategyEnum OIDC = + new EventStreamCloudEventConnectionCreatedObject0StrategyEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject0StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject0StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject0StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject0StrategyEnum valueOf(String value) { + switch (value) { + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionCreatedObject0StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1.java new file mode 100644 index 00000000..66c49bde --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject1.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject1StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject1StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject1StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1 + && equalTo((EventStreamCloudEventConnectionCreatedObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject1StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject1Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject1Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject1Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject1StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject1 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject1Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject1 build() { + return new EventStreamCloudEventConnectionCreatedObject1( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject1Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1Authentication.java new file mode 100644 index 00000000..bf459176 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject1Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject1Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject1Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject1Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject1Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject1Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject1Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts.java new file mode 100644 index 00000000..9fb604aa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject1ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject1Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1Metadata.java new file mode 100644 index 00000000..b244e8ac --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject1Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject1Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject1Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject1Metadata(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/EventStreamCloudEventConnectionCreatedObject1Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1Options.java new file mode 100644 index 00000000..c3698e9f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1Options.java @@ -0,0 +1,1286 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject1Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional connectionSettings; + + private final Optional> domainAliases; + + private final Optional dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional domain; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional domain, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.domain = domain; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1Options + && equalTo((EventStreamCloudEventConnectionCreatedObject1Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && domain.equals(other.domain) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.domain, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedObject1Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject1Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion(EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap attributeMap); + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional dpopSigningAlg = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional connectionSettings = + Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject1Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + domain(other.getDomain()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

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

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              Tenant domain

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

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata(EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

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

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              https url of the icon to be shown

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

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

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

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject1Options build() { + return new EventStreamCloudEventConnectionCreatedObject1Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + domain, + type, + 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/EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap.java new file mode 100644 index 00000000..fff8c956 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap.java @@ -0,0 +1,166 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional mappingMode = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..a92a9b55 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum USE_MAP = + new EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum BASIC_PROFILE = + new EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum( + Value.BASIC_PROFILE, "basic_profile"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USE_MAP: + return visitor.visitUseMap(); + case BASIC_PROFILE: + return visitor.visitBasicProfile(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "use_map": + return USE_MAP; + case "basic_profile": + return BASIC_PROFILE; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BASIC_PROFILE, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBasicProfile(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings.java new file mode 100644 index 00000000..2239e4de --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce(EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..61f29d22 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum(Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum(Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum DISABLED = + new EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum(Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum valueOf(String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..ad88d752 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum.java @@ -0,0 +1,110 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsDpopSigningAlgEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..58cee380 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

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

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedObject1OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..067247f4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,155 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS512 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum ES384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum PS384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum ES256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum PS256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum(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 + EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata.java new file mode 100644 index 00000000..fe4f4ae3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              A list of the Authentication Context Class References that this OP supports

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

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionCreatedObject1OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..769c4b04 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum.java @@ -0,0 +1,88 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum(Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsSchemaVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..7a6cf813 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..4fab17a0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..1f915d6a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,153 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum RS512 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum PS384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum PS256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum RS384 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum RS256 = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..5fe7b3cb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum ISSUER = + new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum.java new file mode 100644 index 00000000..49fd7ae7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum { + public static final EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum(Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum(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 EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum valueOf(String value) { + switch (value) { + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionCreatedObject1OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1StrategyEnum.java new file mode 100644 index 00000000..76f2b920 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject1StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject1StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject1StrategyEnum OKTA = + new EventStreamCloudEventConnectionCreatedObject1StrategyEnum(Value.OKTA, "okta"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject1StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject1StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject1StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OKTA: + return visitor.visitOkta(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject1StrategyEnum valueOf(String value) { + switch (value) { + case "okta": + return OKTA; + default: + return new EventStreamCloudEventConnectionCreatedObject1StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OKTA, + + UNKNOWN + } + + public interface Visitor { + T visitOkta(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2.java new file mode 100644 index 00000000..0b196a40 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject2.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject2StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject2StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject2StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2 + && equalTo((EventStreamCloudEventConnectionCreatedObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject2StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject2Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject2Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject2Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject2StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject2 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject2Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject2 build() { + return new EventStreamCloudEventConnectionCreatedObject2( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject2Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2Authentication.java new file mode 100644 index 00000000..94c239ca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject2Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject2Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject2Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject2Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject2Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject2Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts.java new file mode 100644 index 00000000..352b45ea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject2ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject2Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2Metadata.java new file mode 100644 index 00000000..d3957e91 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject2Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject2Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject2Metadata(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/EventStreamCloudEventConnectionCreatedObject2Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2Options.java new file mode 100644 index 00000000..eda968cf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2Options.java @@ -0,0 +1,1210 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional debug; + + private final Optional deflate; + + private final Optional destinationUrl; + + private final Optional disableFieldsMapFix; + + private final Optional disableSignout; + + private final Optional discoveryUrl; + + private final Optional> fieldsMap; + + private final Optional fieldsMapJsonRaw; + + private final Optional globalTokenRevocationJwtIss; + + private final Optional globalTokenRevocationJwtSub; + + private final Optional metadataUrl; + + private final Optional oidcMetadata; + + private final Optional recipientUrl; + + private final Optional requestTemplate; + + private final Optional signOutEndpoint; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional debug, + Optional deflate, + Optional destinationUrl, + Optional disableFieldsMapFix, + Optional disableSignout, + Optional discoveryUrl, + Optional> fieldsMap, + Optional fieldsMapJsonRaw, + Optional globalTokenRevocationJwtIss, + Optional globalTokenRevocationJwtSub, + Optional metadataUrl, + Optional oidcMetadata, + Optional recipientUrl, + Optional requestTemplate, + Optional signOutEndpoint, + Optional userIdAttribute, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.debug = debug; + this.deflate = deflate; + this.destinationUrl = destinationUrl; + this.disableFieldsMapFix = disableFieldsMapFix; + this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; + this.fieldsMap = fieldsMap; + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + this.metadataUrl = metadataUrl; + this.oidcMetadata = oidcMetadata; + this.recipientUrl = recipientUrl; + this.requestTemplate = requestTemplate; + this.signOutEndpoint = signOutEndpoint; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes. + */ + @JsonProperty("debug") + public Optional getDebug() { + return debug; + } + + /** + * @return When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. + */ + @JsonProperty("deflate") + public Optional getDeflate() { + return deflate; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("destinationUrl") + public Optional getDestinationUrl() { + return destinationUrl; + } + + /** + * @return When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled). + */ + @JsonProperty("disableFieldsMapFix") + public Optional getDisableFieldsMapFix() { + return disableFieldsMapFix; + } + + /** + * @return When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). + */ + @JsonProperty("disableSignout") + public Optional getDisableSignout() { + return disableSignout; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("fieldsMap") + public Optional> getFieldsMap() { + return fieldsMap; + } + + /** + * @return Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object. + */ + @JsonProperty("fieldsMapJsonRaw") + public Optional getFieldsMapJsonRaw() { + return fieldsMapJsonRaw; + } + + /** + * @return Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. + */ + @JsonProperty("global_token_revocation_jwt_iss") + public Optional getGlobalTokenRevocationJwtIss() { + return globalTokenRevocationJwtIss; + } + + /** + * @return Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. + */ + @JsonProperty("global_token_revocation_jwt_sub") + public Optional getGlobalTokenRevocationJwtSub() { + return globalTokenRevocationJwtSub; + } + + /** + * @return HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. + */ + @JsonProperty("metadataUrl") + public Optional getMetadataUrl() { + return metadataUrl; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("recipientUrl") + public Optional getRecipientUrl() { + return recipientUrl; + } + + /** + * @return Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template + */ + @JsonProperty("requestTemplate") + public Optional getRequestTemplate() { + return requestTemplate; + } + + /** + * @return Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. + */ + @JsonProperty("signOutEndpoint") + public Optional getSignOutEndpoint() { + return signOutEndpoint; + } + + /** + * @return Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2Options + && equalTo((EventStreamCloudEventConnectionCreatedObject2Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && debug.equals(other.debug) + && deflate.equals(other.deflate) + && destinationUrl.equals(other.destinationUrl) + && disableFieldsMapFix.equals(other.disableFieldsMapFix) + && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) + && fieldsMap.equals(other.fieldsMap) + && fieldsMapJsonRaw.equals(other.fieldsMapJsonRaw) + && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) + && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) + && metadataUrl.equals(other.metadataUrl) + && oidcMetadata.equals(other.oidcMetadata) + && recipientUrl.equals(other.recipientUrl) + && requestTemplate.equals(other.requestTemplate) + && signOutEndpoint.equals(other.signOutEndpoint) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.debug, + this.deflate, + this.destinationUrl, + this.disableFieldsMapFix, + this.disableSignout, + this.discoveryUrl, + this.fieldsMap, + this.fieldsMapJsonRaw, + this.globalTokenRevocationJwtIss, + this.globalTokenRevocationJwtSub, + this.metadataUrl, + this.oidcMetadata, + this.recipientUrl, + this.requestTemplate, + this.signOutEndpoint, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional + assertionDecryptionSettings = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional digestAlgorithm = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional protocolBinding = + Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional subject = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional debug = Optional.empty(); + + private Optional deflate = Optional.empty(); + + private Optional destinationUrl = Optional.empty(); + + private Optional disableFieldsMapFix = Optional.empty(); + + private Optional disableSignout = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional> fieldsMap = Optional.empty(); + + private Optional fieldsMapJsonRaw = Optional.empty(); + + private Optional globalTokenRevocationJwtIss = Optional.empty(); + + private Optional globalTokenRevocationJwtSub = Optional.empty(); + + private Optional metadataUrl = Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional recipientUrl = Optional.empty(); + + private Optional requestTemplate = Optional.empty(); + + private Optional signOutEndpoint = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject2Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + debug(other.getDebug()); + deflate(other.getDeflate()); + destinationUrl(other.getDestinationUrl()); + disableFieldsMapFix(other.getDisableFieldsMapFix()); + disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); + fieldsMap(other.getFieldsMap()); + fieldsMapJsonRaw(other.getFieldsMapJsonRaw()); + globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); + globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); + metadataUrl(other.getMetadataUrl()); + oidcMetadata(other.getOidcMetadata()); + recipientUrl(other.getRecipientUrl()); + requestTemplate(other.getRequestTemplate()); + signOutEndpoint(other.getSignOutEndpoint()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings( + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public Builder cert(Optional cert) { + this.cert = cert; + return this; + } + + public Builder cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public Builder digestAlgorithm( + Optional digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + public Builder digestAlgorithm( + EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public Builder expires(Optional expires) { + this.expires = expires; + return this; + } + + public Builder expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public Builder idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + public Builder idpinitiated(EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public Builder protocolBinding( + Optional protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + public Builder protocolBinding( + EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public Builder signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + public Builder signatureAlgorithm( + EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public Builder signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + public Builder signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public Builder signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + public Builder signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public Builder subject(Optional subject) { + this.subject = subject; + return this; + } + + public Builder subject(EventStreamCloudEventConnectionCreatedObject2OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes.

                                                              + */ + @JsonSetter(value = "debug", nulls = Nulls.SKIP) + public Builder debug(Optional debug) { + this.debug = debug; + return this; + } + + public Builder debug(Boolean debug) { + this.debug = Optional.ofNullable(debug); + return this; + } + + /** + *

                                                              When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding.

                                                              + */ + @JsonSetter(value = "deflate", nulls = Nulls.SKIP) + public Builder deflate(Optional deflate) { + this.deflate = deflate; + return this; + } + + public Builder deflate(Boolean deflate) { + this.deflate = Optional.ofNullable(deflate); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "destinationUrl", nulls = Nulls.SKIP) + public Builder destinationUrl(Optional destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + public Builder destinationUrl(String destinationUrl) { + this.destinationUrl = Optional.ofNullable(destinationUrl); + return this; + } + + /** + *

                                                              When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled).

                                                              + */ + @JsonSetter(value = "disableFieldsMapFix", nulls = Nulls.SKIP) + public Builder disableFieldsMapFix(Optional disableFieldsMapFix) { + this.disableFieldsMapFix = disableFieldsMapFix; + return this; + } + + public Builder disableFieldsMapFix(Boolean disableFieldsMapFix) { + this.disableFieldsMapFix = Optional.ofNullable(disableFieldsMapFix); + return this; + } + + /** + *

                                                              When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled).

                                                              + */ + @JsonSetter(value = "disableSignout", nulls = Nulls.SKIP) + public Builder disableSignout(Optional disableSignout) { + this.disableSignout = disableSignout; + return this; + } + + public Builder disableSignout(Boolean disableSignout) { + this.disableSignout = Optional.ofNullable(disableSignout); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access.

                                                              + */ + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) + public Builder fieldsMap(Optional> fieldsMap) { + this.fieldsMap = fieldsMap; + return this; + } + + public Builder fieldsMap(Map fieldsMap) { + this.fieldsMap = Optional.ofNullable(fieldsMap); + return this; + } + + /** + *

                                                              Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object.

                                                              + */ + @JsonSetter(value = "fieldsMapJsonRaw", nulls = Nulls.SKIP) + public Builder fieldsMapJsonRaw(Optional fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + return this; + } + + public Builder fieldsMapJsonRaw(String fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = Optional.ofNullable(fieldsMapJsonRaw); + return this; + } + + /** + *

                                                              Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_iss", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtIss(Optional globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + return this; + } + + public Builder globalTokenRevocationJwtIss(String globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = Optional.ofNullable(globalTokenRevocationJwtIss); + return this; + } + + /** + *

                                                              Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_sub", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtSub(Optional globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + return this; + } + + public Builder globalTokenRevocationJwtSub(String globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = Optional.ofNullable(globalTokenRevocationJwtSub); + return this; + } + + /** + *

                                                              HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both.

                                                              + */ + @JsonSetter(value = "metadataUrl", nulls = Nulls.SKIP) + public Builder metadataUrl(Optional metadataUrl) { + this.metadataUrl = metadataUrl; + return this; + } + + public Builder metadataUrl(String metadataUrl) { + this.metadataUrl = Optional.ofNullable(metadataUrl); + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata(EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) + public Builder recipientUrl(Optional recipientUrl) { + this.recipientUrl = recipientUrl; + return this; + } + + public Builder recipientUrl(String recipientUrl) { + this.recipientUrl = Optional.ofNullable(recipientUrl); + return this; + } + + /** + *

                                                              Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template

                                                              + */ + @JsonSetter(value = "requestTemplate", nulls = Nulls.SKIP) + public Builder requestTemplate(Optional requestTemplate) { + this.requestTemplate = requestTemplate; + return this; + } + + public Builder requestTemplate(String requestTemplate) { + this.requestTemplate = Optional.ofNullable(requestTemplate); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false.

                                                              + */ + @JsonSetter(value = "signOutEndpoint", nulls = Nulls.SKIP) + public Builder signOutEndpoint(Optional signOutEndpoint) { + this.signOutEndpoint = signOutEndpoint; + return this; + } + + public Builder signOutEndpoint(String signOutEndpoint) { + this.signOutEndpoint = Optional.ofNullable(signOutEndpoint); + return this; + } + + /** + *

                                                              Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject2Options build() { + return new EventStreamCloudEventConnectionCreatedObject2Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + debug, + deflate, + destinationUrl, + disableFieldsMapFix, + disableSignout, + discoveryUrl, + fieldsMap, + fieldsMapJsonRaw, + globalTokenRevocationJwtIss, + globalTokenRevocationJwtSub, + metadataUrl, + oidcMetadata, + recipientUrl, + requestTemplate, + signOutEndpoint, + userIdAttribute, + 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/EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..c395c276 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings.java @@ -0,0 +1,178 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

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

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..a7f0a4e1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionCreatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..f4da7da9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum.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 EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum valueOf(String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionCreatedObject2OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated.java new file mode 100644 index 00000000..57df241b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..5357af2f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,104 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum WSFED = + new EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum SAMLP = + new EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum OIDC = + new EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum(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 EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata.java new file mode 100644 index 00000000..e3e3c4b0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              A list of the Authentication Context Class References that this OP supports

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

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionCreatedObject2OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..0962ed0e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum.java @@ -0,0 +1,95 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum valueOf(String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionCreatedObject2OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..9bf9a47e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject2OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..6bfa770a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum(Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum valueOf(String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionCreatedObject2OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSubject.java new file mode 100644 index 00000000..ddeaa43a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2OptionsSubject.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject2OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject2OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject2OptionsSubject(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject2OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject2OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject2OptionsSubject build() { + return new EventStreamCloudEventConnectionCreatedObject2OptionsSubject(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/EventStreamCloudEventConnectionCreatedObject2StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2StrategyEnum.java new file mode 100644 index 00000000..77521ce7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject2StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject2StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject2StrategyEnum SAMLP = + new EventStreamCloudEventConnectionCreatedObject2StrategyEnum(Value.SAMLP, "samlp"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject2StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject2StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject2StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SAMLP: + return visitor.visitSamlp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject2StrategyEnum valueOf(String value) { + switch (value) { + case "samlp": + return SAMLP; + default: + return new EventStreamCloudEventConnectionCreatedObject2StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3.java new file mode 100644 index 00000000..f210377f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject3.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject3StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject3StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject3StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3 + && equalTo((EventStreamCloudEventConnectionCreatedObject3) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject3 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject3StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject3 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject3Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject3Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject3Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject3StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject3 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject3Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject3 build() { + return new EventStreamCloudEventConnectionCreatedObject3( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject3Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3Authentication.java new file mode 100644 index 00000000..dd1badd1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject3Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject3Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject3Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject3Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject3Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject3Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject3Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject3Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts.java new file mode 100644 index 00000000..4a878d0c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject3ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject3Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3Metadata.java new file mode 100644 index 00000000..2da97499 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject3Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject3Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject3Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject3Metadata(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/EventStreamCloudEventConnectionCreatedObject3Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3Options.java new file mode 100644 index 00000000..586cbb5a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3Options.java @@ -0,0 +1,979 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionCreatedObject3Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final String pingFederateBaseUrl; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + String pingFederateBaseUrl, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.pingFederateBaseUrl = pingFederateBaseUrl; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return URL provided by PingFederate which returns information used for creating the connection + */ + @JsonProperty("pingFederateBaseUrl") + public String getPingFederateBaseUrl() { + return pingFederateBaseUrl; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3Options + && equalTo((EventStreamCloudEventConnectionCreatedObject3Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject3Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && pingFederateBaseUrl.equals(other.pingFederateBaseUrl); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.pingFederateBaseUrl); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PingFederateBaseUrlStage builder() { + return new Builder(); + } + + public interface PingFederateBaseUrlStage { + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + */ + _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); + + Builder from(EventStreamCloudEventConnectionCreatedObject3Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject3Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings); + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + _FinalStage cert(Optional cert); + + _FinalStage cert(String cert); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + _FinalStage digestAlgorithm( + Optional digestAlgorithm); + + _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum digestAlgorithm); + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + _FinalStage entityId(Optional entityId); + + _FinalStage entityId(String entityId); + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + _FinalStage expires(Optional expires); + + _FinalStage expires(OffsetDateTime expires); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage idpinitiated( + Optional idpinitiated); + + _FinalStage idpinitiated(EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated idpinitiated); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage protocolBinding( + Optional protocolBinding); + + _FinalStage protocolBinding( + EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum protocolBinding); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum setUserRootAttributes); + + _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm); + + _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum signatureAlgorithm); + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + _FinalStage signInEndpoint(Optional signInEndpoint); + + _FinalStage signInEndpoint(String signInEndpoint); + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + _FinalStage signingCert(Optional signingCert); + + _FinalStage signingCert(String signingCert); + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + _FinalStage signSamlRequest(Optional signSamlRequest); + + _FinalStage signSamlRequest(Boolean signSamlRequest); + + _FinalStage subject(Optional subject); + + _FinalStage subject(EventStreamCloudEventConnectionCreatedObject3OptionsSubject subject); + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { + private String pingFederateBaseUrl; + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional subject = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional protocolBinding = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional digestAlgorithm = + Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional + assertionDecryptionSettings = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject3Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + pingFederateBaseUrl(other.getPingFederateBaseUrl()); + return this; + } + + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("pingFederateBaseUrl") + public _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl) { + this.pingFederateBaseUrl = + Objects.requireNonNull(pingFederateBaseUrl, "pingFederateBaseUrl must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

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

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

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

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

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

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

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

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

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

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

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

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

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

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

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

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

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

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public _FinalStage signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + @java.lang.Override + public _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + @java.lang.Override + public _FinalStage protocolBinding( + EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public _FinalStage protocolBinding( + Optional protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + @java.lang.Override + public _FinalStage idpinitiated(EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + @java.lang.Override + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public _FinalStage idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

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

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

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

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

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

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

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

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

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

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

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

                                                              Domain aliases for the connection

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

                                                              Domain aliases for the connection

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public _FinalStage digestAlgorithm( + Optional digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

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

                                                              Timestamp of the last certificate expiring soon notification.

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

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

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

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public _FinalStage cert(Optional cert) { + this.cert = cert; + return this; + } + + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject3Options build() { + return new EventStreamCloudEventConnectionCreatedObject3Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + pingFederateBaseUrl, + 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/EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..5fe45c80 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings.java @@ -0,0 +1,178 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

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

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..5da5b1ed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionCreatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..5b996059 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum.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 EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum valueOf(String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionCreatedObject3OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated.java new file mode 100644 index 00000000..52115e27 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..d703acb8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,104 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum WSFED = + new EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum SAMLP = + new EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum OIDC = + new EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum(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 EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionCreatedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..6bafef1f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum.java @@ -0,0 +1,95 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum valueOf(String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionCreatedObject3OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..20d39fe0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject3OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..c5d75533 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum(Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum valueOf(String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionCreatedObject3OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSubject.java new file mode 100644 index 00000000..779ca1af --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3OptionsSubject.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject3OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject3OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject3OptionsSubject(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject3OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject3OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject3OptionsSubject build() { + return new EventStreamCloudEventConnectionCreatedObject3OptionsSubject(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/EventStreamCloudEventConnectionCreatedObject3StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3StrategyEnum.java new file mode 100644 index 00000000..43e0dff2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject3StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject3StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject3StrategyEnum PINGFEDERATE = + new EventStreamCloudEventConnectionCreatedObject3StrategyEnum(Value.PINGFEDERATE, "pingfederate"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject3StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject3StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject3StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject3StrategyEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + default: + return new EventStreamCloudEventConnectionCreatedObject3StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4.java new file mode 100644 index 00000000..5a0fd7e3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject4.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject4 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject4StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject4( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject4StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject4StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject4 + && equalTo((EventStreamCloudEventConnectionCreatedObject4) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject4 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject4StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject4 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject4Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject4Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject4Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject4StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject4 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject4Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject4 build() { + return new EventStreamCloudEventConnectionCreatedObject4( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject4Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4Authentication.java new file mode 100644 index 00000000..2b72f6ed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject4Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject4Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject4Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject4Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject4Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject4Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject4Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject4Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject4Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject4Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject4Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts.java new file mode 100644 index 00000000..c808f8ab --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject4ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject4Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4Metadata.java new file mode 100644 index 00000000..4ea04e9b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject4Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject4Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject4Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject4Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject4Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject4Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject4Metadata(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/EventStreamCloudEventConnectionCreatedObject4Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4Options.java new file mode 100644 index 00000000..5dead2ee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4Options.java @@ -0,0 +1,564 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject4Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject4Options { + private final Optional adfsServer; + + private final Optional certRolloverNotification; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional fedMetadataXml; + + private final Optional iconUrl; + + private final Optional> nonPersistentAttrs; + + private final Optional> prevThumbprints; + + private final Optional + setUserRootAttributes; + + private final Optional + shouldTrustEmailVerifiedConnection; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject4Options( + Optional adfsServer, + Optional certRolloverNotification, + Optional> domainAliases, + Optional entityId, + Optional fedMetadataXml, + Optional iconUrl, + Optional> nonPersistentAttrs, + Optional> prevThumbprints, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional userIdAttribute, + Map additionalProperties) { + this.adfsServer = adfsServer; + this.certRolloverNotification = certRolloverNotification; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.fedMetadataXml = fedMetadataXml; + this.iconUrl = iconUrl; + this.nonPersistentAttrs = nonPersistentAttrs; + this.prevThumbprints = prevThumbprints; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + /** + * @return ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. + */ + @JsonProperty("adfs_server") + public Optional getAdfsServer() { + return adfsServer; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. + */ + @JsonProperty("fedMetadataXml") + public Optional getFedMetadataXml() { + return fedMetadataXml; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("prev_thumbprints") + public Optional> getPrevThumbprints() { + return prevThumbprints; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + /** + * @return Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject4Options + && equalTo((EventStreamCloudEventConnectionCreatedObject4Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject4Options other) { + return adfsServer.equals(other.adfsServer) + && certRolloverNotification.equals(other.certRolloverNotification) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && fedMetadataXml.equals(other.fedMetadataXml) + && iconUrl.equals(other.iconUrl) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && prevThumbprints.equals(other.prevThumbprints) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adfsServer, + this.certRolloverNotification, + this.domainAliases, + this.entityId, + this.fedMetadataXml, + this.iconUrl, + this.nonPersistentAttrs, + this.prevThumbprints, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional adfsServer = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional fedMetadataXml = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional> prevThumbprints = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject4Options other) { + adfsServer(other.getAdfsServer()); + certRolloverNotification(other.getCertRolloverNotification()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + fedMetadataXml(other.getFedMetadataXml()); + iconUrl(other.getIconUrl()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + prevThumbprints(other.getPrevThumbprints()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + /** + *

                                                              ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent.

                                                              + */ + @JsonSetter(value = "adfs_server", nulls = Nulls.SKIP) + public Builder adfsServer(Optional adfsServer) { + this.adfsServer = adfsServer; + return this; + } + + public Builder adfsServer(String adfsServer) { + this.adfsServer = Optional.ofNullable(adfsServer); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'.

                                                              + */ + @JsonSetter(value = "fedMetadataXml", nulls = Nulls.SKIP) + public Builder fedMetadataXml(Optional fedMetadataXml) { + this.fedMetadataXml = fedMetadataXml; + return this; + } + + public Builder fedMetadataXml(String fedMetadataXml) { + this.fedMetadataXml = Optional.ofNullable(fedMetadataXml); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "prev_thumbprints", nulls = Nulls.SKIP) + public Builder prevThumbprints(Optional> prevThumbprints) { + this.prevThumbprints = prevThumbprints; + return this; + } + + public Builder prevThumbprints(List prevThumbprints) { + this.prevThumbprints = Optional.ofNullable(prevThumbprints); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public Builder shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + public Builder shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + /** + *

                                                              Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject4Options build() { + return new EventStreamCloudEventConnectionCreatedObject4Options( + adfsServer, + certRolloverNotification, + domainAliases, + entityId, + fedMetadataXml, + iconUrl, + nonPersistentAttrs, + prevThumbprints, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + userIdAttribute, + 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/EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..ccb21afe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject4OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..d44f2a0c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum valueOf( + String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionCreatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4StrategyEnum.java new file mode 100644 index 00000000..5fb4a75c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject4StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject4StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject4StrategyEnum ADFS = + new EventStreamCloudEventConnectionCreatedObject4StrategyEnum(Value.ADFS, "adfs"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject4StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject4StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject4StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADFS: + return visitor.visitAdfs(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject4StrategyEnum valueOf(String value) { + switch (value) { + case "adfs": + return ADFS; + default: + return new EventStreamCloudEventConnectionCreatedObject4StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADFS, + + UNKNOWN + } + + public interface Visitor { + T visitAdfs(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5.java new file mode 100644 index 00000000..e1e0fa31 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5.java @@ -0,0 +1,513 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject5.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject5 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final EventStreamCloudEventConnectionCreatedObject5StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject5( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + EventStreamCloudEventConnectionCreatedObject5StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject5StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject5 + && equalTo((EventStreamCloudEventConnectionCreatedObject5) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject5 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject5StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject5 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject5Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject5Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject5Options options); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject5StrategyEnum strategy; + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject5 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject5StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedObject5Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject5Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject5 build() { + return new EventStreamCloudEventConnectionCreatedObject5( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject5Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5Authentication.java new file mode 100644 index 00000000..cbf22b68 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject5Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject5Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject5Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject5Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject5Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject5Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject5Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject5Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject5Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject5Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject5Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts.java new file mode 100644 index 00000000..f92318f2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject5ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject5Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5Metadata.java new file mode 100644 index 00000000..01ddbe4b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject5Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject5Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject5Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject5Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject5Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject5Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject5Metadata(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/EventStreamCloudEventConnectionCreatedObject5Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5Options.java new file mode 100644 index 00000000..b2884bf1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5Options.java @@ -0,0 +1,689 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject5Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject5Options { + private final Optional agentIp; + + private final Optional agentMode; + + private final Optional agentVersion; + + private final Optional bruteForceProtection; + + private final Optional certAuth; + + private final Optional> certs; + + private final Optional disableCache; + + private final Optional disableSelfServiceChangePassword; + + private final Optional> domainAliases; + + private final Optional iconUrl; + + private final Optional> ips; + + private final Optional kerberos; + + private final Optional kerberosOnly; + + private final Optional> nonPersistentAttrs; + + private final Optional + setUserRootAttributes; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject5Options( + Optional agentIp, + Optional agentMode, + Optional agentVersion, + Optional bruteForceProtection, + Optional certAuth, + Optional> certs, + Optional disableCache, + Optional disableSelfServiceChangePassword, + Optional> domainAliases, + Optional iconUrl, + Optional> ips, + Optional kerberos, + Optional kerberosOnly, + Optional> nonPersistentAttrs, + Optional + setUserRootAttributes, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Map additionalProperties) { + this.agentIp = agentIp; + this.agentMode = agentMode; + this.agentVersion = agentVersion; + this.bruteForceProtection = bruteForceProtection; + this.certAuth = certAuth; + this.certs = certs; + this.disableCache = disableCache; + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + this.domainAliases = domainAliases; + this.iconUrl = iconUrl; + this.ips = ips; + this.kerberos = kerberos; + this.kerberosOnly = kerberosOnly; + this.nonPersistentAttrs = nonPersistentAttrs; + this.setUserRootAttributes = setUserRootAttributes; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ + @JsonProperty("agentIP") + public Optional getAgentIp() { + return agentIp; + } + + /** + * @return When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ + @JsonProperty("agentMode") + public Optional getAgentMode() { + return agentMode; + } + + /** + * @return Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ + @JsonProperty("agentVersion") + public Optional getAgentVersion() { + return agentVersion; + } + + /** + * @return Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. + */ + @JsonProperty("brute_force_protection") + public Optional getBruteForceProtection() { + return bruteForceProtection; + } + + /** + * @return Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint + */ + @JsonProperty("certAuth") + public Optional getCertAuth() { + return certAuth; + } + + /** + * @return Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ + @JsonProperty("certs") + public Optional> getCerts() { + return certs; + } + + /** + * @return When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory + */ + @JsonProperty("disable_cache") + public Optional getDisableCache() { + return disableCache; + } + + /** + * @return When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets + */ + @JsonProperty("disable_self_service_change_password") + public Optional getDisableSelfServiceChangePassword() { + return disableSelfServiceChangePassword; + } + + /** + * @return List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ + @JsonProperty("ips") + public Optional> getIps() { + return ips; + } + + /** + * @return Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges + */ + @JsonProperty("kerberos") + public Optional getKerberos() { + return kerberos; + } + + /** + * @return When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback. + */ + @JsonProperty("kerberos_only") + public Optional getKerberosOnly() { + return kerberosOnly; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Primary AD domain hint used for HRD and discovery. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject5Options + && equalTo((EventStreamCloudEventConnectionCreatedObject5Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject5Options other) { + return agentIp.equals(other.agentIp) + && agentMode.equals(other.agentMode) + && agentVersion.equals(other.agentVersion) + && bruteForceProtection.equals(other.bruteForceProtection) + && certAuth.equals(other.certAuth) + && certs.equals(other.certs) + && disableCache.equals(other.disableCache) + && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) + && domainAliases.equals(other.domainAliases) + && iconUrl.equals(other.iconUrl) + && ips.equals(other.ips) + && kerberos.equals(other.kerberos) + && kerberosOnly.equals(other.kerberosOnly) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentIp, + this.agentMode, + this.agentVersion, + this.bruteForceProtection, + this.certAuth, + this.certs, + this.disableCache, + this.disableSelfServiceChangePassword, + this.domainAliases, + this.iconUrl, + this.ips, + this.kerberos, + this.kerberosOnly, + this.nonPersistentAttrs, + this.setUserRootAttributes, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional agentIp = Optional.empty(); + + private Optional agentMode = Optional.empty(); + + private Optional agentVersion = Optional.empty(); + + private Optional bruteForceProtection = Optional.empty(); + + private Optional certAuth = Optional.empty(); + + private Optional> certs = Optional.empty(); + + private Optional disableCache = Optional.empty(); + + private Optional disableSelfServiceChangePassword = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> ips = Optional.empty(); + + private Optional kerberos = Optional.empty(); + + private Optional kerberosOnly = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject5Options other) { + agentIp(other.getAgentIp()); + agentMode(other.getAgentMode()); + agentVersion(other.getAgentVersion()); + bruteForceProtection(other.getBruteForceProtection()); + certAuth(other.getCertAuth()); + certs(other.getCerts()); + disableCache(other.getDisableCache()); + disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); + domainAliases(other.getDomainAliases()); + iconUrl(other.getIconUrl()); + ips(other.getIps()); + kerberos(other.getKerberos()); + kerberosOnly(other.getKerberosOnly()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentIP", nulls = Nulls.SKIP) + public Builder agentIp(Optional agentIp) { + this.agentIp = agentIp; + return this; + } + + public Builder agentIp(String agentIp) { + this.agentIp = Optional.ofNullable(agentIp); + return this; + } + + /** + *

                                                              When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentMode", nulls = Nulls.SKIP) + public Builder agentMode(Optional agentMode) { + this.agentMode = agentMode; + return this; + } + + public Builder agentMode(Boolean agentMode) { + this.agentMode = Optional.ofNullable(agentMode); + return this; + } + + /** + *

                                                              Version identifier of the installed AD connector agent software (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentVersion", nulls = Nulls.SKIP) + public Builder agentVersion(Optional agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + public Builder agentVersion(String agentVersion) { + this.agentVersion = Optional.ofNullable(agentVersion); + return this; + } + + /** + *

                                                              Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.

                                                              + */ + @JsonSetter(value = "brute_force_protection", nulls = Nulls.SKIP) + public Builder bruteForceProtection(Optional bruteForceProtection) { + this.bruteForceProtection = bruteForceProtection; + return this; + } + + public Builder bruteForceProtection(Boolean bruteForceProtection) { + this.bruteForceProtection = Optional.ofNullable(bruteForceProtection); + return this; + } + + /** + *

                                                              Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint

                                                              + */ + @JsonSetter(value = "certAuth", nulls = Nulls.SKIP) + public Builder certAuth(Optional certAuth) { + this.certAuth = certAuth; + return this; + } + + public Builder certAuth(Boolean certAuth) { + this.certAuth = Optional.ofNullable(certAuth); + return this; + } + + /** + *

                                                              Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "certs", nulls = Nulls.SKIP) + public Builder certs(Optional> certs) { + this.certs = certs; + return this; + } + + public Builder certs(List certs) { + this.certs = Optional.ofNullable(certs); + return this; + } + + /** + *

                                                              When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory

                                                              + */ + @JsonSetter(value = "disable_cache", nulls = Nulls.SKIP) + public Builder disableCache(Optional disableCache) { + this.disableCache = disableCache; + return this; + } + + public Builder disableCache(Boolean disableCache) { + this.disableCache = Optional.ofNullable(disableCache); + return this; + } + + /** + *

                                                              When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets

                                                              + */ + @JsonSetter(value = "disable_self_service_change_password", nulls = Nulls.SKIP) + public Builder disableSelfServiceChangePassword(Optional disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + return this; + } + + public Builder disableSelfServiceChangePassword(Boolean disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = Optional.ofNullable(disableSelfServiceChangePassword); + return this; + } + + /** + *

                                                              List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.

                                                              + */ + @JsonSetter(value = "ips", nulls = Nulls.SKIP) + public Builder ips(Optional> ips) { + this.ips = ips; + return this; + } + + public Builder ips(List ips) { + this.ips = Optional.ofNullable(ips); + return this; + } + + /** + *

                                                              Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges

                                                              + */ + @JsonSetter(value = "kerberos", nulls = Nulls.SKIP) + public Builder kerberos(Optional kerberos) { + this.kerberos = kerberos; + return this; + } + + public Builder kerberos(Boolean kerberos) { + this.kerberos = Optional.ofNullable(kerberos); + return this; + } + + /** + *

                                                              When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback.

                                                              + */ + @JsonSetter(value = "kerberos_only", nulls = Nulls.SKIP) + public Builder kerberosOnly(Optional kerberosOnly) { + this.kerberosOnly = kerberosOnly; + return this; + } + + public Builder kerberosOnly(Boolean kerberosOnly) { + this.kerberosOnly = Optional.ofNullable(kerberosOnly); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + /** + *

                                                              The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Primary AD domain hint used for HRD and discovery.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + public EventStreamCloudEventConnectionCreatedObject5Options build() { + return new EventStreamCloudEventConnectionCreatedObject5Options( + agentIp, + agentMode, + agentVersion, + bruteForceProtection, + certAuth, + certs, + disableCache, + disableSelfServiceChangePassword, + domainAliases, + iconUrl, + ips, + kerberos, + kerberosOnly, + nonPersistentAttrs, + setUserRootAttributes, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + 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/EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..0a89c126 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5StrategyEnum.java new file mode 100644 index 00000000..caacd5cf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject5StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject5StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject5StrategyEnum AD = + new EventStreamCloudEventConnectionCreatedObject5StrategyEnum(Value.AD, "ad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject5StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject5StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject5StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject5StrategyEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + default: + return new EventStreamCloudEventConnectionCreatedObject5StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6.java new file mode 100644 index 00000000..cd6b1229 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject6.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject6 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject6StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject6( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject6StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject6StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject6 + && equalTo((EventStreamCloudEventConnectionCreatedObject6) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject6 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject6StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject6 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject6Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject6Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject6Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject6StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject6 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject6Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject6 build() { + return new EventStreamCloudEventConnectionCreatedObject6( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject6Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6Authentication.java new file mode 100644 index 00000000..d3dc3e4a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject6Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject6Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject6Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject6Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject6Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject6Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject6Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject6Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject6Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject6Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject6Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts.java new file mode 100644 index 00000000..af4973bc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject6ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject6Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6Metadata.java new file mode 100644 index 00000000..2938537c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject6Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject6Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject6Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject6Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject6Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject6Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject6Metadata(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/EventStreamCloudEventConnectionCreatedObject6Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6Options.java new file mode 100644 index 00000000..cd96c3b4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6Options.java @@ -0,0 +1,1111 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionCreatedObject6Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject6Options { + private final Optional adminAccessTokenExpiresin; + + private final Optional allowSettingLoginScopes; + + private final Optional apiEnableGroups; + + private final Optional apiEnableUsers; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional email; + + private final Optional extAgreedTerms; + + private final Optional extGroups; + + private final Optional extGroupsExtended; + + private final Optional extIsAdmin; + + private final Optional extIsSuspended; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional handleLoginFromSocial; + + private final Optional iconUrl; + + private final Optional mapUserIdToId; + + private final Optional> nonPersistentAttrs; + + private final Optional profile; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject6Options( + Optional adminAccessTokenExpiresin, + Optional allowSettingLoginScopes, + Optional apiEnableGroups, + Optional apiEnableUsers, + String clientId, + Optional domain, + Optional> domainAliases, + Optional email, + Optional extAgreedTerms, + Optional extGroups, + Optional extGroupsExtended, + Optional extIsAdmin, + Optional extIsSuspended, + Optional + federatedConnectionsAccessTokens, + Optional handleLoginFromSocial, + Optional iconUrl, + Optional mapUserIdToId, + Optional> nonPersistentAttrs, + Optional profile, + Optional> scope, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional> upstreamParams, + Map additionalProperties) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; + this.apiEnableUsers = apiEnableUsers; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.email = email; + this.extAgreedTerms = extAgreedTerms; + this.extGroups = extGroups; + this.extGroupsExtended = extGroupsExtended; + this.extIsAdmin = extIsAdmin; + this.extIsSuspended = extIsSuspended; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.handleLoginFromSocial = handleLoginFromSocial; + this.iconUrl = iconUrl; + this.mapUserIdToId = mapUserIdToId; + this.nonPersistentAttrs = nonPersistentAttrs; + this.profile = profile; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. + */ + @JsonProperty("admin_access_token_expiresin") + public Optional getAdminAccessTokenExpiresin() { + return adminAccessTokenExpiresin; + } + + /** + * @return When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. + */ + @JsonProperty("allow_setting_login_scopes") + public Optional getAllowSettingLoginScopes() { + return allowSettingLoginScopes; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false. + */ + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Primary Google Workspace domain name that users must belong to. + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return Whether the OAuth flow requests the email scope. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Fetches the agreedToTerms flag from the Google Directory profile. + */ + @JsonProperty("ext_agreed_terms") + public Optional getExtAgreedTerms() { + return extAgreedTerms; + } + + /** + * @return Enables enrichment with Google group memberships (required for ext_groups_extended). + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true. + */ + @JsonProperty("ext_groups_extended") + public Optional getExtGroupsExtended() { + return extGroupsExtended; + } + + /** + * @return Fetches the Google Directory admin flag for the signing-in user. + */ + @JsonProperty("ext_is_admin") + public Optional getExtIsAdmin() { + return extIsAdmin; + } + + /** + * @return Fetches the Google Directory suspended flag for the signing-in user. + */ + @JsonProperty("ext_is_suspended") + public Optional getExtIsSuspended() { + return extIsSuspended; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. + */ + @JsonProperty("handle_login_from_social") + public Optional getHandleLoginFromSocial() { + return handleLoginFromSocial; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. + */ + @JsonProperty("map_user_id_to_id") + public Optional getMapUserIdToId() { + return mapUserIdToId; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Whether the OAuth flow requests the profile scope. + */ + @JsonProperty("profile") + public Optional getProfile() { + return profile; + } + + /** + * @return Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The Google Workspace primary domain used to identify the organization during authentication. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject6Options + && equalTo((EventStreamCloudEventConnectionCreatedObject6Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject6Options other) { + return adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) + && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) + && apiEnableUsers.equals(other.apiEnableUsers) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && email.equals(other.email) + && extAgreedTerms.equals(other.extAgreedTerms) + && extGroups.equals(other.extGroups) + && extGroupsExtended.equals(other.extGroupsExtended) + && extIsAdmin.equals(other.extIsAdmin) + && extIsSuspended.equals(other.extIsSuspended) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && handleLoginFromSocial.equals(other.handleLoginFromSocial) + && iconUrl.equals(other.iconUrl) + && mapUserIdToId.equals(other.mapUserIdToId) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && profile.equals(other.profile) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adminAccessTokenExpiresin, + this.allowSettingLoginScopes, + this.apiEnableGroups, + this.apiEnableUsers, + this.clientId, + this.domain, + this.domainAliases, + this.email, + this.extAgreedTerms, + this.extGroups, + this.extGroupsExtended, + this.extIsAdmin, + this.extIsSuspended, + this.federatedConnectionsAccessTokens, + this.handleLoginFromSocial, + this.iconUrl, + this.mapUserIdToId, + this.nonPersistentAttrs, + this.profile, + this.scope, + this.setUserRootAttributes, + this.tenantDomain, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedObject6Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject6Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); + + _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); + + /** + *

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

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

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

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

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

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

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              Whether the OAuth flow requests the email scope.

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

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

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

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

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

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

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

                                                              Fetches the Google Directory admin flag for the signing-in user.

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

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + _FinalStage extIsSuspended(Optional extIsSuspended); + + _FinalStage extIsSuspended(Boolean extIsSuspended); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

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

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

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

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional> upstreamParams = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional mapUserIdToId = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional handleLoginFromSocial = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extIsSuspended = Optional.empty(); + + private Optional extIsAdmin = Optional.empty(); + + private Optional extGroupsExtended = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional extAgreedTerms = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + private Optional apiEnableGroups = Optional.empty(); + + private Optional allowSettingLoginScopes = Optional.empty(); + + private Optional adminAccessTokenExpiresin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject6Options other) { + adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); + allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); + apiEnableUsers(other.getApiEnableUsers()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + email(other.getEmail()); + extAgreedTerms(other.getExtAgreedTerms()); + extGroups(other.getExtGroups()); + extGroupsExtended(other.getExtGroupsExtended()); + extIsAdmin(other.getExtIsAdmin()); + extIsSuspended(other.getExtIsSuspended()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + handleLoginFromSocial(other.getHandleLoginFromSocial()); + iconUrl(other.getIconUrl()); + mapUserIdToId(other.getMapUserIdToId()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + profile(other.getProfile()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

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

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

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

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

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

                                                              Whether the OAuth flow requests the profile scope.

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

                                                              Whether the OAuth flow requests the profile scope.

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

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

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

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

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

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

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

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

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

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

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "handle_login_from_social", nulls = Nulls.SKIP) + public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial) { + this.handleLoginFromSocial = handleLoginFromSocial; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

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

                                                              Fetches the Google Directory suspended flag for the signing-in user.

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

                                                              Fetches the Google Directory admin flag for the signing-in user.

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

                                                              Fetches the Google Directory admin flag for the signing-in user.

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

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

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

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

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

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

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

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

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

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

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

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

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

                                                              Whether the OAuth flow requests the email scope.

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

                                                              Whether the OAuth flow requests the email scope.

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

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

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

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

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

                                                              Primary Google Workspace domain name that users must belong to.

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

                                                              Primary Google Workspace domain name that users must belong to.

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

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

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

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

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

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

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

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

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

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

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

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

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

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

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

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "admin_access_token_expiresin", nulls = Nulls.SKIP) + public _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject6Options build() { + return new EventStreamCloudEventConnectionCreatedObject6Options( + adminAccessTokenExpiresin, + allowSettingLoginScopes, + apiEnableGroups, + apiEnableUsers, + clientId, + domain, + domainAliases, + email, + extAgreedTerms, + extGroups, + extGroupsExtended, + extIsAdmin, + extIsSuspended, + federatedConnectionsAccessTokens, + handleLoginFromSocial, + iconUrl, + mapUserIdToId, + nonPersistentAttrs, + profile, + scope, + setUserRootAttributes, + tenantDomain, + upstreamParams, + 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/EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..7b8a211f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

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

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedObject6OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..d02b3cf9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject6OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6StrategyEnum.java new file mode 100644 index 00000000..e9338cfc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject6StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject6StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject6StrategyEnum GOOGLE_APPS = + new EventStreamCloudEventConnectionCreatedObject6StrategyEnum(Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject6StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject6StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject6StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject6StrategyEnum valueOf(String value) { + switch (value) { + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventConnectionCreatedObject6StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GOOGLE_APPS, + + UNKNOWN + } + + public interface Visitor { + T visitGoogleApps(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7.java new file mode 100644 index 00000000..45aa19f5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedObject7.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject7 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedObject7StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject7( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedObject7StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedObject7StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject7 + && equalTo((EventStreamCloudEventConnectionCreatedObject7) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject7 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedObject7StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject7 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject7Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedObject7Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedObject7Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedObject7StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject7 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionCreatedObject7Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject7 build() { + return new EventStreamCloudEventConnectionCreatedObject7( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedObject7Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7Authentication.java new file mode 100644 index 00000000..06ff9588 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject7Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject7Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject7Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject7Authentication + && equalTo((EventStreamCloudEventConnectionCreatedObject7Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject7Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject7Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject7Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject7Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject7Authentication build() { + return new EventStreamCloudEventConnectionCreatedObject7Authentication(active, 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/EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts.java new file mode 100644 index 00000000..fc578503 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedObject7ConnectedAccounts(active, 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/EventStreamCloudEventConnectionCreatedObject7Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7Metadata.java new file mode 100644 index 00000000..ee65b811 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedObject7Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject7Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject7Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject7Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedObject7Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedObject7Metadata build() { + return new EventStreamCloudEventConnectionCreatedObject7Metadata(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/EventStreamCloudEventConnectionCreatedObject7Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7Options.java new file mode 100644 index 00000000..24c2ecd3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7Options.java @@ -0,0 +1,1296 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionCreatedObject7Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject7Options { + private final Optional apiEnableUsers; + + private final Optional appDomain; + + private final Optional appId; + + private final Optional basicProfile; + + private final Optional certRolloverNotification; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional extGroups; + + private final Optional extNestedGroups; + + private final Optional extProfile; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional granted; + + private final Optional iconUrl; + + private final Optional identityApi; + + private final Optional maxGroupsToRetrieve; + + private final Optional> nonPersistentAttrs; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional + shouldTrustEmailVerifiedConnection; + + private final Optional tenantDomain; + + private final Optional tenantId; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional useWsfed; + + private final Optional useCommonEndpoint; + + private final Optional useridAttribute; + + private final Optional waadProtocol; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject7Options( + Optional apiEnableUsers, + Optional appDomain, + Optional appId, + Optional basicProfile, + Optional certRolloverNotification, + String clientId, + Optional domain, + Optional> domainAliases, + Optional extGroups, + Optional extNestedGroups, + Optional extProfile, + Optional + federatedConnectionsAccessTokens, + Optional granted, + Optional iconUrl, + Optional identityApi, + Optional maxGroupsToRetrieve, + Optional> nonPersistentAttrs, + Optional> scope, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional tenantDomain, + Optional tenantId, + Optional> thumbprints, + Optional> upstreamParams, + Optional useWsfed, + Optional useCommonEndpoint, + Optional useridAttribute, + Optional waadProtocol, + Map additionalProperties) { + this.apiEnableUsers = apiEnableUsers; + this.appDomain = appDomain; + this.appId = appId; + this.basicProfile = basicProfile; + this.certRolloverNotification = certRolloverNotification; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.extGroups = extGroups; + this.extNestedGroups = extNestedGroups; + this.extProfile = extProfile; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.granted = granted; + this.iconUrl = iconUrl; + this.identityApi = identityApi; + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + this.nonPersistentAttrs = nonPersistentAttrs; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.tenantDomain = tenantDomain; + this.tenantId = tenantId; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.useWsfed = useWsfed; + this.useCommonEndpoint = useCommonEndpoint; + this.useridAttribute = useridAttribute; + this.waadProtocol = waadProtocol; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enable users API + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. + */ + @JsonProperty("app_domain") + public Optional getAppDomain() { + return appDomain; + } + + /** + * @return The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests. + */ + @JsonProperty("app_id") + public Optional getAppId() { + return appId; + } + + /** + * @return Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication. + */ + @JsonProperty("basic_profile") + public Optional getBasicProfile() { + return basicProfile; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com'). + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve. + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included. + */ + @JsonProperty("ext_nested_groups") + public Optional getExtNestedGroups() { + return extNestedGroups; + } + + /** + * @return When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2. + */ + @JsonProperty("ext_profile") + public Optional getExtProfile() { + return extProfile; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. + */ + @JsonProperty("granted") + public Optional getGranted() { + return granted; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("identity_api") + public Optional getIdentityApi() { + return identityApi; + } + + /** + * @return Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default. + */ + @JsonProperty("max_groups_to_retrieve") + public Optional getMaxGroupsToRetrieve() { + return maxGroupsToRetrieve; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. + */ + @JsonProperty("tenantId") + public Optional getTenantId() { + return tenantId; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. + */ + @JsonProperty("use_wsfed") + public Optional getUseWsfed() { + return useWsfed; + } + + /** + * @return When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false. + */ + @JsonProperty("useCommonEndpoint") + public Optional getUseCommonEndpoint() { + return useCommonEndpoint; + } + + @JsonProperty("userid_attribute") + public Optional getUseridAttribute() { + return useridAttribute; + } + + @JsonProperty("waad_protocol") + public Optional getWaadProtocol() { + return waadProtocol; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject7Options + && equalTo((EventStreamCloudEventConnectionCreatedObject7Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedObject7Options other) { + return apiEnableUsers.equals(other.apiEnableUsers) + && appDomain.equals(other.appDomain) + && appId.equals(other.appId) + && basicProfile.equals(other.basicProfile) + && certRolloverNotification.equals(other.certRolloverNotification) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && extGroups.equals(other.extGroups) + && extNestedGroups.equals(other.extNestedGroups) + && extProfile.equals(other.extProfile) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && granted.equals(other.granted) + && iconUrl.equals(other.iconUrl) + && identityApi.equals(other.identityApi) + && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && tenantDomain.equals(other.tenantDomain) + && tenantId.equals(other.tenantId) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && useWsfed.equals(other.useWsfed) + && useCommonEndpoint.equals(other.useCommonEndpoint) + && useridAttribute.equals(other.useridAttribute) + && waadProtocol.equals(other.waadProtocol); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.apiEnableUsers, + this.appDomain, + this.appId, + this.basicProfile, + this.certRolloverNotification, + this.clientId, + this.domain, + this.domainAliases, + this.extGroups, + this.extNestedGroups, + this.extProfile, + this.federatedConnectionsAccessTokens, + this.granted, + this.iconUrl, + this.identityApi, + this.maxGroupsToRetrieve, + this.nonPersistentAttrs, + this.scope, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.tenantDomain, + this.tenantId, + this.thumbprints, + this.upstreamParams, + this.useWsfed, + this.useCommonEndpoint, + this.useridAttribute, + this.waadProtocol); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedObject7Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedObject7Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Enable users API

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

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + _FinalStage appDomain(Optional appDomain); + + _FinalStage appDomain(String appDomain); + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + _FinalStage appId(Optional appId); + + _FinalStage appId(String appId); + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

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

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

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

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

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

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + _FinalStage extProfile(Optional extProfile); + + _FinalStage extProfile(Boolean extProfile); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

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

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage identityApi( + Optional identityApi); + + _FinalStage identityApi(EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum identityApi); + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve); + + _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum setUserRootAttributes); + + _FinalStage shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection); + + _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection); + + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + _FinalStage tenantId(Optional tenantId); + + _FinalStage tenantId(String tenantId); + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

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

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + _FinalStage useCommonEndpoint(Optional useCommonEndpoint); + + _FinalStage useCommonEndpoint(Boolean useCommonEndpoint); + + _FinalStage useridAttribute( + Optional useridAttribute); + + _FinalStage useridAttribute( + EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum useridAttribute); + + _FinalStage waadProtocol( + Optional waadProtocol); + + _FinalStage waadProtocol(EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum waadProtocol); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional waadProtocol = + Optional.empty(); + + private Optional useridAttribute = + Optional.empty(); + + private Optional useCommonEndpoint = Optional.empty(); + + private Optional useWsfed = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantId = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional maxGroupsToRetrieve = Optional.empty(); + + private Optional identityApi = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional granted = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extProfile = Optional.empty(); + + private Optional extNestedGroups = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional basicProfile = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional appDomain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedObject7Options other) { + apiEnableUsers(other.getApiEnableUsers()); + appDomain(other.getAppDomain()); + appId(other.getAppId()); + basicProfile(other.getBasicProfile()); + certRolloverNotification(other.getCertRolloverNotification()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + extGroups(other.getExtGroups()); + extNestedGroups(other.getExtNestedGroups()); + extProfile(other.getExtProfile()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + granted(other.getGranted()); + iconUrl(other.getIconUrl()); + identityApi(other.getIdentityApi()); + maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + tenantDomain(other.getTenantDomain()); + tenantId(other.getTenantId()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + useWsfed(other.getUseWsfed()); + useCommonEndpoint(other.getUseCommonEndpoint()); + useridAttribute(other.getUseridAttribute()); + waadProtocol(other.getWaadProtocol()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage waadProtocol( + EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum waadProtocol) { + this.waadProtocol = Optional.ofNullable(waadProtocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) + public _FinalStage waadProtocol( + Optional waadProtocol) { + this.waadProtocol = waadProtocol; + return this; + } + + @java.lang.Override + public _FinalStage useridAttribute( + EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum useridAttribute) { + this.useridAttribute = Optional.ofNullable(useridAttribute); + return this; + } + + @java.lang.Override + @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) + public _FinalStage useridAttribute( + Optional useridAttribute) { + this.useridAttribute = useridAttribute; + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

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

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

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

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

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

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) + public _FinalStage useWsfed(Optional useWsfed) { + this.useWsfed = useWsfed; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

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

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

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

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

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

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) + public _FinalStage tenantId(Optional tenantId) { + this.tenantId = tenantId; + return this; + } + + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public _FinalStage shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

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

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

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

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) + public _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + return this; + } + + @java.lang.Override + public _FinalStage identityApi( + EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum identityApi) { + this.identityApi = Optional.ofNullable(identityApi); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_api", nulls = Nulls.SKIP) + public _FinalStage identityApi( + Optional identityApi) { + this.identityApi = identityApi; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

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

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

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

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

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

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

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

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

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

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

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

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

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

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

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

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

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

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

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

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

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

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

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

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

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

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

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

                                                              Timestamp of the last certificate expiring soon notification.

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

                                                              Timestamp of the last certificate expiring soon notification.

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

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

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

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

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

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

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

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

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

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

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

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

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

                                                              Enable users API

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

                                                              Enable users API

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject7Options build() { + return new EventStreamCloudEventConnectionCreatedObject7Options( + apiEnableUsers, + appDomain, + appId, + basicProfile, + certRolloverNotification, + clientId, + domain, + domainAliases, + extGroups, + extNestedGroups, + extProfile, + federatedConnectionsAccessTokens, + granted, + iconUrl, + identityApi, + maxGroupsToRetrieve, + nonPersistentAttrs, + scope, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + tenantDomain, + tenantId, + thumbprints, + upstreamParams, + useWsfed, + useCommonEndpoint, + useridAttribute, + waadProtocol, + 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/EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..d013f622 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

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

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedObject7OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum.java new file mode 100644 index 00000000..9ff5ee86 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum.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 EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum { + public static final EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum AZURE_ACTIVE_DIRECTORY_V10 = + new EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum( + Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); + + public static final EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum + MICROSOFT_IDENTITY_PLATFORM_V20 = new EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum( + Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum(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 EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AZURE_ACTIVE_DIRECTORY_V10: + return visitor.visitAzureActiveDirectoryV10(); + case MICROSOFT_IDENTITY_PLATFORM_V20: + return visitor.visitMicrosoftIdentityPlatformV20(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum valueOf(String value) { + switch (value) { + case "azure-active-directory-v1.0": + return AZURE_ACTIVE_DIRECTORY_V10; + case "microsoft-identity-platform-v2.0": + return MICROSOFT_IDENTITY_PLATFORM_V20; + default: + return new EventStreamCloudEventConnectionCreatedObject7OptionsIdentityApiEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + MICROSOFT_IDENTITY_PLATFORM_V20, + + AZURE_ACTIVE_DIRECTORY_V10, + + UNKNOWN + } + + public interface Visitor { + T visitMicrosoftIdentityPlatformV20(); + + T visitAzureActiveDirectoryV10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..4fc07b8e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedObject7OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..d360605e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum valueOf( + String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionCreatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum.java new file mode 100644 index 00000000..54ca576e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum.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 EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum { + public static final EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum SUB = + new EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum(Value.SUB, "sub"); + + public static final EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum OID = + new EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum(Value.OID, "oid"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum(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 EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUB: + return visitor.visitSub(); + case OID: + return visitor.visitOid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum valueOf(String value) { + switch (value) { + case "sub": + return SUB; + case "oid": + return OID; + default: + return new EventStreamCloudEventConnectionCreatedObject7OptionsUseridAttributeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OID, + + SUB, + + UNKNOWN + } + + public interface Visitor { + T visitOid(); + + T visitSub(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum.java new file mode 100644 index 00000000..1da1e1b0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum.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 EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum { + public static final EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum OPENID_CONNECT = + new EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum( + Value.OPENID_CONNECT, "openid-connect"); + + public static final EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum WS_FEDERATION = + new EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum( + Value.WS_FEDERATION, "ws-federation"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum(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 EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID_CONNECT: + return visitor.visitOpenidConnect(); + case WS_FEDERATION: + return visitor.visitWsFederation(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum valueOf(String value) { + switch (value) { + case "openid-connect": + return OPENID_CONNECT; + case "ws-federation": + return WS_FEDERATION; + default: + return new EventStreamCloudEventConnectionCreatedObject7OptionsWaadProtocolEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WS_FEDERATION, + + OPENID_CONNECT, + + UNKNOWN + } + + public interface Visitor { + T visitWsFederation(); + + T visitOpenidConnect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7StrategyEnum.java new file mode 100644 index 00000000..226570f0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedObject7StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedObject7StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedObject7StrategyEnum WAAD = + new EventStreamCloudEventConnectionCreatedObject7StrategyEnum(Value.WAAD, "waad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedObject7StrategyEnum(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 EventStreamCloudEventConnectionCreatedObject7StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedObject7StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WAAD: + return visitor.visitWaad(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedObject7StrategyEnum valueOf(String value) { + switch (value) { + case "waad": + return WAAD; + default: + return new EventStreamCloudEventConnectionCreatedObject7StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject.java new file mode 100644 index 00000000..ec0b1f2b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject.java @@ -0,0 +1,226 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventConnectionCreatedPreviousObject.Deserializer.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventConnectionCreatedPreviousObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject2) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject3) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject4) this.value); + } else if (this.type == 5) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject5) this.value); + } else if (this.type == 6) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject6) this.value); + } else if (this.type == 7) { + return visitor.visit((EventStreamCloudEventConnectionCreatedPreviousObject7) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject) other); + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject0 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 0); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject1 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 1); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject2 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 2); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject3 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 3); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject4 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 4); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject5 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 5); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject6 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 6); + } + + public static EventStreamCloudEventConnectionCreatedPreviousObject of( + EventStreamCloudEventConnectionCreatedPreviousObject7 value) { + return new EventStreamCloudEventConnectionCreatedPreviousObject(value, 7); + } + + public interface Visitor { + T visit(EventStreamCloudEventConnectionCreatedPreviousObject0 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject1 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject2 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject3 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject4 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject5 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject6 value); + + T visit(EventStreamCloudEventConnectionCreatedPreviousObject7 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventConnectionCreatedPreviousObject.class); + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject2.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject3.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject4.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject5.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject6.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionCreatedPreviousObject7.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0.java new file mode 100644 index 00000000..47a1a3b9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject0.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0 { + private final Optional authentication; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional connectedAccounts; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0( + Optional authentication, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional connectedAccounts, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.connectedAccounts = connectedAccounts; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0 other) { + return authentication.equals(other.authentication) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && connectedAccounts.equals(other.connectedAccounts) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.connectedAccounts, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject0Authentication authentication); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject0Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts connectedAccounts); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject0Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0 other) { + authentication(other.getAuthentication()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + connectedAccounts(other.getConnectedAccounts()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject0Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject0Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject0 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0( + authentication, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + connectedAccounts, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject0Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0Authentication.java new file mode 100644 index 00000000..a03e4bd1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject0Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject0Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject0Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts.java new file mode 100644 index 00000000..fd8e93b9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts.java @@ -0,0 +1,150 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts { + private final boolean active; + + private final Optional crossAppAccess; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts( + boolean active, Optional crossAppAccess, Map additionalProperties) { + this.active = active; + this.crossAppAccess = crossAppAccess; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @JsonProperty("cross_app_access") + public Optional getCrossAppAccess() { + return crossAppAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts other) { + return active == other.active && crossAppAccess.equals(other.crossAppAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.crossAppAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage crossAppAccess(Optional crossAppAccess); + + _FinalStage crossAppAccess(Boolean crossAppAccess); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + private Optional crossAppAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts other) { + active(other.getActive()); + crossAppAccess(other.getCrossAppAccess()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccess(Boolean crossAppAccess) { + this.crossAppAccess = Optional.ofNullable(crossAppAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access", nulls = Nulls.SKIP) + public _FinalStage crossAppAccess(Optional crossAppAccess) { + this.crossAppAccess = crossAppAccess; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0ConnectedAccounts( + active, crossAppAccess, 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/EventStreamCloudEventConnectionCreatedPreviousObject0Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0Metadata.java new file mode 100644 index 00000000..0b15dce0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject0Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject0Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject0Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0Options.java new file mode 100644 index 00000000..c6b7856a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0Options.java @@ -0,0 +1,1308 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject0Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional + connectionSettings; + + private final Optional> domainAliases; + + private final Optional + dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional< + List> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional discoveryUrl; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional discoveryUrl, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.discoveryUrl = discoveryUrl; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional + getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional + getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && discoveryUrl.equals(other.discoveryUrl) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.discoveryUrl, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject0Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional + connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap attributeMap); + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + _FinalStage discoveryUrl(Optional discoveryUrl); + + _FinalStage discoveryUrl(String discoveryUrl); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional + dpopSigningAlg = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + connectionSettings = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + discoveryUrl(other.getDiscoveryUrl()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

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

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public _FinalStage discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              Tenant domain

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

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              https url of the icon to be shown

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

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

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

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional + connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject0Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + discoveryUrl, + type, + 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/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap.java new file mode 100644 index 00000000..802ba915 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap.java @@ -0,0 +1,170 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional + mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional + mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional + getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional + mappingMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional + mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..3b76fec2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,96 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum + BIND_ALL = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.BIND_ALL, "bind_all"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum + USE_MAP = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BIND_ALL: + return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "bind_all": + return BIND_ALL; + case "use_map": + return USE_MAP; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BIND_ALL, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBindAll(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings.java new file mode 100644 index 00000000..499b2673 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..cdcd4a0e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,119 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum + DISABLED = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum valueOf( + String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..5a1016cc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum( + Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsDpopSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..e3da2e54 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

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

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..03b5621e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS512 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + ES384 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + PS384 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + ES256 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + PS256 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS384 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS256 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata.java new file mode 100644 index 00000000..af7e1259 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

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

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

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

                                                              A list of the Authentication Context Class References that this OP supports

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

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..c8cba5df --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum( + Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSchemaVersionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..de51ba6c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..f348278b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..bd443f54 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS512 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + ES384 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + PS384 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + ES256 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + PS256 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS384 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS256 = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..4c697cf3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + ISSUER = new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum.java new file mode 100644 index 00000000..d17e96b7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum.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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum FRONT_CHANNEL = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum( + Value.FRONT_CHANNEL, "front_channel"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum( + Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FRONT_CHANNEL: + return visitor.visitFrontChannel(); + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum valueOf(String value) { + switch (value) { + case "front_channel": + return FRONT_CHANNEL; + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + FRONT_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitFrontChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum.java new file mode 100644 index 00000000..ccdf2818 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum OIDC = + new EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum valueOf(String value) { + switch (value) { + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject0StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1.java new file mode 100644 index 00000000..747ef207 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject1.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

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

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject1Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject1Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject1Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

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

                                                              Connection name used in the new universal login experience

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

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject1Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject1 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject1Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1Authentication.java new file mode 100644 index 00000000..decba258 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject1Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject1Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject1Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts.java new file mode 100644 index 00000000..89b4f788 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject1Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1Metadata.java new file mode 100644 index 00000000..d9328864 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject1Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject1Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject1Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1Options.java new file mode 100644 index 00000000..319a4578 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1Options.java @@ -0,0 +1,1308 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject1Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional + connectionSettings; + + private final Optional> domainAliases; + + private final Optional + dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional< + List> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional domain; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional domain, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.domain = domain; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional + getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional + getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && domain.equals(other.domain) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.domain, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject1Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional + connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap attributeMap); + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional + dpopSigningAlg = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + connectionSettings = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + domain(other.getDomain()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

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

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

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

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              Tenant domain

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

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

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

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

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

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

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

                                                              https url of the icon to be shown

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

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

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

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional + connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject1Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + domain, + type, + 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/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap.java new file mode 100644 index 00000000..ce5a30b2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap.java @@ -0,0 +1,170 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional + mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional + mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional + getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional + mappingMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional + mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..4c14e16b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,96 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum + USE_MAP = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum + BASIC_PROFILE = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.BASIC_PROFILE, "basic_profile"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USE_MAP: + return visitor.visitUseMap(); + case BASIC_PROFILE: + return visitor.visitBasicProfile(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "use_map": + return USE_MAP; + case "basic_profile": + return BASIC_PROFILE; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BASIC_PROFILE, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBasicProfile(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings.java new file mode 100644 index 00000000..cdb1722d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..3213ef9a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,119 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum + DISABLED = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum valueOf( + String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..9ce79588 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum( + Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsDpopSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..e3097857 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

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

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..51da0e4a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS512 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + ES384 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + PS384 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + ES256 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + PS256 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS384 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS256 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata.java new file mode 100644 index 00000000..1b19a5ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

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

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

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

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

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

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..fd654137 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum( + Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSchemaVersionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..13376d5d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..ec61e629 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..15198e3a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS512 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + ES384 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + PS384 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + ES256 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + PS256 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS384 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS256 = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..0667e7a8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + ISSUER = new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum.java new file mode 100644 index 00000000..f473b562 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum( + Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum valueOf(String value) { + switch (value) { + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum.java new file mode 100644 index 00000000..78160960 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum OKTA = + new EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum(Value.OKTA, "okta"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OKTA: + return visitor.visitOkta(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum valueOf(String value) { + switch (value) { + case "okta": + return OKTA; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject1StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OKTA, + + UNKNOWN + } + + public interface Visitor { + T visitOkta(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2.java new file mode 100644 index 00000000..aea495e7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject2.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject2 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject2Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject2Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject2Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject2Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject2Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject2Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject2 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject2Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2Authentication.java new file mode 100644 index 00000000..cd5e8feb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject2Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject2Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject2Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts.java new file mode 100644 index 00000000..a72e0c9f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject2Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2Metadata.java new file mode 100644 index 00000000..9a032638 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject2Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject2Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2Options.java new file mode 100644 index 00000000..d84f68ea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2Options.java @@ -0,0 +1,1221 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional + digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional + protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional debug; + + private final Optional deflate; + + private final Optional destinationUrl; + + private final Optional disableFieldsMapFix; + + private final Optional disableSignout; + + private final Optional discoveryUrl; + + private final Optional> fieldsMap; + + private final Optional fieldsMapJsonRaw; + + private final Optional globalTokenRevocationJwtIss; + + private final Optional globalTokenRevocationJwtSub; + + private final Optional metadataUrl; + + private final Optional oidcMetadata; + + private final Optional recipientUrl; + + private final Optional requestTemplate; + + private final Optional signOutEndpoint; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional + signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional debug, + Optional deflate, + Optional destinationUrl, + Optional disableFieldsMapFix, + Optional disableSignout, + Optional discoveryUrl, + Optional> fieldsMap, + Optional fieldsMapJsonRaw, + Optional globalTokenRevocationJwtIss, + Optional globalTokenRevocationJwtSub, + Optional metadataUrl, + Optional oidcMetadata, + Optional recipientUrl, + Optional requestTemplate, + Optional signOutEndpoint, + Optional userIdAttribute, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.debug = debug; + this.deflate = deflate; + this.destinationUrl = destinationUrl; + this.disableFieldsMapFix = disableFieldsMapFix; + this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; + this.fieldsMap = fieldsMap; + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + this.metadataUrl = metadataUrl; + this.oidcMetadata = oidcMetadata; + this.recipientUrl = recipientUrl; + this.requestTemplate = requestTemplate; + this.signOutEndpoint = signOutEndpoint; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional + getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional + getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes. + */ + @JsonProperty("debug") + public Optional getDebug() { + return debug; + } + + /** + * @return When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. + */ + @JsonProperty("deflate") + public Optional getDeflate() { + return deflate; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("destinationUrl") + public Optional getDestinationUrl() { + return destinationUrl; + } + + /** + * @return When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled). + */ + @JsonProperty("disableFieldsMapFix") + public Optional getDisableFieldsMapFix() { + return disableFieldsMapFix; + } + + /** + * @return When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). + */ + @JsonProperty("disableSignout") + public Optional getDisableSignout() { + return disableSignout; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("fieldsMap") + public Optional> getFieldsMap() { + return fieldsMap; + } + + /** + * @return Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object. + */ + @JsonProperty("fieldsMapJsonRaw") + public Optional getFieldsMapJsonRaw() { + return fieldsMapJsonRaw; + } + + /** + * @return Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. + */ + @JsonProperty("global_token_revocation_jwt_iss") + public Optional getGlobalTokenRevocationJwtIss() { + return globalTokenRevocationJwtIss; + } + + /** + * @return Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. + */ + @JsonProperty("global_token_revocation_jwt_sub") + public Optional getGlobalTokenRevocationJwtSub() { + return globalTokenRevocationJwtSub; + } + + /** + * @return HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. + */ + @JsonProperty("metadataUrl") + public Optional getMetadataUrl() { + return metadataUrl; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("recipientUrl") + public Optional getRecipientUrl() { + return recipientUrl; + } + + /** + * @return Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template + */ + @JsonProperty("requestTemplate") + public Optional getRequestTemplate() { + return requestTemplate; + } + + /** + * @return Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. + */ + @JsonProperty("signOutEndpoint") + public Optional getSignOutEndpoint() { + return signOutEndpoint; + } + + /** + * @return Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject2Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && debug.equals(other.debug) + && deflate.equals(other.deflate) + && destinationUrl.equals(other.destinationUrl) + && disableFieldsMapFix.equals(other.disableFieldsMapFix) + && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) + && fieldsMap.equals(other.fieldsMap) + && fieldsMapJsonRaw.equals(other.fieldsMapJsonRaw) + && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) + && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) + && metadataUrl.equals(other.metadataUrl) + && oidcMetadata.equals(other.oidcMetadata) + && recipientUrl.equals(other.recipientUrl) + && requestTemplate.equals(other.requestTemplate) + && signOutEndpoint.equals(other.signOutEndpoint) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.debug, + this.deflate, + this.destinationUrl, + this.disableFieldsMapFix, + this.disableSignout, + this.discoveryUrl, + this.fieldsMap, + this.fieldsMapJsonRaw, + this.globalTokenRevocationJwtIss, + this.globalTokenRevocationJwtSub, + this.metadataUrl, + this.oidcMetadata, + this.recipientUrl, + this.requestTemplate, + this.signOutEndpoint, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional + assertionDecryptionSettings = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional + digestAlgorithm = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + protocolBinding = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional subject = + Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional debug = Optional.empty(); + + private Optional deflate = Optional.empty(); + + private Optional destinationUrl = Optional.empty(); + + private Optional disableFieldsMapFix = Optional.empty(); + + private Optional disableSignout = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional> fieldsMap = Optional.empty(); + + private Optional fieldsMapJsonRaw = Optional.empty(); + + private Optional globalTokenRevocationJwtIss = Optional.empty(); + + private Optional globalTokenRevocationJwtSub = Optional.empty(); + + private Optional metadataUrl = Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional recipientUrl = Optional.empty(); + + private Optional requestTemplate = Optional.empty(); + + private Optional signOutEndpoint = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + debug(other.getDebug()); + deflate(other.getDeflate()); + destinationUrl(other.getDestinationUrl()); + disableFieldsMapFix(other.getDisableFieldsMapFix()); + disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); + fieldsMap(other.getFieldsMap()); + fieldsMapJsonRaw(other.getFieldsMapJsonRaw()); + globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); + globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); + metadataUrl(other.getMetadataUrl()); + oidcMetadata(other.getOidcMetadata()); + recipientUrl(other.getRecipientUrl()); + requestTemplate(other.getRequestTemplate()); + signOutEndpoint(other.getSignOutEndpoint()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public Builder cert(Optional cert) { + this.cert = cert; + return this; + } + + public Builder cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public Builder digestAlgorithm( + Optional + digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + public Builder digestAlgorithm( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public Builder expires(Optional expires) { + this.expires = expires; + return this; + } + + public Builder expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public Builder idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + public Builder idpinitiated( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public Builder protocolBinding( + Optional + protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + public Builder protocolBinding( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public Builder signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + public Builder signatureAlgorithm( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public Builder signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + public Builder signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public Builder signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + public Builder signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public Builder subject(Optional subject) { + this.subject = subject; + return this; + } + + public Builder subject(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes.

                                                              + */ + @JsonSetter(value = "debug", nulls = Nulls.SKIP) + public Builder debug(Optional debug) { + this.debug = debug; + return this; + } + + public Builder debug(Boolean debug) { + this.debug = Optional.ofNullable(debug); + return this; + } + + /** + *

                                                              When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding.

                                                              + */ + @JsonSetter(value = "deflate", nulls = Nulls.SKIP) + public Builder deflate(Optional deflate) { + this.deflate = deflate; + return this; + } + + public Builder deflate(Boolean deflate) { + this.deflate = Optional.ofNullable(deflate); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "destinationUrl", nulls = Nulls.SKIP) + public Builder destinationUrl(Optional destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + public Builder destinationUrl(String destinationUrl) { + this.destinationUrl = Optional.ofNullable(destinationUrl); + return this; + } + + /** + *

                                                              When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled).

                                                              + */ + @JsonSetter(value = "disableFieldsMapFix", nulls = Nulls.SKIP) + public Builder disableFieldsMapFix(Optional disableFieldsMapFix) { + this.disableFieldsMapFix = disableFieldsMapFix; + return this; + } + + public Builder disableFieldsMapFix(Boolean disableFieldsMapFix) { + this.disableFieldsMapFix = Optional.ofNullable(disableFieldsMapFix); + return this; + } + + /** + *

                                                              When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled).

                                                              + */ + @JsonSetter(value = "disableSignout", nulls = Nulls.SKIP) + public Builder disableSignout(Optional disableSignout) { + this.disableSignout = disableSignout; + return this; + } + + public Builder disableSignout(Boolean disableSignout) { + this.disableSignout = Optional.ofNullable(disableSignout); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access.

                                                              + */ + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) + public Builder fieldsMap(Optional> fieldsMap) { + this.fieldsMap = fieldsMap; + return this; + } + + public Builder fieldsMap(Map fieldsMap) { + this.fieldsMap = Optional.ofNullable(fieldsMap); + return this; + } + + /** + *

                                                              Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object.

                                                              + */ + @JsonSetter(value = "fieldsMapJsonRaw", nulls = Nulls.SKIP) + public Builder fieldsMapJsonRaw(Optional fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + return this; + } + + public Builder fieldsMapJsonRaw(String fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = Optional.ofNullable(fieldsMapJsonRaw); + return this; + } + + /** + *

                                                              Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_iss", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtIss(Optional globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + return this; + } + + public Builder globalTokenRevocationJwtIss(String globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = Optional.ofNullable(globalTokenRevocationJwtIss); + return this; + } + + /** + *

                                                              Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_sub", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtSub(Optional globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + return this; + } + + public Builder globalTokenRevocationJwtSub(String globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = Optional.ofNullable(globalTokenRevocationJwtSub); + return this; + } + + /** + *

                                                              HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both.

                                                              + */ + @JsonSetter(value = "metadataUrl", nulls = Nulls.SKIP) + public Builder metadataUrl(Optional metadataUrl) { + this.metadataUrl = metadataUrl; + return this; + } + + public Builder metadataUrl(String metadataUrl) { + this.metadataUrl = Optional.ofNullable(metadataUrl); + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) + public Builder recipientUrl(Optional recipientUrl) { + this.recipientUrl = recipientUrl; + return this; + } + + public Builder recipientUrl(String recipientUrl) { + this.recipientUrl = Optional.ofNullable(recipientUrl); + return this; + } + + /** + *

                                                              Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template

                                                              + */ + @JsonSetter(value = "requestTemplate", nulls = Nulls.SKIP) + public Builder requestTemplate(Optional requestTemplate) { + this.requestTemplate = requestTemplate; + return this; + } + + public Builder requestTemplate(String requestTemplate) { + this.requestTemplate = Optional.ofNullable(requestTemplate); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false.

                                                              + */ + @JsonSetter(value = "signOutEndpoint", nulls = Nulls.SKIP) + public Builder signOutEndpoint(Optional signOutEndpoint) { + this.signOutEndpoint = signOutEndpoint; + return this; + } + + public Builder signOutEndpoint(String signOutEndpoint) { + this.signOutEndpoint = Optional.ofNullable(signOutEndpoint); + return this; + } + + /** + *

                                                              Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject2Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + debug, + deflate, + destinationUrl, + disableFieldsMapFix, + disableSignout, + discoveryUrl, + fieldsMap, + fieldsMapJsonRaw, + globalTokenRevocationJwtIss, + globalTokenRevocationJwtSub, + metadataUrl, + oidcMetadata, + recipientUrl, + requestTemplate, + signOutEndpoint, + userIdAttribute, + 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/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..ff1a33f9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings.java @@ -0,0 +1,183 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..da25e95a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum valueOf( + String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..7b9298ba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum valueOf( + String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated.java new file mode 100644 index 00000000..06c471c9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated.java @@ -0,0 +1,207 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional + clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..88c85337 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,108 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + WSFED = new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + SAMLP = new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + OIDC = new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata.java new file mode 100644 index 00000000..e8346552 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..7a95645f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum valueOf( + String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..6a716d3c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..db75c1ae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum valueOf( + String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject.java new file mode 100644 index 00000000..8e69e037 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject.java @@ -0,0 +1,70 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject( + Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject2OptionsSubject(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/EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum.java new file mode 100644 index 00000000..6b033fd3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum SAMLP = + new EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum(Value.SAMLP, "samlp"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SAMLP: + return visitor.visitSamlp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum valueOf(String value) { + switch (value) { + case "samlp": + return SAMLP; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject2StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3.java new file mode 100644 index 00000000..7be64dd2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject3.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject3) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject3 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject3 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject3Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject3Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject3Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject3Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject3Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject3Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject3 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject3Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3Authentication.java new file mode 100644 index 00000000..8b599f7c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject3Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject3Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject3Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject3Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject3Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts.java new file mode 100644 index 00000000..1567072c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject3Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3Metadata.java new file mode 100644 index 00000000..efbf10ec --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject3Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject3Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject3Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3Options.java new file mode 100644 index 00000000..45c7e55c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3Options.java @@ -0,0 +1,993 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionCreatedPreviousObject3Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional + digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional + protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final String pingFederateBaseUrl; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional + signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + String pingFederateBaseUrl, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.pingFederateBaseUrl = pingFederateBaseUrl; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional + getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional + getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return URL provided by PingFederate which returns information used for creating the connection + */ + @JsonProperty("pingFederateBaseUrl") + public String getPingFederateBaseUrl() { + return pingFederateBaseUrl; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject3Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject3Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && pingFederateBaseUrl.equals(other.pingFederateBaseUrl); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.pingFederateBaseUrl); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PingFederateBaseUrlStage builder() { + return new Builder(); + } + + public interface PingFederateBaseUrlStage { + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + */ + _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject3Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings); + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + _FinalStage cert(Optional cert); + + _FinalStage cert(String cert); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + _FinalStage digestAlgorithm( + Optional + digestAlgorithm); + + _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum digestAlgorithm); + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + _FinalStage entityId(Optional entityId); + + _FinalStage entityId(String entityId); + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + _FinalStage expires(Optional expires); + + _FinalStage expires(OffsetDateTime expires); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage idpinitiated( + Optional idpinitiated); + + _FinalStage idpinitiated(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated idpinitiated); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage protocolBinding( + Optional + protocolBinding); + + _FinalStage protocolBinding( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum protocolBinding); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm); + + _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum signatureAlgorithm); + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + _FinalStage signInEndpoint(Optional signInEndpoint); + + _FinalStage signInEndpoint(String signInEndpoint); + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + _FinalStage signingCert(Optional signingCert); + + _FinalStage signingCert(String signingCert); + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + _FinalStage signSamlRequest(Optional signSamlRequest); + + _FinalStage signSamlRequest(Boolean signSamlRequest); + + _FinalStage subject(Optional subject); + + _FinalStage subject(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject subject); + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { + private String pingFederateBaseUrl; + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional subject = + Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + protocolBinding = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + digestAlgorithm = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional + assertionDecryptionSettings = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + pingFederateBaseUrl(other.getPingFederateBaseUrl()); + return this; + } + + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("pingFederateBaseUrl") + public _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl) { + this.pingFederateBaseUrl = + Objects.requireNonNull(pingFederateBaseUrl, "pingFederateBaseUrl must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage subject(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public _FinalStage subject( + Optional subject) { + this.subject = subject; + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public _FinalStage signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public _FinalStage signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public _FinalStage signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + @java.lang.Override + public _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + @java.lang.Override + public _FinalStage protocolBinding( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public _FinalStage protocolBinding( + Optional + protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + @java.lang.Override + public _FinalStage idpinitiated( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + @java.lang.Override + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public _FinalStage idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public _FinalStage expires(Optional expires) { + this.expires = expires; + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public _FinalStage entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public _FinalStage digestAlgorithm( + Optional + digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public _FinalStage cert(Optional cert) { + this.cert = cert; + return this; + } + + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject3Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + pingFederateBaseUrl, + 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/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..0fec11e5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings.java @@ -0,0 +1,183 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..a7cd34cc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum valueOf( + String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..747b44d1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum valueOf( + String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated.java new file mode 100644 index 00000000..3b1304c4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated.java @@ -0,0 +1,207 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional + clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..67c3a612 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,108 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + WSFED = new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + SAMLP = new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + OIDC = new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..05da5602 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum valueOf( + String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..94307e16 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..66a0056c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum valueOf( + String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject.java new file mode 100644 index 00000000..da00d6e2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject.java @@ -0,0 +1,70 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject( + Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject3OptionsSubject(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/EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum.java new file mode 100644 index 00000000..7731a67e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum PINGFEDERATE = + new EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum(Value.PINGFEDERATE, "pingfederate"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject3StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4.java new file mode 100644 index 00000000..24e660b6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject4.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject4 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject4( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject4 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject4) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject4 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject4 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject4Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject4Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject4Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject4Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject4Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject4Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject4 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject4( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject4Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4Authentication.java new file mode 100644 index 00000000..94f8d5e1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject4Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject4Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject4Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject4Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject4Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject4Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject4Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject4Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject4Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts.java new file mode 100644 index 00000000..f6bc11b3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject4ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject4Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4Metadata.java new file mode 100644 index 00000000..772639b5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject4Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject4Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject4Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject4Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject4Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject4Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject4Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4Options.java new file mode 100644 index 00000000..69d12447 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4Options.java @@ -0,0 +1,568 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject4Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject4Options { + private final Optional adfsServer; + + private final Optional certRolloverNotification; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional fedMetadataXml; + + private final Optional iconUrl; + + private final Optional> nonPersistentAttrs; + + private final Optional> prevThumbprints; + + private final Optional + setUserRootAttributes; + + private final Optional< + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject4Options( + Optional adfsServer, + Optional certRolloverNotification, + Optional> domainAliases, + Optional entityId, + Optional fedMetadataXml, + Optional iconUrl, + Optional> nonPersistentAttrs, + Optional> prevThumbprints, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional userIdAttribute, + Map additionalProperties) { + this.adfsServer = adfsServer; + this.certRolloverNotification = certRolloverNotification; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.fedMetadataXml = fedMetadataXml; + this.iconUrl = iconUrl; + this.nonPersistentAttrs = nonPersistentAttrs; + this.prevThumbprints = prevThumbprints; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + /** + * @return ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. + */ + @JsonProperty("adfs_server") + public Optional getAdfsServer() { + return adfsServer; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. + */ + @JsonProperty("fedMetadataXml") + public Optional getFedMetadataXml() { + return fedMetadataXml; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("prev_thumbprints") + public Optional> getPrevThumbprints() { + return prevThumbprints; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + /** + * @return Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject4Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject4Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject4Options other) { + return adfsServer.equals(other.adfsServer) + && certRolloverNotification.equals(other.certRolloverNotification) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && fedMetadataXml.equals(other.fedMetadataXml) + && iconUrl.equals(other.iconUrl) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && prevThumbprints.equals(other.prevThumbprints) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adfsServer, + this.certRolloverNotification, + this.domainAliases, + this.entityId, + this.fedMetadataXml, + this.iconUrl, + this.nonPersistentAttrs, + this.prevThumbprints, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional adfsServer = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional fedMetadataXml = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional> prevThumbprints = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional< + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject4Options other) { + adfsServer(other.getAdfsServer()); + certRolloverNotification(other.getCertRolloverNotification()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + fedMetadataXml(other.getFedMetadataXml()); + iconUrl(other.getIconUrl()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + prevThumbprints(other.getPrevThumbprints()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + /** + *

                                                              ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent.

                                                              + */ + @JsonSetter(value = "adfs_server", nulls = Nulls.SKIP) + public Builder adfsServer(Optional adfsServer) { + this.adfsServer = adfsServer; + return this; + } + + public Builder adfsServer(String adfsServer) { + this.adfsServer = Optional.ofNullable(adfsServer); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'.

                                                              + */ + @JsonSetter(value = "fedMetadataXml", nulls = Nulls.SKIP) + public Builder fedMetadataXml(Optional fedMetadataXml) { + this.fedMetadataXml = fedMetadataXml; + return this; + } + + public Builder fedMetadataXml(String fedMetadataXml) { + this.fedMetadataXml = Optional.ofNullable(fedMetadataXml); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "prev_thumbprints", nulls = Nulls.SKIP) + public Builder prevThumbprints(Optional> prevThumbprints) { + this.prevThumbprints = prevThumbprints; + return this; + } + + public Builder prevThumbprints(List prevThumbprints) { + this.prevThumbprints = Optional.ofNullable(prevThumbprints); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public Builder shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + public Builder shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + /** + *

                                                              Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject4Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject4Options( + adfsServer, + certRolloverNotification, + domainAliases, + entityId, + fedMetadataXml, + iconUrl, + nonPersistentAttrs, + prevThumbprints, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + userIdAttribute, + 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/EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..668a016c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..998dd5ab --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,100 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + valueOf(String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum.java new file mode 100644 index 00000000..5caa4c70 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum ADFS = + new EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum(Value.ADFS, "adfs"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADFS: + return visitor.visitAdfs(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum valueOf(String value) { + switch (value) { + case "adfs": + return ADFS; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject4StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADFS, + + UNKNOWN + } + + public interface Visitor { + T visitAdfs(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5.java new file mode 100644 index 00000000..aaaae8aa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5.java @@ -0,0 +1,517 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject5.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject5 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject5( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject5 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject5) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject5 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject5 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject5Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject5Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject5Options options); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum strategy; + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject5Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject5Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject5Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject5 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject5( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject5Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5Authentication.java new file mode 100644 index 00000000..bcfc09f9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject5Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject5Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject5Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject5Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject5Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject5Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject5Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject5Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject5Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts.java new file mode 100644 index 00000000..8a96c595 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject5ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject5Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5Metadata.java new file mode 100644 index 00000000..51c66a9e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject5Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject5Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject5Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject5Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject5Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject5Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject5Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5Options.java new file mode 100644 index 00000000..202b8a44 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5Options.java @@ -0,0 +1,690 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject5Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject5Options { + private final Optional agentIp; + + private final Optional agentMode; + + private final Optional agentVersion; + + private final Optional bruteForceProtection; + + private final Optional certAuth; + + private final Optional> certs; + + private final Optional disableCache; + + private final Optional disableSelfServiceChangePassword; + + private final Optional> domainAliases; + + private final Optional iconUrl; + + private final Optional> ips; + + private final Optional kerberos; + + private final Optional kerberosOnly; + + private final Optional> nonPersistentAttrs; + + private final Optional + setUserRootAttributes; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject5Options( + Optional agentIp, + Optional agentMode, + Optional agentVersion, + Optional bruteForceProtection, + Optional certAuth, + Optional> certs, + Optional disableCache, + Optional disableSelfServiceChangePassword, + Optional> domainAliases, + Optional iconUrl, + Optional> ips, + Optional kerberos, + Optional kerberosOnly, + Optional> nonPersistentAttrs, + Optional + setUserRootAttributes, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Map additionalProperties) { + this.agentIp = agentIp; + this.agentMode = agentMode; + this.agentVersion = agentVersion; + this.bruteForceProtection = bruteForceProtection; + this.certAuth = certAuth; + this.certs = certs; + this.disableCache = disableCache; + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + this.domainAliases = domainAliases; + this.iconUrl = iconUrl; + this.ips = ips; + this.kerberos = kerberos; + this.kerberosOnly = kerberosOnly; + this.nonPersistentAttrs = nonPersistentAttrs; + this.setUserRootAttributes = setUserRootAttributes; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ + @JsonProperty("agentIP") + public Optional getAgentIp() { + return agentIp; + } + + /** + * @return When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ + @JsonProperty("agentMode") + public Optional getAgentMode() { + return agentMode; + } + + /** + * @return Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ + @JsonProperty("agentVersion") + public Optional getAgentVersion() { + return agentVersion; + } + + /** + * @return Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. + */ + @JsonProperty("brute_force_protection") + public Optional getBruteForceProtection() { + return bruteForceProtection; + } + + /** + * @return Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint + */ + @JsonProperty("certAuth") + public Optional getCertAuth() { + return certAuth; + } + + /** + * @return Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ + @JsonProperty("certs") + public Optional> getCerts() { + return certs; + } + + /** + * @return When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory + */ + @JsonProperty("disable_cache") + public Optional getDisableCache() { + return disableCache; + } + + /** + * @return When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets + */ + @JsonProperty("disable_self_service_change_password") + public Optional getDisableSelfServiceChangePassword() { + return disableSelfServiceChangePassword; + } + + /** + * @return List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ + @JsonProperty("ips") + public Optional> getIps() { + return ips; + } + + /** + * @return Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges + */ + @JsonProperty("kerberos") + public Optional getKerberos() { + return kerberos; + } + + /** + * @return When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback. + */ + @JsonProperty("kerberos_only") + public Optional getKerberosOnly() { + return kerberosOnly; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Primary AD domain hint used for HRD and discovery. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject5Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject5Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject5Options other) { + return agentIp.equals(other.agentIp) + && agentMode.equals(other.agentMode) + && agentVersion.equals(other.agentVersion) + && bruteForceProtection.equals(other.bruteForceProtection) + && certAuth.equals(other.certAuth) + && certs.equals(other.certs) + && disableCache.equals(other.disableCache) + && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) + && domainAliases.equals(other.domainAliases) + && iconUrl.equals(other.iconUrl) + && ips.equals(other.ips) + && kerberos.equals(other.kerberos) + && kerberosOnly.equals(other.kerberosOnly) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentIp, + this.agentMode, + this.agentVersion, + this.bruteForceProtection, + this.certAuth, + this.certs, + this.disableCache, + this.disableSelfServiceChangePassword, + this.domainAliases, + this.iconUrl, + this.ips, + this.kerberos, + this.kerberosOnly, + this.nonPersistentAttrs, + this.setUserRootAttributes, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional agentIp = Optional.empty(); + + private Optional agentMode = Optional.empty(); + + private Optional agentVersion = Optional.empty(); + + private Optional bruteForceProtection = Optional.empty(); + + private Optional certAuth = Optional.empty(); + + private Optional> certs = Optional.empty(); + + private Optional disableCache = Optional.empty(); + + private Optional disableSelfServiceChangePassword = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> ips = Optional.empty(); + + private Optional kerberos = Optional.empty(); + + private Optional kerberosOnly = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject5Options other) { + agentIp(other.getAgentIp()); + agentMode(other.getAgentMode()); + agentVersion(other.getAgentVersion()); + bruteForceProtection(other.getBruteForceProtection()); + certAuth(other.getCertAuth()); + certs(other.getCerts()); + disableCache(other.getDisableCache()); + disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); + domainAliases(other.getDomainAliases()); + iconUrl(other.getIconUrl()); + ips(other.getIps()); + kerberos(other.getKerberos()); + kerberosOnly(other.getKerberosOnly()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentIP", nulls = Nulls.SKIP) + public Builder agentIp(Optional agentIp) { + this.agentIp = agentIp; + return this; + } + + public Builder agentIp(String agentIp) { + this.agentIp = Optional.ofNullable(agentIp); + return this; + } + + /** + *

                                                              When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentMode", nulls = Nulls.SKIP) + public Builder agentMode(Optional agentMode) { + this.agentMode = agentMode; + return this; + } + + public Builder agentMode(Boolean agentMode) { + this.agentMode = Optional.ofNullable(agentMode); + return this; + } + + /** + *

                                                              Version identifier of the installed AD connector agent software (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentVersion", nulls = Nulls.SKIP) + public Builder agentVersion(Optional agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + public Builder agentVersion(String agentVersion) { + this.agentVersion = Optional.ofNullable(agentVersion); + return this; + } + + /** + *

                                                              Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.

                                                              + */ + @JsonSetter(value = "brute_force_protection", nulls = Nulls.SKIP) + public Builder bruteForceProtection(Optional bruteForceProtection) { + this.bruteForceProtection = bruteForceProtection; + return this; + } + + public Builder bruteForceProtection(Boolean bruteForceProtection) { + this.bruteForceProtection = Optional.ofNullable(bruteForceProtection); + return this; + } + + /** + *

                                                              Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint

                                                              + */ + @JsonSetter(value = "certAuth", nulls = Nulls.SKIP) + public Builder certAuth(Optional certAuth) { + this.certAuth = certAuth; + return this; + } + + public Builder certAuth(Boolean certAuth) { + this.certAuth = Optional.ofNullable(certAuth); + return this; + } + + /** + *

                                                              Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "certs", nulls = Nulls.SKIP) + public Builder certs(Optional> certs) { + this.certs = certs; + return this; + } + + public Builder certs(List certs) { + this.certs = Optional.ofNullable(certs); + return this; + } + + /** + *

                                                              When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory

                                                              + */ + @JsonSetter(value = "disable_cache", nulls = Nulls.SKIP) + public Builder disableCache(Optional disableCache) { + this.disableCache = disableCache; + return this; + } + + public Builder disableCache(Boolean disableCache) { + this.disableCache = Optional.ofNullable(disableCache); + return this; + } + + /** + *

                                                              When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets

                                                              + */ + @JsonSetter(value = "disable_self_service_change_password", nulls = Nulls.SKIP) + public Builder disableSelfServiceChangePassword(Optional disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + return this; + } + + public Builder disableSelfServiceChangePassword(Boolean disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = Optional.ofNullable(disableSelfServiceChangePassword); + return this; + } + + /** + *

                                                              List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.

                                                              + */ + @JsonSetter(value = "ips", nulls = Nulls.SKIP) + public Builder ips(Optional> ips) { + this.ips = ips; + return this; + } + + public Builder ips(List ips) { + this.ips = Optional.ofNullable(ips); + return this; + } + + /** + *

                                                              Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges

                                                              + */ + @JsonSetter(value = "kerberos", nulls = Nulls.SKIP) + public Builder kerberos(Optional kerberos) { + this.kerberos = kerberos; + return this; + } + + public Builder kerberos(Boolean kerberos) { + this.kerberos = Optional.ofNullable(kerberos); + return this; + } + + /** + *

                                                              When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback.

                                                              + */ + @JsonSetter(value = "kerberos_only", nulls = Nulls.SKIP) + public Builder kerberosOnly(Optional kerberosOnly) { + this.kerberosOnly = kerberosOnly; + return this; + } + + public Builder kerberosOnly(Boolean kerberosOnly) { + this.kerberosOnly = Optional.ofNullable(kerberosOnly); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + /** + *

                                                              The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Primary AD domain hint used for HRD and discovery.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject5Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject5Options( + agentIp, + agentMode, + agentVersion, + bruteForceProtection, + certAuth, + certs, + disableCache, + disableSelfServiceChangePassword, + domainAliases, + iconUrl, + ips, + kerberos, + kerberosOnly, + nonPersistentAttrs, + setUserRootAttributes, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + 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/EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..2d0ca290 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum.java new file mode 100644 index 00000000..1c43db6d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum AD = + new EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum(Value.AD, "ad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject5StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6.java new file mode 100644 index 00000000..1f473531 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject6.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject6 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject6( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject6 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject6) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject6 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject6 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject6Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject6Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject6Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject6Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject6Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject6Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject6 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject6( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject6Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6Authentication.java new file mode 100644 index 00000000..bfdcac7f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject6Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject6Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject6Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject6Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject6Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject6Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject6Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject6Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject6Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts.java new file mode 100644 index 00000000..24a9dcb9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject6ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject6Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6Metadata.java new file mode 100644 index 00000000..ae4268e3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject6Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject6Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject6Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject6Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject6Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject6Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject6Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6Options.java new file mode 100644 index 00000000..b82b37fa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6Options.java @@ -0,0 +1,1113 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionCreatedPreviousObject6Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject6Options { + private final Optional adminAccessTokenExpiresin; + + private final Optional allowSettingLoginScopes; + + private final Optional apiEnableGroups; + + private final Optional apiEnableUsers; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional email; + + private final Optional extAgreedTerms; + + private final Optional extGroups; + + private final Optional extGroupsExtended; + + private final Optional extIsAdmin; + + private final Optional extIsSuspended; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional handleLoginFromSocial; + + private final Optional iconUrl; + + private final Optional mapUserIdToId; + + private final Optional> nonPersistentAttrs; + + private final Optional profile; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject6Options( + Optional adminAccessTokenExpiresin, + Optional allowSettingLoginScopes, + Optional apiEnableGroups, + Optional apiEnableUsers, + String clientId, + Optional domain, + Optional> domainAliases, + Optional email, + Optional extAgreedTerms, + Optional extGroups, + Optional extGroupsExtended, + Optional extIsAdmin, + Optional extIsSuspended, + Optional + federatedConnectionsAccessTokens, + Optional handleLoginFromSocial, + Optional iconUrl, + Optional mapUserIdToId, + Optional> nonPersistentAttrs, + Optional profile, + Optional> scope, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional> upstreamParams, + Map additionalProperties) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; + this.apiEnableUsers = apiEnableUsers; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.email = email; + this.extAgreedTerms = extAgreedTerms; + this.extGroups = extGroups; + this.extGroupsExtended = extGroupsExtended; + this.extIsAdmin = extIsAdmin; + this.extIsSuspended = extIsSuspended; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.handleLoginFromSocial = handleLoginFromSocial; + this.iconUrl = iconUrl; + this.mapUserIdToId = mapUserIdToId; + this.nonPersistentAttrs = nonPersistentAttrs; + this.profile = profile; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. + */ + @JsonProperty("admin_access_token_expiresin") + public Optional getAdminAccessTokenExpiresin() { + return adminAccessTokenExpiresin; + } + + /** + * @return When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. + */ + @JsonProperty("allow_setting_login_scopes") + public Optional getAllowSettingLoginScopes() { + return allowSettingLoginScopes; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false. + */ + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Primary Google Workspace domain name that users must belong to. + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return Whether the OAuth flow requests the email scope. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Fetches the agreedToTerms flag from the Google Directory profile. + */ + @JsonProperty("ext_agreed_terms") + public Optional getExtAgreedTerms() { + return extAgreedTerms; + } + + /** + * @return Enables enrichment with Google group memberships (required for ext_groups_extended). + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true. + */ + @JsonProperty("ext_groups_extended") + public Optional getExtGroupsExtended() { + return extGroupsExtended; + } + + /** + * @return Fetches the Google Directory admin flag for the signing-in user. + */ + @JsonProperty("ext_is_admin") + public Optional getExtIsAdmin() { + return extIsAdmin; + } + + /** + * @return Fetches the Google Directory suspended flag for the signing-in user. + */ + @JsonProperty("ext_is_suspended") + public Optional getExtIsSuspended() { + return extIsSuspended; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. + */ + @JsonProperty("handle_login_from_social") + public Optional getHandleLoginFromSocial() { + return handleLoginFromSocial; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. + */ + @JsonProperty("map_user_id_to_id") + public Optional getMapUserIdToId() { + return mapUserIdToId; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Whether the OAuth flow requests the profile scope. + */ + @JsonProperty("profile") + public Optional getProfile() { + return profile; + } + + /** + * @return Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The Google Workspace primary domain used to identify the organization during authentication. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject6Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject6Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject6Options other) { + return adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) + && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) + && apiEnableUsers.equals(other.apiEnableUsers) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && email.equals(other.email) + && extAgreedTerms.equals(other.extAgreedTerms) + && extGroups.equals(other.extGroups) + && extGroupsExtended.equals(other.extGroupsExtended) + && extIsAdmin.equals(other.extIsAdmin) + && extIsSuspended.equals(other.extIsSuspended) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && handleLoginFromSocial.equals(other.handleLoginFromSocial) + && iconUrl.equals(other.iconUrl) + && mapUserIdToId.equals(other.mapUserIdToId) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && profile.equals(other.profile) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adminAccessTokenExpiresin, + this.allowSettingLoginScopes, + this.apiEnableGroups, + this.apiEnableUsers, + this.clientId, + this.domain, + this.domainAliases, + this.email, + this.extAgreedTerms, + this.extGroups, + this.extGroupsExtended, + this.extIsAdmin, + this.extIsSuspended, + this.federatedConnectionsAccessTokens, + this.handleLoginFromSocial, + this.iconUrl, + this.mapUserIdToId, + this.nonPersistentAttrs, + this.profile, + this.scope, + this.setUserRootAttributes, + this.tenantDomain, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject6Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); + + _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes); + + _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + _FinalStage apiEnableGroups(Optional apiEnableGroups); + + _FinalStage apiEnableGroups(Boolean apiEnableGroups); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(Boolean email); + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + _FinalStage extAgreedTerms(Optional extAgreedTerms); + + _FinalStage extAgreedTerms(Boolean extAgreedTerms); + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + _FinalStage extGroupsExtended(Optional extGroupsExtended); + + _FinalStage extGroupsExtended(Boolean extGroupsExtended); + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + _FinalStage extIsAdmin(Optional extIsAdmin); + + _FinalStage extIsAdmin(Boolean extIsAdmin); + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + _FinalStage extIsSuspended(Optional extIsSuspended); + + _FinalStage extIsSuspended(Boolean extIsSuspended); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial); + + _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + _FinalStage mapUserIdToId(Optional mapUserIdToId); + + _FinalStage mapUserIdToId(Boolean mapUserIdToId); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + _FinalStage profile(Optional profile); + + _FinalStage profile(Boolean profile); + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional> upstreamParams = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional mapUserIdToId = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional handleLoginFromSocial = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extIsSuspended = Optional.empty(); + + private Optional extIsAdmin = Optional.empty(); + + private Optional extGroupsExtended = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional extAgreedTerms = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + private Optional apiEnableGroups = Optional.empty(); + + private Optional allowSettingLoginScopes = Optional.empty(); + + private Optional adminAccessTokenExpiresin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject6Options other) { + adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); + allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); + apiEnableUsers(other.getApiEnableUsers()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + email(other.getEmail()); + extAgreedTerms(other.getExtAgreedTerms()); + extGroups(other.getExtGroups()); + extGroupsExtended(other.getExtGroupsExtended()); + extIsAdmin(other.getExtIsAdmin()); + extIsSuspended(other.getExtIsSuspended()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + handleLoginFromSocial(other.getHandleLoginFromSocial()); + iconUrl(other.getIconUrl()); + mapUserIdToId(other.getMapUserIdToId()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + profile(other.getProfile()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage profile(Boolean profile) { + this.profile = Optional.ofNullable(profile); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "profile", nulls = Nulls.SKIP) + public _FinalStage profile(Optional profile) { + this.profile = profile; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage mapUserIdToId(Boolean mapUserIdToId) { + this.mapUserIdToId = Optional.ofNullable(mapUserIdToId); + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "map_user_id_to_id", nulls = Nulls.SKIP) + public _FinalStage mapUserIdToId(Optional mapUserIdToId) { + this.mapUserIdToId = mapUserIdToId; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial) { + this.handleLoginFromSocial = Optional.ofNullable(handleLoginFromSocial); + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "handle_login_from_social", nulls = Nulls.SKIP) + public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial) { + this.handleLoginFromSocial = handleLoginFromSocial; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsSuspended(Boolean extIsSuspended) { + this.extIsSuspended = Optional.ofNullable(extIsSuspended); + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) + public _FinalStage extIsSuspended(Optional extIsSuspended) { + this.extIsSuspended = extIsSuspended; + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsAdmin(Boolean extIsAdmin) { + this.extIsAdmin = Optional.ofNullable(extIsAdmin); + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_admin", nulls = Nulls.SKIP) + public _FinalStage extIsAdmin(Optional extIsAdmin) { + this.extIsAdmin = extIsAdmin; + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroupsExtended(Boolean extGroupsExtended) { + this.extGroupsExtended = Optional.ofNullable(extGroupsExtended); + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups_extended", nulls = Nulls.SKIP) + public _FinalStage extGroupsExtended(Optional extGroupsExtended) { + this.extGroupsExtended = extGroupsExtended; + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extAgreedTerms(Boolean extAgreedTerms) { + this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) + public _FinalStage extAgreedTerms(Optional extAgreedTerms) { + this.extAgreedTerms = extAgreedTerms; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(Boolean email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public _FinalStage apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes) { + this.allowSettingLoginScopes = Optional.ofNullable(allowSettingLoginScopes); + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_setting_login_scopes", nulls = Nulls.SKIP) + public _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes) { + this.allowSettingLoginScopes = allowSettingLoginScopes; + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = Optional.ofNullable(adminAccessTokenExpiresin); + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "admin_access_token_expiresin", nulls = Nulls.SKIP) + public _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject6Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject6Options( + adminAccessTokenExpiresin, + allowSettingLoginScopes, + apiEnableGroups, + apiEnableUsers, + clientId, + domain, + domainAliases, + email, + extAgreedTerms, + extGroups, + extGroupsExtended, + extIsAdmin, + extIsSuspended, + federatedConnectionsAccessTokens, + handleLoginFromSocial, + iconUrl, + mapUserIdToId, + nonPersistentAttrs, + profile, + scope, + setUserRootAttributes, + tenantDomain, + upstreamParams, + 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/EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..1fcd78d2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject6OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..6fe4fd77 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum.java new file mode 100644 index 00000000..9258ea86 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum GOOGLE_APPS = + new EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum(Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum valueOf(String value) { + switch (value) { + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject6StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GOOGLE_APPS, + + UNKNOWN + } + + public interface Visitor { + T visitGoogleApps(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7.java new file mode 100644 index 00000000..c30ef1ed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionCreatedPreviousObject7.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject7 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject7( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject7 + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject7) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject7 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject7 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionCreatedPreviousObject7Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject7Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject7Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionCreatedPreviousObject7Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionCreatedPreviousObject7Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionCreatedPreviousObject7Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject7 build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject7( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionCreatedPreviousObject7Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7Authentication.java new file mode 100644 index 00000000..e943546e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject7Authentication.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject7Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject7Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject7Authentication + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject7Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject7Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject7Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject7Authentication build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject7Authentication( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts.java new file mode 100644 index 00000000..4d7402aa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject7ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject7Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7Metadata.java new file mode 100644 index 00000000..fc892898 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionCreatedPreviousObject7Metadata.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject7Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject7Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject7Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionCreatedPreviousObject7Metadata build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject7Metadata(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/EventStreamCloudEventConnectionCreatedPreviousObject7Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7Options.java new file mode 100644 index 00000000..55338d19 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7Options.java @@ -0,0 +1,1308 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionCreatedPreviousObject7Options.Builder.class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject7Options { + private final Optional apiEnableUsers; + + private final Optional appDomain; + + private final Optional appId; + + private final Optional basicProfile; + + private final Optional certRolloverNotification; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional extGroups; + + private final Optional extNestedGroups; + + private final Optional extProfile; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional granted; + + private final Optional iconUrl; + + private final Optional identityApi; + + private final Optional maxGroupsToRetrieve; + + private final Optional> nonPersistentAttrs; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional< + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection; + + private final Optional tenantDomain; + + private final Optional tenantId; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional useWsfed; + + private final Optional useCommonEndpoint; + + private final Optional + useridAttribute; + + private final Optional waadProtocol; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject7Options( + Optional apiEnableUsers, + Optional appDomain, + Optional appId, + Optional basicProfile, + Optional certRolloverNotification, + String clientId, + Optional domain, + Optional> domainAliases, + Optional extGroups, + Optional extNestedGroups, + Optional extProfile, + Optional + federatedConnectionsAccessTokens, + Optional granted, + Optional iconUrl, + Optional identityApi, + Optional maxGroupsToRetrieve, + Optional> nonPersistentAttrs, + Optional> scope, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional tenantDomain, + Optional tenantId, + Optional> thumbprints, + Optional> upstreamParams, + Optional useWsfed, + Optional useCommonEndpoint, + Optional useridAttribute, + Optional waadProtocol, + Map additionalProperties) { + this.apiEnableUsers = apiEnableUsers; + this.appDomain = appDomain; + this.appId = appId; + this.basicProfile = basicProfile; + this.certRolloverNotification = certRolloverNotification; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.extGroups = extGroups; + this.extNestedGroups = extNestedGroups; + this.extProfile = extProfile; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.granted = granted; + this.iconUrl = iconUrl; + this.identityApi = identityApi; + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + this.nonPersistentAttrs = nonPersistentAttrs; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.tenantDomain = tenantDomain; + this.tenantId = tenantId; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.useWsfed = useWsfed; + this.useCommonEndpoint = useCommonEndpoint; + this.useridAttribute = useridAttribute; + this.waadProtocol = waadProtocol; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enable users API + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. + */ + @JsonProperty("app_domain") + public Optional getAppDomain() { + return appDomain; + } + + /** + * @return The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests. + */ + @JsonProperty("app_id") + public Optional getAppId() { + return appId; + } + + /** + * @return Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication. + */ + @JsonProperty("basic_profile") + public Optional getBasicProfile() { + return basicProfile; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com'). + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve. + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included. + */ + @JsonProperty("ext_nested_groups") + public Optional getExtNestedGroups() { + return extNestedGroups; + } + + /** + * @return When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2. + */ + @JsonProperty("ext_profile") + public Optional getExtProfile() { + return extProfile; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. + */ + @JsonProperty("granted") + public Optional getGranted() { + return granted; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("identity_api") + public Optional getIdentityApi() { + return identityApi; + } + + /** + * @return Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default. + */ + @JsonProperty("max_groups_to_retrieve") + public Optional getMaxGroupsToRetrieve() { + return maxGroupsToRetrieve; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. + */ + @JsonProperty("tenantId") + public Optional getTenantId() { + return tenantId; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. + */ + @JsonProperty("use_wsfed") + public Optional getUseWsfed() { + return useWsfed; + } + + /** + * @return When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false. + */ + @JsonProperty("useCommonEndpoint") + public Optional getUseCommonEndpoint() { + return useCommonEndpoint; + } + + @JsonProperty("userid_attribute") + public Optional + getUseridAttribute() { + return useridAttribute; + } + + @JsonProperty("waad_protocol") + public Optional getWaadProtocol() { + return waadProtocol; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionCreatedPreviousObject7Options + && equalTo((EventStreamCloudEventConnectionCreatedPreviousObject7Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionCreatedPreviousObject7Options other) { + return apiEnableUsers.equals(other.apiEnableUsers) + && appDomain.equals(other.appDomain) + && appId.equals(other.appId) + && basicProfile.equals(other.basicProfile) + && certRolloverNotification.equals(other.certRolloverNotification) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && extGroups.equals(other.extGroups) + && extNestedGroups.equals(other.extNestedGroups) + && extProfile.equals(other.extProfile) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && granted.equals(other.granted) + && iconUrl.equals(other.iconUrl) + && identityApi.equals(other.identityApi) + && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && tenantDomain.equals(other.tenantDomain) + && tenantId.equals(other.tenantId) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && useWsfed.equals(other.useWsfed) + && useCommonEndpoint.equals(other.useCommonEndpoint) + && useridAttribute.equals(other.useridAttribute) + && waadProtocol.equals(other.waadProtocol); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.apiEnableUsers, + this.appDomain, + this.appId, + this.basicProfile, + this.certRolloverNotification, + this.clientId, + this.domain, + this.domainAliases, + this.extGroups, + this.extNestedGroups, + this.extProfile, + this.federatedConnectionsAccessTokens, + this.granted, + this.iconUrl, + this.identityApi, + this.maxGroupsToRetrieve, + this.nonPersistentAttrs, + this.scope, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.tenantDomain, + this.tenantId, + this.thumbprints, + this.upstreamParams, + this.useWsfed, + this.useCommonEndpoint, + this.useridAttribute, + this.waadProtocol); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject7Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Enable users API

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + _FinalStage appDomain(Optional appDomain); + + _FinalStage appDomain(String appDomain); + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + _FinalStage appId(Optional appId); + + _FinalStage appId(String appId); + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + _FinalStage basicProfile(Optional basicProfile); + + _FinalStage basicProfile(Boolean basicProfile); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + _FinalStage extNestedGroups(Optional extNestedGroups); + + _FinalStage extNestedGroups(Boolean extNestedGroups); + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + _FinalStage extProfile(Optional extProfile); + + _FinalStage extProfile(Boolean extProfile); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + _FinalStage granted(Optional granted); + + _FinalStage granted(Boolean granted); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage identityApi( + Optional identityApi); + + _FinalStage identityApi( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum identityApi); + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve); + + _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + _FinalStage shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection); + + _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection); + + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + _FinalStage tenantId(Optional tenantId); + + _FinalStage tenantId(String tenantId); + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + _FinalStage useWsfed(Optional useWsfed); + + _FinalStage useWsfed(Boolean useWsfed); + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + _FinalStage useCommonEndpoint(Optional useCommonEndpoint); + + _FinalStage useCommonEndpoint(Boolean useCommonEndpoint); + + _FinalStage useridAttribute( + Optional + useridAttribute); + + _FinalStage useridAttribute( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum useridAttribute); + + _FinalStage waadProtocol( + Optional waadProtocol); + + _FinalStage waadProtocol( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum waadProtocol); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional waadProtocol = + Optional.empty(); + + private Optional + useridAttribute = Optional.empty(); + + private Optional useCommonEndpoint = Optional.empty(); + + private Optional useWsfed = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantId = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional< + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional maxGroupsToRetrieve = Optional.empty(); + + private Optional identityApi = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional granted = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extProfile = Optional.empty(); + + private Optional extNestedGroups = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional basicProfile = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional appDomain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionCreatedPreviousObject7Options other) { + apiEnableUsers(other.getApiEnableUsers()); + appDomain(other.getAppDomain()); + appId(other.getAppId()); + basicProfile(other.getBasicProfile()); + certRolloverNotification(other.getCertRolloverNotification()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + extGroups(other.getExtGroups()); + extNestedGroups(other.getExtNestedGroups()); + extProfile(other.getExtProfile()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + granted(other.getGranted()); + iconUrl(other.getIconUrl()); + identityApi(other.getIdentityApi()); + maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + tenantDomain(other.getTenantDomain()); + tenantId(other.getTenantId()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + useWsfed(other.getUseWsfed()); + useCommonEndpoint(other.getUseCommonEndpoint()); + useridAttribute(other.getUseridAttribute()); + waadProtocol(other.getWaadProtocol()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage waadProtocol( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum waadProtocol) { + this.waadProtocol = Optional.ofNullable(waadProtocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) + public _FinalStage waadProtocol( + Optional waadProtocol) { + this.waadProtocol = waadProtocol; + return this; + } + + @java.lang.Override + public _FinalStage useridAttribute( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum useridAttribute) { + this.useridAttribute = Optional.ofNullable(useridAttribute); + return this; + } + + @java.lang.Override + @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) + public _FinalStage useridAttribute( + Optional + useridAttribute) { + this.useridAttribute = useridAttribute; + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useCommonEndpoint(Boolean useCommonEndpoint) { + this.useCommonEndpoint = Optional.ofNullable(useCommonEndpoint); + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useCommonEndpoint", nulls = Nulls.SKIP) + public _FinalStage useCommonEndpoint(Optional useCommonEndpoint) { + this.useCommonEndpoint = useCommonEndpoint; + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useWsfed(Boolean useWsfed) { + this.useWsfed = Optional.ofNullable(useWsfed); + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) + public _FinalStage useWsfed(Optional useWsfed) { + this.useWsfed = useWsfed; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantId(String tenantId) { + this.tenantId = Optional.ofNullable(tenantId); + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) + public _FinalStage tenantId(Optional tenantId) { + this.tenantId = tenantId; + return this; + } + + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public _FinalStage shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = Optional.ofNullable(maxGroupsToRetrieve); + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) + public _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + return this; + } + + @java.lang.Override + public _FinalStage identityApi( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum identityApi) { + this.identityApi = Optional.ofNullable(identityApi); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_api", nulls = Nulls.SKIP) + public _FinalStage identityApi( + Optional identityApi) { + this.identityApi = identityApi; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage granted(Boolean granted) { + this.granted = Optional.ofNullable(granted); + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "granted", nulls = Nulls.SKIP) + public _FinalStage granted(Optional granted) { + this.granted = granted; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extProfile(Boolean extProfile) { + this.extProfile = Optional.ofNullable(extProfile); + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) + public _FinalStage extProfile(Optional extProfile) { + this.extProfile = extProfile; + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extNestedGroups(Boolean extNestedGroups) { + this.extNestedGroups = Optional.ofNullable(extNestedGroups); + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_nested_groups", nulls = Nulls.SKIP) + public _FinalStage extNestedGroups(Optional extNestedGroups) { + this.extNestedGroups = extNestedGroups; + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage basicProfile(Boolean basicProfile) { + this.basicProfile = Optional.ofNullable(basicProfile); + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) + public _FinalStage basicProfile(Optional basicProfile) { + this.basicProfile = basicProfile; + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appId(String appId) { + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_id", nulls = Nulls.SKIP) + public _FinalStage appId(Optional appId) { + this.appId = appId; + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appDomain(String appDomain) { + this.appDomain = Optional.ofNullable(appDomain); + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_domain", nulls = Nulls.SKIP) + public _FinalStage appDomain(Optional appDomain) { + this.appDomain = appDomain; + return this; + } + + /** + *

                                                              Enable users API

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enable users API

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject7Options build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject7Options( + apiEnableUsers, + appDomain, + appId, + basicProfile, + certRolloverNotification, + clientId, + domain, + domainAliases, + extGroups, + extNestedGroups, + extProfile, + federatedConnectionsAccessTokens, + granted, + iconUrl, + identityApi, + maxGroupsToRetrieve, + nonPersistentAttrs, + scope, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + tenantDomain, + tenantId, + thumbprints, + upstreamParams, + useWsfed, + useCommonEndpoint, + useridAttribute, + waadProtocol, + 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/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..4941158d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum.java new file mode 100644 index 00000000..bae128e2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum + AZURE_ACTIVE_DIRECTORY_V10 = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum( + Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum + MICROSOFT_IDENTITY_PLATFORM_V20 = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum( + Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AZURE_ACTIVE_DIRECTORY_V10: + return visitor.visitAzureActiveDirectoryV10(); + case MICROSOFT_IDENTITY_PLATFORM_V20: + return visitor.visitMicrosoftIdentityPlatformV20(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum valueOf(String value) { + switch (value) { + case "azure-active-directory-v1.0": + return AZURE_ACTIVE_DIRECTORY_V10; + case "microsoft-identity-platform-v2.0": + return MICROSOFT_IDENTITY_PLATFORM_V20; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsIdentityApiEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + MICROSOFT_IDENTITY_PLATFORM_V20, + + AZURE_ACTIVE_DIRECTORY_V10, + + UNKNOWN + } + + public interface Visitor { + T visitMicrosoftIdentityPlatformV20(); + + T visitAzureActiveDirectoryV10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..6cfd18bc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..37264a32 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,100 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + valueOf(String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum.java new file mode 100644 index 00000000..04b75e8c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum SUB = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum(Value.SUB, "sub"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum OID = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum(Value.OID, "oid"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUB: + return visitor.visitSub(); + case OID: + return visitor.visitOid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum valueOf( + String value) { + switch (value) { + case "sub": + return SUB; + case "oid": + return OID; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsUseridAttributeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OID, + + SUB, + + UNKNOWN + } + + public interface Visitor { + T visitOid(); + + T visitSub(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum.java new file mode 100644 index 00000000..bcbf6828 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum OPENID_CONNECT = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum( + Value.OPENID_CONNECT, "openid-connect"); + + public static final EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum WS_FEDERATION = + new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum( + Value.WS_FEDERATION, "ws-federation"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID_CONNECT: + return visitor.visitOpenidConnect(); + case WS_FEDERATION: + return visitor.visitWsFederation(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum valueOf(String value) { + switch (value) { + case "openid-connect": + return OPENID_CONNECT; + case "ws-federation": + return WS_FEDERATION; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject7OptionsWaadProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + WS_FEDERATION, + + OPENID_CONNECT, + + UNKNOWN + } + + public interface Visitor { + T visitWsFederation(); + + T visitOpenidConnect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum.java new file mode 100644 index 00000000..679b49e8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum { + public static final EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum WAAD = + new EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum(Value.WAAD, "waad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum(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 EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WAAD: + return visitor.visitWaad(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum valueOf(String value) { + switch (value) { + case "waad": + return WAAD; + default: + return new EventStreamCloudEventConnectionCreatedPreviousObject7StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedTypeEnum.java new file mode 100644 index 00000000..58e16549 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionCreatedTypeEnum.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 EventStreamCloudEventConnectionCreatedTypeEnum { + public static final EventStreamCloudEventConnectionCreatedTypeEnum CONNECTION_CREATED = + new EventStreamCloudEventConnectionCreatedTypeEnum(Value.CONNECTION_CREATED, "connection.created"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionCreatedTypeEnum(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 EventStreamCloudEventConnectionCreatedTypeEnum + && this.string.equals(((EventStreamCloudEventConnectionCreatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION_CREATED: + return visitor.visitConnectionCreated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionCreatedTypeEnum valueOf(String value) { + switch (value) { + case "connection.created": + return CONNECTION_CREATED; + default: + return new EventStreamCloudEventConnectionCreatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION_CREATED, + + UNKNOWN + } + + public interface Visitor { + T visitConnectionCreated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeleted.java new file mode 100644 index 00000000..d99dc620 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeleted.java @@ -0,0 +1,154 @@ +/** + * 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 = EventStreamCloudEventConnectionDeleted.Builder.class) +public final class EventStreamCloudEventConnectionDeleted { + private final String offset; + + private final EventStreamCloudEventConnectionDeletedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeleted( + String offset, + EventStreamCloudEventConnectionDeletedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventConnectionDeletedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeleted + && equalTo((EventStreamCloudEventConnectionDeleted) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeleted other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              + */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventConnectionDeleted other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventConnectionDeletedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeleted build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventConnectionDeletedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeleted other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventConnectionDeletedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeleted build() { + return new EventStreamCloudEventConnectionDeleted(offset, event, 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/EventStreamCloudEventConnectionDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedCloudEvent.java new file mode 100644 index 00000000..98661468 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedCloudEvent.Builder.class) +public final class EventStreamCloudEventConnectionDeletedCloudEvent { + private final EventStreamCloudEventSpecVersionEnum specversion; + + private final EventStreamCloudEventConnectionDeletedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventConnectionDeletedData data; + + private final String a0Tenant; + + private final Optional a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedCloudEvent( + EventStreamCloudEventSpecVersionEnum specversion, + EventStreamCloudEventConnectionDeletedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventConnectionDeletedData data, + String a0Tenant, + Optional a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("specversion") + public EventStreamCloudEventSpecVersionEnum getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventConnectionDeletedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventConnectionDeletedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). + */ + @JsonProperty("a0stream") + public Optional getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedCloudEvent + && equalTo((EventStreamCloudEventConnectionDeletedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); + + Builder from(EventStreamCloudEventConnectionDeletedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventConnectionDeletedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              + */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

                                                              A unique identifier for the event.

                                                              + */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              + */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventConnectionDeletedData data); + } + + public interface A0TenantStage { + /** + *

                                                              The auth0 tenant ID to which the event is associated.

                                                              + */ + _FinalStage a0Tenant(@NotNull String a0Tenant); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + _FinalStage { + private EventStreamCloudEventSpecVersionEnum specversion; + + private EventStreamCloudEventConnectionDeletedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventConnectionDeletedData data; + + private String a0Tenant; + + private Optional a0Purpose = Optional.empty(); + + private Optional a0Stream = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventConnectionDeletedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

                                                              A unique identifier for the event.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventConnectionDeletedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

                                                              The auth0 tenant ID to which the event is associated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public _FinalStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedCloudEvent build() { + return new EventStreamCloudEventConnectionDeletedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, 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/EventStreamCloudEventConnectionDeletedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedCloudEventTypeEnum.java new file mode 100644 index 00000000..9ede038d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedCloudEventTypeEnum { + public static final EventStreamCloudEventConnectionDeletedCloudEventTypeEnum CONNECTION_DELETED = + new EventStreamCloudEventConnectionDeletedCloudEventTypeEnum( + Value.CONNECTION_DELETED, "connection.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedCloudEventTypeEnum(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 EventStreamCloudEventConnectionDeletedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION_DELETED: + return visitor.visitConnectionDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "connection.deleted": + return CONNECTION_DELETED; + default: + return new EventStreamCloudEventConnectionDeletedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitConnectionDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedData.java new file mode 100644 index 00000000..d485c9f1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedData.java @@ -0,0 +1,185 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedData.Builder.class) +public final class EventStreamCloudEventConnectionDeletedData { + private final EventStreamCloudEventConnectionDeletedObject object; + + private final Optional previousObject; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedData( + EventStreamCloudEventConnectionDeletedObject object, + Optional previousObject, + Optional context, + Map additionalProperties) { + this.object = object; + this.previousObject = previousObject; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventConnectionDeletedObject getObject() { + return object; + } + + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedData + && equalTo((EventStreamCloudEventConnectionDeletedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedData other) { + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.previousObject, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventConnectionDeletedObject object); + + Builder from(EventStreamCloudEventConnectionDeletedData other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventConnectionDeletedPreviousObject previousObject); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventConnectionDeletedObject object; + + private Optional context = Optional.empty(); + + private Optional previousObject = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedData other) { + object(other.getObject()); + previousObject(other.getPreviousObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventConnectionDeletedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventConnectionDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedData build() { + return new EventStreamCloudEventConnectionDeletedData( + object, previousObject, context, 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/EventStreamCloudEventConnectionDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject.java new file mode 100644 index 00000000..c8180b9d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventConnectionDeletedObject.Deserializer.class) +public final class EventStreamCloudEventConnectionDeletedObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventConnectionDeletedObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject2) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject3) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject4) this.value); + } else if (this.type == 5) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject5) this.value); + } else if (this.type == 6) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject6) this.value); + } else if (this.type == 7) { + return visitor.visit((EventStreamCloudEventConnectionDeletedObject7) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject + && equalTo((EventStreamCloudEventConnectionDeletedObject) other); + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject0 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 0); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject1 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 1); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject2 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 2); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject3 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 3); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject4 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 4); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject5 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 5); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject6 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 6); + } + + public static EventStreamCloudEventConnectionDeletedObject of(EventStreamCloudEventConnectionDeletedObject7 value) { + return new EventStreamCloudEventConnectionDeletedObject(value, 7); + } + + public interface Visitor { + T visit(EventStreamCloudEventConnectionDeletedObject0 value); + + T visit(EventStreamCloudEventConnectionDeletedObject1 value); + + T visit(EventStreamCloudEventConnectionDeletedObject2 value); + + T visit(EventStreamCloudEventConnectionDeletedObject3 value); + + T visit(EventStreamCloudEventConnectionDeletedObject4 value); + + T visit(EventStreamCloudEventConnectionDeletedObject5 value); + + T visit(EventStreamCloudEventConnectionDeletedObject6 value); + + T visit(EventStreamCloudEventConnectionDeletedObject7 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventConnectionDeletedObject.class); + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject2.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject3.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject4.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject5.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject6.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedObject7.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0.java new file mode 100644 index 00000000..19546f20 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject0.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0 { + private final Optional authentication; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional connectedAccounts; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject0StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0( + Optional authentication, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional connectedAccounts, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject0StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.connectedAccounts = connectedAccounts; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject0StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0 + && equalTo((EventStreamCloudEventConnectionDeletedObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0 other) { + return authentication.equals(other.authentication) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && connectedAccounts.equals(other.connectedAccounts) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.connectedAccounts, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject0StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject0Authentication authentication); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject0Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts connectedAccounts); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject0Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject0StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject0 other) { + authentication(other.getAuthentication()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + connectedAccounts(other.getConnectedAccounts()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject0StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject0Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject0Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject0Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject0 build() { + return new EventStreamCloudEventConnectionDeletedObject0( + authentication, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + connectedAccounts, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject0Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0Authentication.java new file mode 100644 index 00000000..33470018 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject0Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject0Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject0Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject0Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject0Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject0Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject0Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts.java new file mode 100644 index 00000000..f7d362ba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts.java @@ -0,0 +1,150 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts { + private final boolean active; + + private final Optional crossAppAccess; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts( + boolean active, Optional crossAppAccess, Map additionalProperties) { + this.active = active; + this.crossAppAccess = crossAppAccess; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @JsonProperty("cross_app_access") + public Optional getCrossAppAccess() { + return crossAppAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts other) { + return active == other.active && crossAppAccess.equals(other.crossAppAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.crossAppAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage crossAppAccess(Optional crossAppAccess); + + _FinalStage crossAppAccess(Boolean crossAppAccess); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + private Optional crossAppAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts other) { + active(other.getActive()); + crossAppAccess(other.getCrossAppAccess()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccess(Boolean crossAppAccess) { + this.crossAppAccess = Optional.ofNullable(crossAppAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access", nulls = Nulls.SKIP) + public _FinalStage crossAppAccess(Optional crossAppAccess) { + this.crossAppAccess = crossAppAccess; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject0ConnectedAccounts( + active, crossAppAccess, 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/EventStreamCloudEventConnectionDeletedObject0Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0Metadata.java new file mode 100644 index 00000000..172afd88 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject0Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject0Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject0Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject0Metadata(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/EventStreamCloudEventConnectionDeletedObject0Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0Options.java new file mode 100644 index 00000000..02a8afad --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0Options.java @@ -0,0 +1,1286 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject0Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional connectionSettings; + + private final Optional> domainAliases; + + private final Optional dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional discoveryUrl; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional discoveryUrl, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.discoveryUrl = discoveryUrl; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0Options + && equalTo((EventStreamCloudEventConnectionDeletedObject0Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && discoveryUrl.equals(other.discoveryUrl) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.discoveryUrl, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedObject0Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject0Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion(EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap attributeMap); + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + _FinalStage discoveryUrl(Optional discoveryUrl); + + _FinalStage discoveryUrl(String discoveryUrl); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional dpopSigningAlg = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional connectionSettings = + Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject0Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + discoveryUrl(other.getDiscoveryUrl()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public _FinalStage discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap(EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata(EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject0Options build() { + return new EventStreamCloudEventConnectionDeletedObject0Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + discoveryUrl, + type, + 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/EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap.java new file mode 100644 index 00000000..5e99d134 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap.java @@ -0,0 +1,166 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional mappingMode = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..f71aa334 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum BIND_ALL = + new EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum( + Value.BIND_ALL, "bind_all"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum USE_MAP = + new EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BIND_ALL: + return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "bind_all": + return BIND_ALL; + case "use_map": + return USE_MAP; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BIND_ALL, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBindAll(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings.java new file mode 100644 index 00000000..33abd9a0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce(EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..759ee090 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum(Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum(Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum DISABLED = + new EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum(Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum valueOf(String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..b7a40364 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum.java @@ -0,0 +1,110 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsDpopSigningAlgEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..c03d4e1e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedObject0OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..8ef66646 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,155 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS512 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum ES384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum PS384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum ES256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum PS256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum(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 + EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata.java new file mode 100644 index 00000000..2a82a80d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionDeletedObject0OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..c31b145f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum.java @@ -0,0 +1,88 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum(Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsSchemaVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..7d3a6548 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..db2bc778 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..ec8c01dd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,153 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum RS512 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum PS384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum PS256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum RS384 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum RS256 = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..36e85b11 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum ISSUER = + new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum.java new file mode 100644 index 00000000..68837e93 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum.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 EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum { + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum FRONT_CHANNEL = + new EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum(Value.FRONT_CHANNEL, "front_channel"); + + public static final EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum(Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum(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 EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FRONT_CHANNEL: + return visitor.visitFrontChannel(); + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum valueOf(String value) { + switch (value) { + case "front_channel": + return FRONT_CHANNEL; + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionDeletedObject0OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + FRONT_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitFrontChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0StrategyEnum.java new file mode 100644 index 00000000..e5c8d30a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject0StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject0StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject0StrategyEnum OIDC = + new EventStreamCloudEventConnectionDeletedObject0StrategyEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject0StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject0StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject0StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject0StrategyEnum valueOf(String value) { + switch (value) { + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionDeletedObject0StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1.java new file mode 100644 index 00000000..faed49ce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject1.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject1StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject1StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject1StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1 + && equalTo((EventStreamCloudEventConnectionDeletedObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject1StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject1Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject1Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject1Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject1StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject1 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject1StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject1Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject1Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject1Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject1 build() { + return new EventStreamCloudEventConnectionDeletedObject1( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject1Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1Authentication.java new file mode 100644 index 00000000..27c4cf7d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject1Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject1Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject1Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject1Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject1Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject1Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject1Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts.java new file mode 100644 index 00000000..ddd38282 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject1ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject1Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1Metadata.java new file mode 100644 index 00000000..11672d61 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject1Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject1Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject1Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject1Metadata(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/EventStreamCloudEventConnectionDeletedObject1Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1Options.java new file mode 100644 index 00000000..9eacbbf8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1Options.java @@ -0,0 +1,1286 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject1Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional connectionSettings; + + private final Optional> domainAliases; + + private final Optional dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional domain; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional domain, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.domain = domain; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1Options + && equalTo((EventStreamCloudEventConnectionDeletedObject1Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && domain.equals(other.domain) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.domain, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedObject1Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject1Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion(EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap attributeMap); + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional dpopSigningAlg = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional connectionSettings = + Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject1Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + domain(other.getDomain()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap(EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata(EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject1Options build() { + return new EventStreamCloudEventConnectionDeletedObject1Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + domain, + type, + 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/EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap.java new file mode 100644 index 00000000..a14bb7bc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap.java @@ -0,0 +1,166 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional mappingMode = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..c8f7309e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum USE_MAP = + new EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum BASIC_PROFILE = + new EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum( + Value.BASIC_PROFILE, "basic_profile"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USE_MAP: + return visitor.visitUseMap(); + case BASIC_PROFILE: + return visitor.visitBasicProfile(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "use_map": + return USE_MAP; + case "basic_profile": + return BASIC_PROFILE; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BASIC_PROFILE, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBasicProfile(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings.java new file mode 100644 index 00000000..97b63837 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce(EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..b03b2ca8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum(Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum(Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum DISABLED = + new EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum(Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum valueOf(String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..a04f3bf2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum.java @@ -0,0 +1,110 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsDpopSigningAlgEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..82aaa110 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedObject1OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..0d654431 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,155 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS512 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum ES384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum PS384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum ES256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum PS256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum(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 + EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata.java new file mode 100644 index 00000000..2c671655 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionDeletedObject1OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..ce4014d7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum.java @@ -0,0 +1,88 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum(Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsSchemaVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..bc91bed9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..675a8ce1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..1fefbdcc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,153 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum RS512 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum PS384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum PS256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum RS384 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum RS256 = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..3f4a5100 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum ISSUER = + new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum.java new file mode 100644 index 00000000..d7488b65 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum { + public static final EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum(Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum(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 EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum valueOf(String value) { + switch (value) { + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionDeletedObject1OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1StrategyEnum.java new file mode 100644 index 00000000..f668f7d1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject1StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject1StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject1StrategyEnum OKTA = + new EventStreamCloudEventConnectionDeletedObject1StrategyEnum(Value.OKTA, "okta"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject1StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject1StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject1StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OKTA: + return visitor.visitOkta(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject1StrategyEnum valueOf(String value) { + switch (value) { + case "okta": + return OKTA; + default: + return new EventStreamCloudEventConnectionDeletedObject1StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OKTA, + + UNKNOWN + } + + public interface Visitor { + T visitOkta(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2.java new file mode 100644 index 00000000..1512c6c3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject2.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject2StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject2StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject2StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2 + && equalTo((EventStreamCloudEventConnectionDeletedObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject2StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject2Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject2Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject2Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject2StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject2 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject2StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject2Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject2Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject2Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject2 build() { + return new EventStreamCloudEventConnectionDeletedObject2( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject2Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2Authentication.java new file mode 100644 index 00000000..564e5b89 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject2Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject2Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject2Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject2Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject2Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject2Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts.java new file mode 100644 index 00000000..dff04fdf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject2ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject2Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2Metadata.java new file mode 100644 index 00000000..640584a3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject2Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject2Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject2Metadata(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/EventStreamCloudEventConnectionDeletedObject2Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2Options.java new file mode 100644 index 00000000..cae619ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2Options.java @@ -0,0 +1,1210 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional debug; + + private final Optional deflate; + + private final Optional destinationUrl; + + private final Optional disableFieldsMapFix; + + private final Optional disableSignout; + + private final Optional discoveryUrl; + + private final Optional> fieldsMap; + + private final Optional fieldsMapJsonRaw; + + private final Optional globalTokenRevocationJwtIss; + + private final Optional globalTokenRevocationJwtSub; + + private final Optional metadataUrl; + + private final Optional oidcMetadata; + + private final Optional recipientUrl; + + private final Optional requestTemplate; + + private final Optional signOutEndpoint; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional debug, + Optional deflate, + Optional destinationUrl, + Optional disableFieldsMapFix, + Optional disableSignout, + Optional discoveryUrl, + Optional> fieldsMap, + Optional fieldsMapJsonRaw, + Optional globalTokenRevocationJwtIss, + Optional globalTokenRevocationJwtSub, + Optional metadataUrl, + Optional oidcMetadata, + Optional recipientUrl, + Optional requestTemplate, + Optional signOutEndpoint, + Optional userIdAttribute, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.debug = debug; + this.deflate = deflate; + this.destinationUrl = destinationUrl; + this.disableFieldsMapFix = disableFieldsMapFix; + this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; + this.fieldsMap = fieldsMap; + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + this.metadataUrl = metadataUrl; + this.oidcMetadata = oidcMetadata; + this.recipientUrl = recipientUrl; + this.requestTemplate = requestTemplate; + this.signOutEndpoint = signOutEndpoint; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes. + */ + @JsonProperty("debug") + public Optional getDebug() { + return debug; + } + + /** + * @return When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. + */ + @JsonProperty("deflate") + public Optional getDeflate() { + return deflate; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("destinationUrl") + public Optional getDestinationUrl() { + return destinationUrl; + } + + /** + * @return When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled). + */ + @JsonProperty("disableFieldsMapFix") + public Optional getDisableFieldsMapFix() { + return disableFieldsMapFix; + } + + /** + * @return When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). + */ + @JsonProperty("disableSignout") + public Optional getDisableSignout() { + return disableSignout; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("fieldsMap") + public Optional> getFieldsMap() { + return fieldsMap; + } + + /** + * @return Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object. + */ + @JsonProperty("fieldsMapJsonRaw") + public Optional getFieldsMapJsonRaw() { + return fieldsMapJsonRaw; + } + + /** + * @return Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. + */ + @JsonProperty("global_token_revocation_jwt_iss") + public Optional getGlobalTokenRevocationJwtIss() { + return globalTokenRevocationJwtIss; + } + + /** + * @return Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. + */ + @JsonProperty("global_token_revocation_jwt_sub") + public Optional getGlobalTokenRevocationJwtSub() { + return globalTokenRevocationJwtSub; + } + + /** + * @return HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. + */ + @JsonProperty("metadataUrl") + public Optional getMetadataUrl() { + return metadataUrl; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("recipientUrl") + public Optional getRecipientUrl() { + return recipientUrl; + } + + /** + * @return Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template + */ + @JsonProperty("requestTemplate") + public Optional getRequestTemplate() { + return requestTemplate; + } + + /** + * @return Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. + */ + @JsonProperty("signOutEndpoint") + public Optional getSignOutEndpoint() { + return signOutEndpoint; + } + + /** + * @return Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2Options + && equalTo((EventStreamCloudEventConnectionDeletedObject2Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && debug.equals(other.debug) + && deflate.equals(other.deflate) + && destinationUrl.equals(other.destinationUrl) + && disableFieldsMapFix.equals(other.disableFieldsMapFix) + && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) + && fieldsMap.equals(other.fieldsMap) + && fieldsMapJsonRaw.equals(other.fieldsMapJsonRaw) + && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) + && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) + && metadataUrl.equals(other.metadataUrl) + && oidcMetadata.equals(other.oidcMetadata) + && recipientUrl.equals(other.recipientUrl) + && requestTemplate.equals(other.requestTemplate) + && signOutEndpoint.equals(other.signOutEndpoint) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.debug, + this.deflate, + this.destinationUrl, + this.disableFieldsMapFix, + this.disableSignout, + this.discoveryUrl, + this.fieldsMap, + this.fieldsMapJsonRaw, + this.globalTokenRevocationJwtIss, + this.globalTokenRevocationJwtSub, + this.metadataUrl, + this.oidcMetadata, + this.recipientUrl, + this.requestTemplate, + this.signOutEndpoint, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional + assertionDecryptionSettings = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional digestAlgorithm = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional protocolBinding = + Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional subject = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional debug = Optional.empty(); + + private Optional deflate = Optional.empty(); + + private Optional destinationUrl = Optional.empty(); + + private Optional disableFieldsMapFix = Optional.empty(); + + private Optional disableSignout = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional> fieldsMap = Optional.empty(); + + private Optional fieldsMapJsonRaw = Optional.empty(); + + private Optional globalTokenRevocationJwtIss = Optional.empty(); + + private Optional globalTokenRevocationJwtSub = Optional.empty(); + + private Optional metadataUrl = Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional recipientUrl = Optional.empty(); + + private Optional requestTemplate = Optional.empty(); + + private Optional signOutEndpoint = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject2Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + debug(other.getDebug()); + deflate(other.getDeflate()); + destinationUrl(other.getDestinationUrl()); + disableFieldsMapFix(other.getDisableFieldsMapFix()); + disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); + fieldsMap(other.getFieldsMap()); + fieldsMapJsonRaw(other.getFieldsMapJsonRaw()); + globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); + globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); + metadataUrl(other.getMetadataUrl()); + oidcMetadata(other.getOidcMetadata()); + recipientUrl(other.getRecipientUrl()); + requestTemplate(other.getRequestTemplate()); + signOutEndpoint(other.getSignOutEndpoint()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings( + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public Builder cert(Optional cert) { + this.cert = cert; + return this; + } + + public Builder cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public Builder digestAlgorithm( + Optional digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + public Builder digestAlgorithm( + EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public Builder expires(Optional expires) { + this.expires = expires; + return this; + } + + public Builder expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public Builder idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + public Builder idpinitiated(EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public Builder protocolBinding( + Optional protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + public Builder protocolBinding( + EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public Builder signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + public Builder signatureAlgorithm( + EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public Builder signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + public Builder signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public Builder signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + public Builder signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public Builder subject(Optional subject) { + this.subject = subject; + return this; + } + + public Builder subject(EventStreamCloudEventConnectionDeletedObject2OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes.

                                                              + */ + @JsonSetter(value = "debug", nulls = Nulls.SKIP) + public Builder debug(Optional debug) { + this.debug = debug; + return this; + } + + public Builder debug(Boolean debug) { + this.debug = Optional.ofNullable(debug); + return this; + } + + /** + *

                                                              When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding.

                                                              + */ + @JsonSetter(value = "deflate", nulls = Nulls.SKIP) + public Builder deflate(Optional deflate) { + this.deflate = deflate; + return this; + } + + public Builder deflate(Boolean deflate) { + this.deflate = Optional.ofNullable(deflate); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "destinationUrl", nulls = Nulls.SKIP) + public Builder destinationUrl(Optional destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + public Builder destinationUrl(String destinationUrl) { + this.destinationUrl = Optional.ofNullable(destinationUrl); + return this; + } + + /** + *

                                                              When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled).

                                                              + */ + @JsonSetter(value = "disableFieldsMapFix", nulls = Nulls.SKIP) + public Builder disableFieldsMapFix(Optional disableFieldsMapFix) { + this.disableFieldsMapFix = disableFieldsMapFix; + return this; + } + + public Builder disableFieldsMapFix(Boolean disableFieldsMapFix) { + this.disableFieldsMapFix = Optional.ofNullable(disableFieldsMapFix); + return this; + } + + /** + *

                                                              When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled).

                                                              + */ + @JsonSetter(value = "disableSignout", nulls = Nulls.SKIP) + public Builder disableSignout(Optional disableSignout) { + this.disableSignout = disableSignout; + return this; + } + + public Builder disableSignout(Boolean disableSignout) { + this.disableSignout = Optional.ofNullable(disableSignout); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access.

                                                              + */ + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) + public Builder fieldsMap(Optional> fieldsMap) { + this.fieldsMap = fieldsMap; + return this; + } + + public Builder fieldsMap(Map fieldsMap) { + this.fieldsMap = Optional.ofNullable(fieldsMap); + return this; + } + + /** + *

                                                              Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object.

                                                              + */ + @JsonSetter(value = "fieldsMapJsonRaw", nulls = Nulls.SKIP) + public Builder fieldsMapJsonRaw(Optional fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + return this; + } + + public Builder fieldsMapJsonRaw(String fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = Optional.ofNullable(fieldsMapJsonRaw); + return this; + } + + /** + *

                                                              Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_iss", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtIss(Optional globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + return this; + } + + public Builder globalTokenRevocationJwtIss(String globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = Optional.ofNullable(globalTokenRevocationJwtIss); + return this; + } + + /** + *

                                                              Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_sub", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtSub(Optional globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + return this; + } + + public Builder globalTokenRevocationJwtSub(String globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = Optional.ofNullable(globalTokenRevocationJwtSub); + return this; + } + + /** + *

                                                              HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both.

                                                              + */ + @JsonSetter(value = "metadataUrl", nulls = Nulls.SKIP) + public Builder metadataUrl(Optional metadataUrl) { + this.metadataUrl = metadataUrl; + return this; + } + + public Builder metadataUrl(String metadataUrl) { + this.metadataUrl = Optional.ofNullable(metadataUrl); + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata(EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) + public Builder recipientUrl(Optional recipientUrl) { + this.recipientUrl = recipientUrl; + return this; + } + + public Builder recipientUrl(String recipientUrl) { + this.recipientUrl = Optional.ofNullable(recipientUrl); + return this; + } + + /** + *

                                                              Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template

                                                              + */ + @JsonSetter(value = "requestTemplate", nulls = Nulls.SKIP) + public Builder requestTemplate(Optional requestTemplate) { + this.requestTemplate = requestTemplate; + return this; + } + + public Builder requestTemplate(String requestTemplate) { + this.requestTemplate = Optional.ofNullable(requestTemplate); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false.

                                                              + */ + @JsonSetter(value = "signOutEndpoint", nulls = Nulls.SKIP) + public Builder signOutEndpoint(Optional signOutEndpoint) { + this.signOutEndpoint = signOutEndpoint; + return this; + } + + public Builder signOutEndpoint(String signOutEndpoint) { + this.signOutEndpoint = Optional.ofNullable(signOutEndpoint); + return this; + } + + /** + *

                                                              Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject2Options build() { + return new EventStreamCloudEventConnectionDeletedObject2Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + debug, + deflate, + destinationUrl, + disableFieldsMapFix, + disableSignout, + discoveryUrl, + fieldsMap, + fieldsMapJsonRaw, + globalTokenRevocationJwtIss, + globalTokenRevocationJwtSub, + metadataUrl, + oidcMetadata, + recipientUrl, + requestTemplate, + signOutEndpoint, + userIdAttribute, + 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/EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..871aba58 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings.java @@ -0,0 +1,178 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..7b2cf253 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionDeletedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..4870408d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum.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 EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum valueOf(String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionDeletedObject2OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated.java new file mode 100644 index 00000000..e1b22249 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..1dc322a6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,104 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum WSFED = + new EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum SAMLP = + new EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum OIDC = + new EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum(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 EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionDeletedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata.java new file mode 100644 index 00000000..b9aa43d0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionDeletedObject2OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..abc02369 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum.java @@ -0,0 +1,95 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum valueOf(String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionDeletedObject2OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..49053668 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject2OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..90eba215 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum(Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum valueOf(String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionDeletedObject2OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSubject.java new file mode 100644 index 00000000..5334bc9d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2OptionsSubject.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject2OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject2OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject2OptionsSubject(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject2OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject2OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject2OptionsSubject build() { + return new EventStreamCloudEventConnectionDeletedObject2OptionsSubject(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/EventStreamCloudEventConnectionDeletedObject2StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2StrategyEnum.java new file mode 100644 index 00000000..3495bc8e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject2StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject2StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject2StrategyEnum SAMLP = + new EventStreamCloudEventConnectionDeletedObject2StrategyEnum(Value.SAMLP, "samlp"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject2StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject2StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject2StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SAMLP: + return visitor.visitSamlp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject2StrategyEnum valueOf(String value) { + switch (value) { + case "samlp": + return SAMLP; + default: + return new EventStreamCloudEventConnectionDeletedObject2StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3.java new file mode 100644 index 00000000..205a6cb8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject3.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject3StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject3StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject3StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3 + && equalTo((EventStreamCloudEventConnectionDeletedObject3) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject3 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject3 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject3StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject3 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject3Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject3Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject3Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject3StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject3 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject3StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject3Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject3Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject3Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject3 build() { + return new EventStreamCloudEventConnectionDeletedObject3( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject3Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3Authentication.java new file mode 100644 index 00000000..045d9cf6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject3Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject3Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject3Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject3Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject3Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject3Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject3Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject3Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts.java new file mode 100644 index 00000000..48ea4a67 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject3ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject3Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3Metadata.java new file mode 100644 index 00000000..cd8ea9b5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject3Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject3Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject3Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject3Metadata(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/EventStreamCloudEventConnectionDeletedObject3Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3Options.java new file mode 100644 index 00000000..8d88f016 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3Options.java @@ -0,0 +1,979 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionDeletedObject3Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final String pingFederateBaseUrl; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + String pingFederateBaseUrl, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.pingFederateBaseUrl = pingFederateBaseUrl; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return URL provided by PingFederate which returns information used for creating the connection + */ + @JsonProperty("pingFederateBaseUrl") + public String getPingFederateBaseUrl() { + return pingFederateBaseUrl; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3Options + && equalTo((EventStreamCloudEventConnectionDeletedObject3Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject3Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && pingFederateBaseUrl.equals(other.pingFederateBaseUrl); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.pingFederateBaseUrl); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PingFederateBaseUrlStage builder() { + return new Builder(); + } + + public interface PingFederateBaseUrlStage { + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + */ + _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); + + Builder from(EventStreamCloudEventConnectionDeletedObject3Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject3Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings); + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + _FinalStage cert(Optional cert); + + _FinalStage cert(String cert); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + _FinalStage digestAlgorithm( + Optional digestAlgorithm); + + _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum digestAlgorithm); + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + _FinalStage entityId(Optional entityId); + + _FinalStage entityId(String entityId); + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + _FinalStage expires(Optional expires); + + _FinalStage expires(OffsetDateTime expires); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage idpinitiated( + Optional idpinitiated); + + _FinalStage idpinitiated(EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated idpinitiated); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage protocolBinding( + Optional protocolBinding); + + _FinalStage protocolBinding( + EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum protocolBinding); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum setUserRootAttributes); + + _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm); + + _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum signatureAlgorithm); + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + _FinalStage signInEndpoint(Optional signInEndpoint); + + _FinalStage signInEndpoint(String signInEndpoint); + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + _FinalStage signingCert(Optional signingCert); + + _FinalStage signingCert(String signingCert); + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + _FinalStage signSamlRequest(Optional signSamlRequest); + + _FinalStage signSamlRequest(Boolean signSamlRequest); + + _FinalStage subject(Optional subject); + + _FinalStage subject(EventStreamCloudEventConnectionDeletedObject3OptionsSubject subject); + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { + private String pingFederateBaseUrl; + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional subject = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional protocolBinding = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional digestAlgorithm = + Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional + assertionDecryptionSettings = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject3Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + pingFederateBaseUrl(other.getPingFederateBaseUrl()); + return this; + } + + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("pingFederateBaseUrl") + public _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl) { + this.pingFederateBaseUrl = + Objects.requireNonNull(pingFederateBaseUrl, "pingFederateBaseUrl must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage subject(EventStreamCloudEventConnectionDeletedObject3OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public _FinalStage subject(Optional subject) { + this.subject = subject; + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public _FinalStage signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public _FinalStage signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public _FinalStage signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + @java.lang.Override + public _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + @java.lang.Override + public _FinalStage protocolBinding( + EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public _FinalStage protocolBinding( + Optional protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + @java.lang.Override + public _FinalStage idpinitiated(EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + @java.lang.Override + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public _FinalStage idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public _FinalStage expires(Optional expires) { + this.expires = expires; + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public _FinalStage entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public _FinalStage digestAlgorithm( + Optional digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public _FinalStage cert(Optional cert) { + this.cert = cert; + return this; + } + + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject3Options build() { + return new EventStreamCloudEventConnectionDeletedObject3Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + pingFederateBaseUrl, + 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/EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..b354f806 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings.java @@ -0,0 +1,178 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..f63325d0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionDeletedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..7e81d5aa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum.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 EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum valueOf(String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionDeletedObject3OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated.java new file mode 100644 index 00000000..b39a8bfe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..101516fe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,104 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum WSFED = + new EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum SAMLP = + new EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum OIDC = + new EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum(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 EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionDeletedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..5de0aa20 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum.java @@ -0,0 +1,95 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum valueOf(String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionDeletedObject3OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..d3f5ef73 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject3OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..8503b7ce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum(Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum valueOf(String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionDeletedObject3OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSubject.java new file mode 100644 index 00000000..e9ba608b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3OptionsSubject.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject3OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject3OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject3OptionsSubject(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject3OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject3OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject3OptionsSubject build() { + return new EventStreamCloudEventConnectionDeletedObject3OptionsSubject(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/EventStreamCloudEventConnectionDeletedObject3StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3StrategyEnum.java new file mode 100644 index 00000000..a582b2e0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject3StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject3StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject3StrategyEnum PINGFEDERATE = + new EventStreamCloudEventConnectionDeletedObject3StrategyEnum(Value.PINGFEDERATE, "pingfederate"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject3StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject3StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject3StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject3StrategyEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + default: + return new EventStreamCloudEventConnectionDeletedObject3StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4.java new file mode 100644 index 00000000..35666037 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject4.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject4 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject4StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject4( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject4StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject4StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject4 + && equalTo((EventStreamCloudEventConnectionDeletedObject4) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject4 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject4 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject4StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject4 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject4Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject4Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject4Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject4StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject4 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject4StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject4Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject4Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject4Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject4 build() { + return new EventStreamCloudEventConnectionDeletedObject4( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject4Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4Authentication.java new file mode 100644 index 00000000..67b443a3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject4Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject4Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject4Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject4Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject4Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject4Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject4Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject4Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject4Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject4Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject4Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts.java new file mode 100644 index 00000000..bd71b87c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject4ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject4Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4Metadata.java new file mode 100644 index 00000000..9845b38d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject4Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject4Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject4Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject4Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject4Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject4Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject4Metadata(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/EventStreamCloudEventConnectionDeletedObject4Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4Options.java new file mode 100644 index 00000000..a8c53116 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4Options.java @@ -0,0 +1,564 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject4Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject4Options { + private final Optional adfsServer; + + private final Optional certRolloverNotification; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional fedMetadataXml; + + private final Optional iconUrl; + + private final Optional> nonPersistentAttrs; + + private final Optional> prevThumbprints; + + private final Optional + setUserRootAttributes; + + private final Optional + shouldTrustEmailVerifiedConnection; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject4Options( + Optional adfsServer, + Optional certRolloverNotification, + Optional> domainAliases, + Optional entityId, + Optional fedMetadataXml, + Optional iconUrl, + Optional> nonPersistentAttrs, + Optional> prevThumbprints, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional userIdAttribute, + Map additionalProperties) { + this.adfsServer = adfsServer; + this.certRolloverNotification = certRolloverNotification; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.fedMetadataXml = fedMetadataXml; + this.iconUrl = iconUrl; + this.nonPersistentAttrs = nonPersistentAttrs; + this.prevThumbprints = prevThumbprints; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + /** + * @return ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. + */ + @JsonProperty("adfs_server") + public Optional getAdfsServer() { + return adfsServer; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. + */ + @JsonProperty("fedMetadataXml") + public Optional getFedMetadataXml() { + return fedMetadataXml; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("prev_thumbprints") + public Optional> getPrevThumbprints() { + return prevThumbprints; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + /** + * @return Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject4Options + && equalTo((EventStreamCloudEventConnectionDeletedObject4Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject4Options other) { + return adfsServer.equals(other.adfsServer) + && certRolloverNotification.equals(other.certRolloverNotification) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && fedMetadataXml.equals(other.fedMetadataXml) + && iconUrl.equals(other.iconUrl) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && prevThumbprints.equals(other.prevThumbprints) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adfsServer, + this.certRolloverNotification, + this.domainAliases, + this.entityId, + this.fedMetadataXml, + this.iconUrl, + this.nonPersistentAttrs, + this.prevThumbprints, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional adfsServer = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional fedMetadataXml = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional> prevThumbprints = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject4Options other) { + adfsServer(other.getAdfsServer()); + certRolloverNotification(other.getCertRolloverNotification()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + fedMetadataXml(other.getFedMetadataXml()); + iconUrl(other.getIconUrl()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + prevThumbprints(other.getPrevThumbprints()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + /** + *

                                                              ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent.

                                                              + */ + @JsonSetter(value = "adfs_server", nulls = Nulls.SKIP) + public Builder adfsServer(Optional adfsServer) { + this.adfsServer = adfsServer; + return this; + } + + public Builder adfsServer(String adfsServer) { + this.adfsServer = Optional.ofNullable(adfsServer); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'.

                                                              + */ + @JsonSetter(value = "fedMetadataXml", nulls = Nulls.SKIP) + public Builder fedMetadataXml(Optional fedMetadataXml) { + this.fedMetadataXml = fedMetadataXml; + return this; + } + + public Builder fedMetadataXml(String fedMetadataXml) { + this.fedMetadataXml = Optional.ofNullable(fedMetadataXml); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "prev_thumbprints", nulls = Nulls.SKIP) + public Builder prevThumbprints(Optional> prevThumbprints) { + this.prevThumbprints = prevThumbprints; + return this; + } + + public Builder prevThumbprints(List prevThumbprints) { + this.prevThumbprints = Optional.ofNullable(prevThumbprints); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public Builder shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + public Builder shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + /** + *

                                                              Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject4Options build() { + return new EventStreamCloudEventConnectionDeletedObject4Options( + adfsServer, + certRolloverNotification, + domainAliases, + entityId, + fedMetadataXml, + iconUrl, + nonPersistentAttrs, + prevThumbprints, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + userIdAttribute, + 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/EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..53c9c1ce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject4OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..fbee8844 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum valueOf( + String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionDeletedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4StrategyEnum.java new file mode 100644 index 00000000..cd59a31d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject4StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject4StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject4StrategyEnum ADFS = + new EventStreamCloudEventConnectionDeletedObject4StrategyEnum(Value.ADFS, "adfs"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject4StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject4StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject4StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADFS: + return visitor.visitAdfs(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject4StrategyEnum valueOf(String value) { + switch (value) { + case "adfs": + return ADFS; + default: + return new EventStreamCloudEventConnectionDeletedObject4StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADFS, + + UNKNOWN + } + + public interface Visitor { + T visitAdfs(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5.java new file mode 100644 index 00000000..d9da5e94 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5.java @@ -0,0 +1,513 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject5.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject5 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final EventStreamCloudEventConnectionDeletedObject5StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject5( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + EventStreamCloudEventConnectionDeletedObject5StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject5StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject5 + && equalTo((EventStreamCloudEventConnectionDeletedObject5) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject5 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject5 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject5StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject5 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject5Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject5Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject5Options options); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject5StrategyEnum strategy; + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject5 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject5StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject5Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject5Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject5Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject5 build() { + return new EventStreamCloudEventConnectionDeletedObject5( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject5Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5Authentication.java new file mode 100644 index 00000000..c1137d47 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject5Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject5Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject5Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject5Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject5Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject5Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject5Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject5Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject5Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject5Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject5Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts.java new file mode 100644 index 00000000..198d1a70 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject5ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject5Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5Metadata.java new file mode 100644 index 00000000..71f3f57a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject5Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject5Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject5Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject5Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject5Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject5Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject5Metadata(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/EventStreamCloudEventConnectionDeletedObject5Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5Options.java new file mode 100644 index 00000000..5bcffb82 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5Options.java @@ -0,0 +1,689 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject5Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject5Options { + private final Optional agentIp; + + private final Optional agentMode; + + private final Optional agentVersion; + + private final Optional bruteForceProtection; + + private final Optional certAuth; + + private final Optional> certs; + + private final Optional disableCache; + + private final Optional disableSelfServiceChangePassword; + + private final Optional> domainAliases; + + private final Optional iconUrl; + + private final Optional> ips; + + private final Optional kerberos; + + private final Optional kerberosOnly; + + private final Optional> nonPersistentAttrs; + + private final Optional + setUserRootAttributes; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject5Options( + Optional agentIp, + Optional agentMode, + Optional agentVersion, + Optional bruteForceProtection, + Optional certAuth, + Optional> certs, + Optional disableCache, + Optional disableSelfServiceChangePassword, + Optional> domainAliases, + Optional iconUrl, + Optional> ips, + Optional kerberos, + Optional kerberosOnly, + Optional> nonPersistentAttrs, + Optional + setUserRootAttributes, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Map additionalProperties) { + this.agentIp = agentIp; + this.agentMode = agentMode; + this.agentVersion = agentVersion; + this.bruteForceProtection = bruteForceProtection; + this.certAuth = certAuth; + this.certs = certs; + this.disableCache = disableCache; + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + this.domainAliases = domainAliases; + this.iconUrl = iconUrl; + this.ips = ips; + this.kerberos = kerberos; + this.kerberosOnly = kerberosOnly; + this.nonPersistentAttrs = nonPersistentAttrs; + this.setUserRootAttributes = setUserRootAttributes; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ + @JsonProperty("agentIP") + public Optional getAgentIp() { + return agentIp; + } + + /** + * @return When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ + @JsonProperty("agentMode") + public Optional getAgentMode() { + return agentMode; + } + + /** + * @return Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ + @JsonProperty("agentVersion") + public Optional getAgentVersion() { + return agentVersion; + } + + /** + * @return Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. + */ + @JsonProperty("brute_force_protection") + public Optional getBruteForceProtection() { + return bruteForceProtection; + } + + /** + * @return Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint + */ + @JsonProperty("certAuth") + public Optional getCertAuth() { + return certAuth; + } + + /** + * @return Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ + @JsonProperty("certs") + public Optional> getCerts() { + return certs; + } + + /** + * @return When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory + */ + @JsonProperty("disable_cache") + public Optional getDisableCache() { + return disableCache; + } + + /** + * @return When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets + */ + @JsonProperty("disable_self_service_change_password") + public Optional getDisableSelfServiceChangePassword() { + return disableSelfServiceChangePassword; + } + + /** + * @return List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ + @JsonProperty("ips") + public Optional> getIps() { + return ips; + } + + /** + * @return Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges + */ + @JsonProperty("kerberos") + public Optional getKerberos() { + return kerberos; + } + + /** + * @return When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback. + */ + @JsonProperty("kerberos_only") + public Optional getKerberosOnly() { + return kerberosOnly; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Primary AD domain hint used for HRD and discovery. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject5Options + && equalTo((EventStreamCloudEventConnectionDeletedObject5Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject5Options other) { + return agentIp.equals(other.agentIp) + && agentMode.equals(other.agentMode) + && agentVersion.equals(other.agentVersion) + && bruteForceProtection.equals(other.bruteForceProtection) + && certAuth.equals(other.certAuth) + && certs.equals(other.certs) + && disableCache.equals(other.disableCache) + && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) + && domainAliases.equals(other.domainAliases) + && iconUrl.equals(other.iconUrl) + && ips.equals(other.ips) + && kerberos.equals(other.kerberos) + && kerberosOnly.equals(other.kerberosOnly) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentIp, + this.agentMode, + this.agentVersion, + this.bruteForceProtection, + this.certAuth, + this.certs, + this.disableCache, + this.disableSelfServiceChangePassword, + this.domainAliases, + this.iconUrl, + this.ips, + this.kerberos, + this.kerberosOnly, + this.nonPersistentAttrs, + this.setUserRootAttributes, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional agentIp = Optional.empty(); + + private Optional agentMode = Optional.empty(); + + private Optional agentVersion = Optional.empty(); + + private Optional bruteForceProtection = Optional.empty(); + + private Optional certAuth = Optional.empty(); + + private Optional> certs = Optional.empty(); + + private Optional disableCache = Optional.empty(); + + private Optional disableSelfServiceChangePassword = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> ips = Optional.empty(); + + private Optional kerberos = Optional.empty(); + + private Optional kerberosOnly = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject5Options other) { + agentIp(other.getAgentIp()); + agentMode(other.getAgentMode()); + agentVersion(other.getAgentVersion()); + bruteForceProtection(other.getBruteForceProtection()); + certAuth(other.getCertAuth()); + certs(other.getCerts()); + disableCache(other.getDisableCache()); + disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); + domainAliases(other.getDomainAliases()); + iconUrl(other.getIconUrl()); + ips(other.getIps()); + kerberos(other.getKerberos()); + kerberosOnly(other.getKerberosOnly()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentIP", nulls = Nulls.SKIP) + public Builder agentIp(Optional agentIp) { + this.agentIp = agentIp; + return this; + } + + public Builder agentIp(String agentIp) { + this.agentIp = Optional.ofNullable(agentIp); + return this; + } + + /** + *

                                                              When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentMode", nulls = Nulls.SKIP) + public Builder agentMode(Optional agentMode) { + this.agentMode = agentMode; + return this; + } + + public Builder agentMode(Boolean agentMode) { + this.agentMode = Optional.ofNullable(agentMode); + return this; + } + + /** + *

                                                              Version identifier of the installed AD connector agent software (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentVersion", nulls = Nulls.SKIP) + public Builder agentVersion(Optional agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + public Builder agentVersion(String agentVersion) { + this.agentVersion = Optional.ofNullable(agentVersion); + return this; + } + + /** + *

                                                              Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.

                                                              + */ + @JsonSetter(value = "brute_force_protection", nulls = Nulls.SKIP) + public Builder bruteForceProtection(Optional bruteForceProtection) { + this.bruteForceProtection = bruteForceProtection; + return this; + } + + public Builder bruteForceProtection(Boolean bruteForceProtection) { + this.bruteForceProtection = Optional.ofNullable(bruteForceProtection); + return this; + } + + /** + *

                                                              Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint

                                                              + */ + @JsonSetter(value = "certAuth", nulls = Nulls.SKIP) + public Builder certAuth(Optional certAuth) { + this.certAuth = certAuth; + return this; + } + + public Builder certAuth(Boolean certAuth) { + this.certAuth = Optional.ofNullable(certAuth); + return this; + } + + /** + *

                                                              Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "certs", nulls = Nulls.SKIP) + public Builder certs(Optional> certs) { + this.certs = certs; + return this; + } + + public Builder certs(List certs) { + this.certs = Optional.ofNullable(certs); + return this; + } + + /** + *

                                                              When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory

                                                              + */ + @JsonSetter(value = "disable_cache", nulls = Nulls.SKIP) + public Builder disableCache(Optional disableCache) { + this.disableCache = disableCache; + return this; + } + + public Builder disableCache(Boolean disableCache) { + this.disableCache = Optional.ofNullable(disableCache); + return this; + } + + /** + *

                                                              When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets

                                                              + */ + @JsonSetter(value = "disable_self_service_change_password", nulls = Nulls.SKIP) + public Builder disableSelfServiceChangePassword(Optional disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + return this; + } + + public Builder disableSelfServiceChangePassword(Boolean disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = Optional.ofNullable(disableSelfServiceChangePassword); + return this; + } + + /** + *

                                                              List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.

                                                              + */ + @JsonSetter(value = "ips", nulls = Nulls.SKIP) + public Builder ips(Optional> ips) { + this.ips = ips; + return this; + } + + public Builder ips(List ips) { + this.ips = Optional.ofNullable(ips); + return this; + } + + /** + *

                                                              Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges

                                                              + */ + @JsonSetter(value = "kerberos", nulls = Nulls.SKIP) + public Builder kerberos(Optional kerberos) { + this.kerberos = kerberos; + return this; + } + + public Builder kerberos(Boolean kerberos) { + this.kerberos = Optional.ofNullable(kerberos); + return this; + } + + /** + *

                                                              When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback.

                                                              + */ + @JsonSetter(value = "kerberos_only", nulls = Nulls.SKIP) + public Builder kerberosOnly(Optional kerberosOnly) { + this.kerberosOnly = kerberosOnly; + return this; + } + + public Builder kerberosOnly(Boolean kerberosOnly) { + this.kerberosOnly = Optional.ofNullable(kerberosOnly); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + /** + *

                                                              The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Primary AD domain hint used for HRD and discovery.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + public EventStreamCloudEventConnectionDeletedObject5Options build() { + return new EventStreamCloudEventConnectionDeletedObject5Options( + agentIp, + agentMode, + agentVersion, + bruteForceProtection, + certAuth, + certs, + disableCache, + disableSelfServiceChangePassword, + domainAliases, + iconUrl, + ips, + kerberos, + kerberosOnly, + nonPersistentAttrs, + setUserRootAttributes, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + 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/EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..92898fee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject5OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5StrategyEnum.java new file mode 100644 index 00000000..720d6e24 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject5StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject5StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject5StrategyEnum AD = + new EventStreamCloudEventConnectionDeletedObject5StrategyEnum(Value.AD, "ad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject5StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject5StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject5StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject5StrategyEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + default: + return new EventStreamCloudEventConnectionDeletedObject5StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6.java new file mode 100644 index 00000000..8593acc8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject6.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject6 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject6StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject6( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject6StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject6StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject6 + && equalTo((EventStreamCloudEventConnectionDeletedObject6) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject6 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject6 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject6StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject6 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject6Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject6Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject6Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject6StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject6 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject6StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject6Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject6Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject6Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject6 build() { + return new EventStreamCloudEventConnectionDeletedObject6( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject6Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6Authentication.java new file mode 100644 index 00000000..3b7995c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject6Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject6Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject6Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject6Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject6Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject6Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject6Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject6Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject6Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject6Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject6Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts.java new file mode 100644 index 00000000..6db0e020 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject6ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject6Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6Metadata.java new file mode 100644 index 00000000..768131cf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject6Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject6Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject6Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject6Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject6Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject6Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject6Metadata(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/EventStreamCloudEventConnectionDeletedObject6Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6Options.java new file mode 100644 index 00000000..88101ea9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6Options.java @@ -0,0 +1,1111 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionDeletedObject6Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject6Options { + private final Optional adminAccessTokenExpiresin; + + private final Optional allowSettingLoginScopes; + + private final Optional apiEnableGroups; + + private final Optional apiEnableUsers; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional email; + + private final Optional extAgreedTerms; + + private final Optional extGroups; + + private final Optional extGroupsExtended; + + private final Optional extIsAdmin; + + private final Optional extIsSuspended; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional handleLoginFromSocial; + + private final Optional iconUrl; + + private final Optional mapUserIdToId; + + private final Optional> nonPersistentAttrs; + + private final Optional profile; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject6Options( + Optional adminAccessTokenExpiresin, + Optional allowSettingLoginScopes, + Optional apiEnableGroups, + Optional apiEnableUsers, + String clientId, + Optional domain, + Optional> domainAliases, + Optional email, + Optional extAgreedTerms, + Optional extGroups, + Optional extGroupsExtended, + Optional extIsAdmin, + Optional extIsSuspended, + Optional + federatedConnectionsAccessTokens, + Optional handleLoginFromSocial, + Optional iconUrl, + Optional mapUserIdToId, + Optional> nonPersistentAttrs, + Optional profile, + Optional> scope, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional> upstreamParams, + Map additionalProperties) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; + this.apiEnableUsers = apiEnableUsers; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.email = email; + this.extAgreedTerms = extAgreedTerms; + this.extGroups = extGroups; + this.extGroupsExtended = extGroupsExtended; + this.extIsAdmin = extIsAdmin; + this.extIsSuspended = extIsSuspended; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.handleLoginFromSocial = handleLoginFromSocial; + this.iconUrl = iconUrl; + this.mapUserIdToId = mapUserIdToId; + this.nonPersistentAttrs = nonPersistentAttrs; + this.profile = profile; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. + */ + @JsonProperty("admin_access_token_expiresin") + public Optional getAdminAccessTokenExpiresin() { + return adminAccessTokenExpiresin; + } + + /** + * @return When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. + */ + @JsonProperty("allow_setting_login_scopes") + public Optional getAllowSettingLoginScopes() { + return allowSettingLoginScopes; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false. + */ + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Primary Google Workspace domain name that users must belong to. + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return Whether the OAuth flow requests the email scope. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Fetches the agreedToTerms flag from the Google Directory profile. + */ + @JsonProperty("ext_agreed_terms") + public Optional getExtAgreedTerms() { + return extAgreedTerms; + } + + /** + * @return Enables enrichment with Google group memberships (required for ext_groups_extended). + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true. + */ + @JsonProperty("ext_groups_extended") + public Optional getExtGroupsExtended() { + return extGroupsExtended; + } + + /** + * @return Fetches the Google Directory admin flag for the signing-in user. + */ + @JsonProperty("ext_is_admin") + public Optional getExtIsAdmin() { + return extIsAdmin; + } + + /** + * @return Fetches the Google Directory suspended flag for the signing-in user. + */ + @JsonProperty("ext_is_suspended") + public Optional getExtIsSuspended() { + return extIsSuspended; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. + */ + @JsonProperty("handle_login_from_social") + public Optional getHandleLoginFromSocial() { + return handleLoginFromSocial; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. + */ + @JsonProperty("map_user_id_to_id") + public Optional getMapUserIdToId() { + return mapUserIdToId; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Whether the OAuth flow requests the profile scope. + */ + @JsonProperty("profile") + public Optional getProfile() { + return profile; + } + + /** + * @return Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The Google Workspace primary domain used to identify the organization during authentication. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject6Options + && equalTo((EventStreamCloudEventConnectionDeletedObject6Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject6Options other) { + return adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) + && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) + && apiEnableUsers.equals(other.apiEnableUsers) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && email.equals(other.email) + && extAgreedTerms.equals(other.extAgreedTerms) + && extGroups.equals(other.extGroups) + && extGroupsExtended.equals(other.extGroupsExtended) + && extIsAdmin.equals(other.extIsAdmin) + && extIsSuspended.equals(other.extIsSuspended) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && handleLoginFromSocial.equals(other.handleLoginFromSocial) + && iconUrl.equals(other.iconUrl) + && mapUserIdToId.equals(other.mapUserIdToId) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && profile.equals(other.profile) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adminAccessTokenExpiresin, + this.allowSettingLoginScopes, + this.apiEnableGroups, + this.apiEnableUsers, + this.clientId, + this.domain, + this.domainAliases, + this.email, + this.extAgreedTerms, + this.extGroups, + this.extGroupsExtended, + this.extIsAdmin, + this.extIsSuspended, + this.federatedConnectionsAccessTokens, + this.handleLoginFromSocial, + this.iconUrl, + this.mapUserIdToId, + this.nonPersistentAttrs, + this.profile, + this.scope, + this.setUserRootAttributes, + this.tenantDomain, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedObject6Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject6Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); + + _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes); + + _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + _FinalStage apiEnableGroups(Optional apiEnableGroups); + + _FinalStage apiEnableGroups(Boolean apiEnableGroups); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(Boolean email); + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + _FinalStage extAgreedTerms(Optional extAgreedTerms); + + _FinalStage extAgreedTerms(Boolean extAgreedTerms); + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + _FinalStage extGroupsExtended(Optional extGroupsExtended); + + _FinalStage extGroupsExtended(Boolean extGroupsExtended); + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + _FinalStage extIsAdmin(Optional extIsAdmin); + + _FinalStage extIsAdmin(Boolean extIsAdmin); + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + _FinalStage extIsSuspended(Optional extIsSuspended); + + _FinalStage extIsSuspended(Boolean extIsSuspended); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial); + + _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + _FinalStage mapUserIdToId(Optional mapUserIdToId); + + _FinalStage mapUserIdToId(Boolean mapUserIdToId); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + _FinalStage profile(Optional profile); + + _FinalStage profile(Boolean profile); + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional> upstreamParams = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional mapUserIdToId = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional handleLoginFromSocial = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extIsSuspended = Optional.empty(); + + private Optional extIsAdmin = Optional.empty(); + + private Optional extGroupsExtended = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional extAgreedTerms = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + private Optional apiEnableGroups = Optional.empty(); + + private Optional allowSettingLoginScopes = Optional.empty(); + + private Optional adminAccessTokenExpiresin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject6Options other) { + adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); + allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); + apiEnableUsers(other.getApiEnableUsers()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + email(other.getEmail()); + extAgreedTerms(other.getExtAgreedTerms()); + extGroups(other.getExtGroups()); + extGroupsExtended(other.getExtGroupsExtended()); + extIsAdmin(other.getExtIsAdmin()); + extIsSuspended(other.getExtIsSuspended()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + handleLoginFromSocial(other.getHandleLoginFromSocial()); + iconUrl(other.getIconUrl()); + mapUserIdToId(other.getMapUserIdToId()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + profile(other.getProfile()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage profile(Boolean profile) { + this.profile = Optional.ofNullable(profile); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "profile", nulls = Nulls.SKIP) + public _FinalStage profile(Optional profile) { + this.profile = profile; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage mapUserIdToId(Boolean mapUserIdToId) { + this.mapUserIdToId = Optional.ofNullable(mapUserIdToId); + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "map_user_id_to_id", nulls = Nulls.SKIP) + public _FinalStage mapUserIdToId(Optional mapUserIdToId) { + this.mapUserIdToId = mapUserIdToId; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial) { + this.handleLoginFromSocial = Optional.ofNullable(handleLoginFromSocial); + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "handle_login_from_social", nulls = Nulls.SKIP) + public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial) { + this.handleLoginFromSocial = handleLoginFromSocial; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsSuspended(Boolean extIsSuspended) { + this.extIsSuspended = Optional.ofNullable(extIsSuspended); + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) + public _FinalStage extIsSuspended(Optional extIsSuspended) { + this.extIsSuspended = extIsSuspended; + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsAdmin(Boolean extIsAdmin) { + this.extIsAdmin = Optional.ofNullable(extIsAdmin); + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_admin", nulls = Nulls.SKIP) + public _FinalStage extIsAdmin(Optional extIsAdmin) { + this.extIsAdmin = extIsAdmin; + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroupsExtended(Boolean extGroupsExtended) { + this.extGroupsExtended = Optional.ofNullable(extGroupsExtended); + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups_extended", nulls = Nulls.SKIP) + public _FinalStage extGroupsExtended(Optional extGroupsExtended) { + this.extGroupsExtended = extGroupsExtended; + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extAgreedTerms(Boolean extAgreedTerms) { + this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) + public _FinalStage extAgreedTerms(Optional extAgreedTerms) { + this.extAgreedTerms = extAgreedTerms; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(Boolean email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public _FinalStage apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes) { + this.allowSettingLoginScopes = Optional.ofNullable(allowSettingLoginScopes); + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_setting_login_scopes", nulls = Nulls.SKIP) + public _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes) { + this.allowSettingLoginScopes = allowSettingLoginScopes; + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = Optional.ofNullable(adminAccessTokenExpiresin); + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "admin_access_token_expiresin", nulls = Nulls.SKIP) + public _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject6Options build() { + return new EventStreamCloudEventConnectionDeletedObject6Options( + adminAccessTokenExpiresin, + allowSettingLoginScopes, + apiEnableGroups, + apiEnableUsers, + clientId, + domain, + domainAliases, + email, + extAgreedTerms, + extGroups, + extGroupsExtended, + extIsAdmin, + extIsSuspended, + federatedConnectionsAccessTokens, + handleLoginFromSocial, + iconUrl, + mapUserIdToId, + nonPersistentAttrs, + profile, + scope, + setUserRootAttributes, + tenantDomain, + upstreamParams, + 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/EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..c563cfea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedObject6OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..67e83fdc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject6OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6StrategyEnum.java new file mode 100644 index 00000000..908c47be --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject6StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject6StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject6StrategyEnum GOOGLE_APPS = + new EventStreamCloudEventConnectionDeletedObject6StrategyEnum(Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject6StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject6StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject6StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject6StrategyEnum valueOf(String value) { + switch (value) { + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventConnectionDeletedObject6StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GOOGLE_APPS, + + UNKNOWN + } + + public interface Visitor { + T visitGoogleApps(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7.java new file mode 100644 index 00000000..5189a96f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedObject7.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject7 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedObject7StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject7( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedObject7StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedObject7StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject7 + && equalTo((EventStreamCloudEventConnectionDeletedObject7) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject7 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedObject7 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject7StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject7 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject7Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject7Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedObject7Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedObject7StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject7 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedObject7StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedObject7Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedObject7Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionDeletedObject7Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject7 build() { + return new EventStreamCloudEventConnectionDeletedObject7( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedObject7Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7Authentication.java new file mode 100644 index 00000000..e98c2972 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject7Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject7Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject7Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject7Authentication + && equalTo((EventStreamCloudEventConnectionDeletedObject7Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject7Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject7Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject7Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject7Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject7Authentication build() { + return new EventStreamCloudEventConnectionDeletedObject7Authentication(active, 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/EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts.java new file mode 100644 index 00000000..22ee69c8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedObject7ConnectedAccounts(active, 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/EventStreamCloudEventConnectionDeletedObject7Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7Metadata.java new file mode 100644 index 00000000..b290f82f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedObject7Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject7Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject7Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject7Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedObject7Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedObject7Metadata build() { + return new EventStreamCloudEventConnectionDeletedObject7Metadata(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/EventStreamCloudEventConnectionDeletedObject7Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7Options.java new file mode 100644 index 00000000..cc793d70 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7Options.java @@ -0,0 +1,1296 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionDeletedObject7Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject7Options { + private final Optional apiEnableUsers; + + private final Optional appDomain; + + private final Optional appId; + + private final Optional basicProfile; + + private final Optional certRolloverNotification; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional extGroups; + + private final Optional extNestedGroups; + + private final Optional extProfile; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional granted; + + private final Optional iconUrl; + + private final Optional identityApi; + + private final Optional maxGroupsToRetrieve; + + private final Optional> nonPersistentAttrs; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional + shouldTrustEmailVerifiedConnection; + + private final Optional tenantDomain; + + private final Optional tenantId; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional useWsfed; + + private final Optional useCommonEndpoint; + + private final Optional useridAttribute; + + private final Optional waadProtocol; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject7Options( + Optional apiEnableUsers, + Optional appDomain, + Optional appId, + Optional basicProfile, + Optional certRolloverNotification, + String clientId, + Optional domain, + Optional> domainAliases, + Optional extGroups, + Optional extNestedGroups, + Optional extProfile, + Optional + federatedConnectionsAccessTokens, + Optional granted, + Optional iconUrl, + Optional identityApi, + Optional maxGroupsToRetrieve, + Optional> nonPersistentAttrs, + Optional> scope, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional tenantDomain, + Optional tenantId, + Optional> thumbprints, + Optional> upstreamParams, + Optional useWsfed, + Optional useCommonEndpoint, + Optional useridAttribute, + Optional waadProtocol, + Map additionalProperties) { + this.apiEnableUsers = apiEnableUsers; + this.appDomain = appDomain; + this.appId = appId; + this.basicProfile = basicProfile; + this.certRolloverNotification = certRolloverNotification; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.extGroups = extGroups; + this.extNestedGroups = extNestedGroups; + this.extProfile = extProfile; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.granted = granted; + this.iconUrl = iconUrl; + this.identityApi = identityApi; + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + this.nonPersistentAttrs = nonPersistentAttrs; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.tenantDomain = tenantDomain; + this.tenantId = tenantId; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.useWsfed = useWsfed; + this.useCommonEndpoint = useCommonEndpoint; + this.useridAttribute = useridAttribute; + this.waadProtocol = waadProtocol; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enable users API + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. + */ + @JsonProperty("app_domain") + public Optional getAppDomain() { + return appDomain; + } + + /** + * @return The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests. + */ + @JsonProperty("app_id") + public Optional getAppId() { + return appId; + } + + /** + * @return Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication. + */ + @JsonProperty("basic_profile") + public Optional getBasicProfile() { + return basicProfile; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com'). + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve. + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included. + */ + @JsonProperty("ext_nested_groups") + public Optional getExtNestedGroups() { + return extNestedGroups; + } + + /** + * @return When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2. + */ + @JsonProperty("ext_profile") + public Optional getExtProfile() { + return extProfile; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. + */ + @JsonProperty("granted") + public Optional getGranted() { + return granted; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("identity_api") + public Optional getIdentityApi() { + return identityApi; + } + + /** + * @return Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default. + */ + @JsonProperty("max_groups_to_retrieve") + public Optional getMaxGroupsToRetrieve() { + return maxGroupsToRetrieve; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. + */ + @JsonProperty("tenantId") + public Optional getTenantId() { + return tenantId; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. + */ + @JsonProperty("use_wsfed") + public Optional getUseWsfed() { + return useWsfed; + } + + /** + * @return When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false. + */ + @JsonProperty("useCommonEndpoint") + public Optional getUseCommonEndpoint() { + return useCommonEndpoint; + } + + @JsonProperty("userid_attribute") + public Optional getUseridAttribute() { + return useridAttribute; + } + + @JsonProperty("waad_protocol") + public Optional getWaadProtocol() { + return waadProtocol; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject7Options + && equalTo((EventStreamCloudEventConnectionDeletedObject7Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedObject7Options other) { + return apiEnableUsers.equals(other.apiEnableUsers) + && appDomain.equals(other.appDomain) + && appId.equals(other.appId) + && basicProfile.equals(other.basicProfile) + && certRolloverNotification.equals(other.certRolloverNotification) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && extGroups.equals(other.extGroups) + && extNestedGroups.equals(other.extNestedGroups) + && extProfile.equals(other.extProfile) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && granted.equals(other.granted) + && iconUrl.equals(other.iconUrl) + && identityApi.equals(other.identityApi) + && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && tenantDomain.equals(other.tenantDomain) + && tenantId.equals(other.tenantId) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && useWsfed.equals(other.useWsfed) + && useCommonEndpoint.equals(other.useCommonEndpoint) + && useridAttribute.equals(other.useridAttribute) + && waadProtocol.equals(other.waadProtocol); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.apiEnableUsers, + this.appDomain, + this.appId, + this.basicProfile, + this.certRolloverNotification, + this.clientId, + this.domain, + this.domainAliases, + this.extGroups, + this.extNestedGroups, + this.extProfile, + this.federatedConnectionsAccessTokens, + this.granted, + this.iconUrl, + this.identityApi, + this.maxGroupsToRetrieve, + this.nonPersistentAttrs, + this.scope, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.tenantDomain, + this.tenantId, + this.thumbprints, + this.upstreamParams, + this.useWsfed, + this.useCommonEndpoint, + this.useridAttribute, + this.waadProtocol); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedObject7Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject7Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Enable users API

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + _FinalStage appDomain(Optional appDomain); + + _FinalStage appDomain(String appDomain); + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + _FinalStage appId(Optional appId); + + _FinalStage appId(String appId); + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + _FinalStage basicProfile(Optional basicProfile); + + _FinalStage basicProfile(Boolean basicProfile); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + _FinalStage extNestedGroups(Optional extNestedGroups); + + _FinalStage extNestedGroups(Boolean extNestedGroups); + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + _FinalStage extProfile(Optional extProfile); + + _FinalStage extProfile(Boolean extProfile); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + _FinalStage granted(Optional granted); + + _FinalStage granted(Boolean granted); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage identityApi( + Optional identityApi); + + _FinalStage identityApi(EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum identityApi); + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve); + + _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum setUserRootAttributes); + + _FinalStage shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection); + + _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection); + + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + _FinalStage tenantId(Optional tenantId); + + _FinalStage tenantId(String tenantId); + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + _FinalStage useWsfed(Optional useWsfed); + + _FinalStage useWsfed(Boolean useWsfed); + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + _FinalStage useCommonEndpoint(Optional useCommonEndpoint); + + _FinalStage useCommonEndpoint(Boolean useCommonEndpoint); + + _FinalStage useridAttribute( + Optional useridAttribute); + + _FinalStage useridAttribute( + EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum useridAttribute); + + _FinalStage waadProtocol( + Optional waadProtocol); + + _FinalStage waadProtocol(EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum waadProtocol); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional waadProtocol = + Optional.empty(); + + private Optional useridAttribute = + Optional.empty(); + + private Optional useCommonEndpoint = Optional.empty(); + + private Optional useWsfed = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantId = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional maxGroupsToRetrieve = Optional.empty(); + + private Optional identityApi = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional granted = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extProfile = Optional.empty(); + + private Optional extNestedGroups = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional basicProfile = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional appDomain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedObject7Options other) { + apiEnableUsers(other.getApiEnableUsers()); + appDomain(other.getAppDomain()); + appId(other.getAppId()); + basicProfile(other.getBasicProfile()); + certRolloverNotification(other.getCertRolloverNotification()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + extGroups(other.getExtGroups()); + extNestedGroups(other.getExtNestedGroups()); + extProfile(other.getExtProfile()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + granted(other.getGranted()); + iconUrl(other.getIconUrl()); + identityApi(other.getIdentityApi()); + maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + tenantDomain(other.getTenantDomain()); + tenantId(other.getTenantId()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + useWsfed(other.getUseWsfed()); + useCommonEndpoint(other.getUseCommonEndpoint()); + useridAttribute(other.getUseridAttribute()); + waadProtocol(other.getWaadProtocol()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage waadProtocol( + EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum waadProtocol) { + this.waadProtocol = Optional.ofNullable(waadProtocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) + public _FinalStage waadProtocol( + Optional waadProtocol) { + this.waadProtocol = waadProtocol; + return this; + } + + @java.lang.Override + public _FinalStage useridAttribute( + EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum useridAttribute) { + this.useridAttribute = Optional.ofNullable(useridAttribute); + return this; + } + + @java.lang.Override + @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) + public _FinalStage useridAttribute( + Optional useridAttribute) { + this.useridAttribute = useridAttribute; + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useCommonEndpoint(Boolean useCommonEndpoint) { + this.useCommonEndpoint = Optional.ofNullable(useCommonEndpoint); + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useCommonEndpoint", nulls = Nulls.SKIP) + public _FinalStage useCommonEndpoint(Optional useCommonEndpoint) { + this.useCommonEndpoint = useCommonEndpoint; + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useWsfed(Boolean useWsfed) { + this.useWsfed = Optional.ofNullable(useWsfed); + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) + public _FinalStage useWsfed(Optional useWsfed) { + this.useWsfed = useWsfed; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantId(String tenantId) { + this.tenantId = Optional.ofNullable(tenantId); + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) + public _FinalStage tenantId(Optional tenantId) { + this.tenantId = tenantId; + return this; + } + + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public _FinalStage shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = Optional.ofNullable(maxGroupsToRetrieve); + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) + public _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + return this; + } + + @java.lang.Override + public _FinalStage identityApi( + EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum identityApi) { + this.identityApi = Optional.ofNullable(identityApi); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_api", nulls = Nulls.SKIP) + public _FinalStage identityApi( + Optional identityApi) { + this.identityApi = identityApi; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage granted(Boolean granted) { + this.granted = Optional.ofNullable(granted); + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "granted", nulls = Nulls.SKIP) + public _FinalStage granted(Optional granted) { + this.granted = granted; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extProfile(Boolean extProfile) { + this.extProfile = Optional.ofNullable(extProfile); + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) + public _FinalStage extProfile(Optional extProfile) { + this.extProfile = extProfile; + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extNestedGroups(Boolean extNestedGroups) { + this.extNestedGroups = Optional.ofNullable(extNestedGroups); + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_nested_groups", nulls = Nulls.SKIP) + public _FinalStage extNestedGroups(Optional extNestedGroups) { + this.extNestedGroups = extNestedGroups; + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage basicProfile(Boolean basicProfile) { + this.basicProfile = Optional.ofNullable(basicProfile); + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) + public _FinalStage basicProfile(Optional basicProfile) { + this.basicProfile = basicProfile; + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appId(String appId) { + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_id", nulls = Nulls.SKIP) + public _FinalStage appId(Optional appId) { + this.appId = appId; + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appDomain(String appDomain) { + this.appDomain = Optional.ofNullable(appDomain); + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_domain", nulls = Nulls.SKIP) + public _FinalStage appDomain(Optional appDomain) { + this.appDomain = appDomain; + return this; + } + + /** + *

                                                              Enable users API

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enable users API

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject7Options build() { + return new EventStreamCloudEventConnectionDeletedObject7Options( + apiEnableUsers, + appDomain, + appId, + basicProfile, + certRolloverNotification, + clientId, + domain, + domainAliases, + extGroups, + extNestedGroups, + extProfile, + federatedConnectionsAccessTokens, + granted, + iconUrl, + identityApi, + maxGroupsToRetrieve, + nonPersistentAttrs, + scope, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + tenantDomain, + tenantId, + thumbprints, + upstreamParams, + useWsfed, + useCommonEndpoint, + useridAttribute, + waadProtocol, + 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/EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..b95ba203 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedObject7OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum.java new file mode 100644 index 00000000..ab3577ae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum.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 EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum { + public static final EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum AZURE_ACTIVE_DIRECTORY_V10 = + new EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum( + Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); + + public static final EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum + MICROSOFT_IDENTITY_PLATFORM_V20 = new EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum( + Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum(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 EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AZURE_ACTIVE_DIRECTORY_V10: + return visitor.visitAzureActiveDirectoryV10(); + case MICROSOFT_IDENTITY_PLATFORM_V20: + return visitor.visitMicrosoftIdentityPlatformV20(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum valueOf(String value) { + switch (value) { + case "azure-active-directory-v1.0": + return AZURE_ACTIVE_DIRECTORY_V10; + case "microsoft-identity-platform-v2.0": + return MICROSOFT_IDENTITY_PLATFORM_V20; + default: + return new EventStreamCloudEventConnectionDeletedObject7OptionsIdentityApiEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + MICROSOFT_IDENTITY_PLATFORM_V20, + + AZURE_ACTIVE_DIRECTORY_V10, + + UNKNOWN + } + + public interface Visitor { + T visitMicrosoftIdentityPlatformV20(); + + T visitAzureActiveDirectoryV10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..dba951e1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedObject7OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..3aed2c1c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum valueOf( + String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionDeletedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum.java new file mode 100644 index 00000000..40911d83 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum.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 EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum { + public static final EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum SUB = + new EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum(Value.SUB, "sub"); + + public static final EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum OID = + new EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum(Value.OID, "oid"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum(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 EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUB: + return visitor.visitSub(); + case OID: + return visitor.visitOid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum valueOf(String value) { + switch (value) { + case "sub": + return SUB; + case "oid": + return OID; + default: + return new EventStreamCloudEventConnectionDeletedObject7OptionsUseridAttributeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OID, + + SUB, + + UNKNOWN + } + + public interface Visitor { + T visitOid(); + + T visitSub(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum.java new file mode 100644 index 00000000..2e0c4ba8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum.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 EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum { + public static final EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum OPENID_CONNECT = + new EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum( + Value.OPENID_CONNECT, "openid-connect"); + + public static final EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum WS_FEDERATION = + new EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum( + Value.WS_FEDERATION, "ws-federation"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum(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 EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID_CONNECT: + return visitor.visitOpenidConnect(); + case WS_FEDERATION: + return visitor.visitWsFederation(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum valueOf(String value) { + switch (value) { + case "openid-connect": + return OPENID_CONNECT; + case "ws-federation": + return WS_FEDERATION; + default: + return new EventStreamCloudEventConnectionDeletedObject7OptionsWaadProtocolEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WS_FEDERATION, + + OPENID_CONNECT, + + UNKNOWN + } + + public interface Visitor { + T visitWsFederation(); + + T visitOpenidConnect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7StrategyEnum.java new file mode 100644 index 00000000..5ffde574 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedObject7StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedObject7StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedObject7StrategyEnum WAAD = + new EventStreamCloudEventConnectionDeletedObject7StrategyEnum(Value.WAAD, "waad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedObject7StrategyEnum(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 EventStreamCloudEventConnectionDeletedObject7StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedObject7StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WAAD: + return visitor.visitWaad(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedObject7StrategyEnum valueOf(String value) { + switch (value) { + case "waad": + return WAAD; + default: + return new EventStreamCloudEventConnectionDeletedObject7StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject.java new file mode 100644 index 00000000..b7532388 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject.java @@ -0,0 +1,226 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventConnectionDeletedPreviousObject.Deserializer.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventConnectionDeletedPreviousObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject2) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject3) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject4) this.value); + } else if (this.type == 5) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject5) this.value); + } else if (this.type == 6) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject6) this.value); + } else if (this.type == 7) { + return visitor.visit((EventStreamCloudEventConnectionDeletedPreviousObject7) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject) other); + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject0 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 0); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject1 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 1); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject2 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 2); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject3 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 3); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject4 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 4); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject5 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 5); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject6 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 6); + } + + public static EventStreamCloudEventConnectionDeletedPreviousObject of( + EventStreamCloudEventConnectionDeletedPreviousObject7 value) { + return new EventStreamCloudEventConnectionDeletedPreviousObject(value, 7); + } + + public interface Visitor { + T visit(EventStreamCloudEventConnectionDeletedPreviousObject0 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject1 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject2 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject3 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject4 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject5 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject6 value); + + T visit(EventStreamCloudEventConnectionDeletedPreviousObject7 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventConnectionDeletedPreviousObject.class); + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject2.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject3.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject4.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject5.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject6.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionDeletedPreviousObject7.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0.java new file mode 100644 index 00000000..13759f8c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject0.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0 { + private final Optional authentication; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional connectedAccounts; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0( + Optional authentication, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional connectedAccounts, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.connectedAccounts = connectedAccounts; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0 other) { + return authentication.equals(other.authentication) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && connectedAccounts.equals(other.connectedAccounts) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.connectedAccounts, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject0Authentication authentication); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject0Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts connectedAccounts); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject0Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0 other) { + authentication(other.getAuthentication()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + connectedAccounts(other.getConnectedAccounts()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject0Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject0Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject0Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject0 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0( + authentication, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + connectedAccounts, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject0Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0Authentication.java new file mode 100644 index 00000000..77bfc2e0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject0Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject0Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject0Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts.java new file mode 100644 index 00000000..22ebf3d4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts.java @@ -0,0 +1,150 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts { + private final boolean active; + + private final Optional crossAppAccess; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts( + boolean active, Optional crossAppAccess, Map additionalProperties) { + this.active = active; + this.crossAppAccess = crossAppAccess; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @JsonProperty("cross_app_access") + public Optional getCrossAppAccess() { + return crossAppAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts other) { + return active == other.active && crossAppAccess.equals(other.crossAppAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.crossAppAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage crossAppAccess(Optional crossAppAccess); + + _FinalStage crossAppAccess(Boolean crossAppAccess); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + private Optional crossAppAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts other) { + active(other.getActive()); + crossAppAccess(other.getCrossAppAccess()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccess(Boolean crossAppAccess) { + this.crossAppAccess = Optional.ofNullable(crossAppAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access", nulls = Nulls.SKIP) + public _FinalStage crossAppAccess(Optional crossAppAccess) { + this.crossAppAccess = crossAppAccess; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0ConnectedAccounts( + active, crossAppAccess, 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/EventStreamCloudEventConnectionDeletedPreviousObject0Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0Metadata.java new file mode 100644 index 00000000..a6913290 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject0Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject0Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject0Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0Options.java new file mode 100644 index 00000000..ca677ba4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0Options.java @@ -0,0 +1,1308 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject0Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional + connectionSettings; + + private final Optional> domainAliases; + + private final Optional + dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional< + List> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional discoveryUrl; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional discoveryUrl, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.discoveryUrl = discoveryUrl; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional + getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional + getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && discoveryUrl.equals(other.discoveryUrl) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.discoveryUrl, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject0Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional + connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap attributeMap); + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + _FinalStage discoveryUrl(Optional discoveryUrl); + + _FinalStage discoveryUrl(String discoveryUrl); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional + dpopSigningAlg = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + connectionSettings = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + discoveryUrl(other.getDiscoveryUrl()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public _FinalStage discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional + connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject0Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + discoveryUrl, + type, + 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/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap.java new file mode 100644 index 00000000..3272e31f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap.java @@ -0,0 +1,170 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional + mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional + mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional + getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional + mappingMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional + mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..447ac5bc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,96 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum + BIND_ALL = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.BIND_ALL, "bind_all"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum + USE_MAP = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BIND_ALL: + return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "bind_all": + return BIND_ALL; + case "use_map": + return USE_MAP; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BIND_ALL, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBindAll(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings.java new file mode 100644 index 00000000..2cab55f3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..d0c1d9aa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,119 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum + DISABLED = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum valueOf( + String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..395eeaa0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum( + Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsDpopSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..12effa0c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..9a9cec54 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS512 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + ES384 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + PS384 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + ES256 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + PS256 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS384 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS256 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata.java new file mode 100644 index 00000000..5791e3ab --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..a276883d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum( + Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSchemaVersionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..8173afc8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..fbd35cb5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..74e7fce0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS512 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + ES384 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + PS384 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + ES256 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + PS256 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS384 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS256 = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..a37fbb67 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + ISSUER = new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum.java new file mode 100644 index 00000000..dde5a1a8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum.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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum FRONT_CHANNEL = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum( + Value.FRONT_CHANNEL, "front_channel"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum( + Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FRONT_CHANNEL: + return visitor.visitFrontChannel(); + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum valueOf(String value) { + switch (value) { + case "front_channel": + return FRONT_CHANNEL; + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + FRONT_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitFrontChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum.java new file mode 100644 index 00000000..baa4665a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum OIDC = + new EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum valueOf(String value) { + switch (value) { + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject0StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1.java new file mode 100644 index 00000000..27352e47 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject1.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject1Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject1Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject1Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject1Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject1Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject1Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject1 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject1Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1Authentication.java new file mode 100644 index 00000000..ce59f177 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject1Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject1Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject1Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts.java new file mode 100644 index 00000000..b8c1e578 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject1Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1Metadata.java new file mode 100644 index 00000000..0cda12a5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject1Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject1Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject1Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1Options.java new file mode 100644 index 00000000..4110b880 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1Options.java @@ -0,0 +1,1308 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject1Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional + connectionSettings; + + private final Optional> domainAliases; + + private final Optional + dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional< + List> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional domain; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional domain, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.domain = domain; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional + getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional + getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && domain.equals(other.domain) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.domain, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject1Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional + connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap attributeMap); + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional + dpopSigningAlg = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + connectionSettings = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + domain(other.getDomain()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional + connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject1Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + domain, + type, + 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/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap.java new file mode 100644 index 00000000..0e871b99 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap.java @@ -0,0 +1,170 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional + mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional + mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional + getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional + mappingMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional + mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..5ed3a4d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,96 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum + USE_MAP = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum + BASIC_PROFILE = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.BASIC_PROFILE, "basic_profile"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USE_MAP: + return visitor.visitUseMap(); + case BASIC_PROFILE: + return visitor.visitBasicProfile(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "use_map": + return USE_MAP; + case "basic_profile": + return BASIC_PROFILE; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BASIC_PROFILE, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBasicProfile(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings.java new file mode 100644 index 00000000..161f37ea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..5998a311 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,119 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum + DISABLED = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum valueOf( + String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..10673231 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum( + Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsDpopSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..1f74efd1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..794477a5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS512 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + ES384 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + PS384 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + ES256 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + PS256 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS384 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS256 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata.java new file mode 100644 index 00000000..7c996a09 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..b0add3e4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum( + Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSchemaVersionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..39f7e296 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..cdbb1e40 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..d6a1c874 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS512 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + ES384 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + PS384 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + ES256 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + PS256 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS384 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS256 = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..66f8e501 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + ISSUER = new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum.java new file mode 100644 index 00000000..a0e8a2f8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum( + Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum valueOf(String value) { + switch (value) { + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum.java new file mode 100644 index 00000000..ab6fa634 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum OKTA = + new EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum(Value.OKTA, "okta"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OKTA: + return visitor.visitOkta(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum valueOf(String value) { + switch (value) { + case "okta": + return OKTA; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject1StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OKTA, + + UNKNOWN + } + + public interface Visitor { + T visitOkta(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2.java new file mode 100644 index 00000000..be0c87c5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject2.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject2 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject2Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject2Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject2Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject2Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject2Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject2Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject2 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject2Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2Authentication.java new file mode 100644 index 00000000..fbcd3067 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject2Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject2Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject2Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts.java new file mode 100644 index 00000000..540613ee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject2Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2Metadata.java new file mode 100644 index 00000000..769af7e2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject2Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject2Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2Options.java new file mode 100644 index 00000000..96936cae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2Options.java @@ -0,0 +1,1221 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional + digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional + protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional debug; + + private final Optional deflate; + + private final Optional destinationUrl; + + private final Optional disableFieldsMapFix; + + private final Optional disableSignout; + + private final Optional discoveryUrl; + + private final Optional> fieldsMap; + + private final Optional fieldsMapJsonRaw; + + private final Optional globalTokenRevocationJwtIss; + + private final Optional globalTokenRevocationJwtSub; + + private final Optional metadataUrl; + + private final Optional oidcMetadata; + + private final Optional recipientUrl; + + private final Optional requestTemplate; + + private final Optional signOutEndpoint; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional + signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional debug, + Optional deflate, + Optional destinationUrl, + Optional disableFieldsMapFix, + Optional disableSignout, + Optional discoveryUrl, + Optional> fieldsMap, + Optional fieldsMapJsonRaw, + Optional globalTokenRevocationJwtIss, + Optional globalTokenRevocationJwtSub, + Optional metadataUrl, + Optional oidcMetadata, + Optional recipientUrl, + Optional requestTemplate, + Optional signOutEndpoint, + Optional userIdAttribute, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.debug = debug; + this.deflate = deflate; + this.destinationUrl = destinationUrl; + this.disableFieldsMapFix = disableFieldsMapFix; + this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; + this.fieldsMap = fieldsMap; + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + this.metadataUrl = metadataUrl; + this.oidcMetadata = oidcMetadata; + this.recipientUrl = recipientUrl; + this.requestTemplate = requestTemplate; + this.signOutEndpoint = signOutEndpoint; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional + getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional + getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes. + */ + @JsonProperty("debug") + public Optional getDebug() { + return debug; + } + + /** + * @return When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. + */ + @JsonProperty("deflate") + public Optional getDeflate() { + return deflate; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("destinationUrl") + public Optional getDestinationUrl() { + return destinationUrl; + } + + /** + * @return When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled). + */ + @JsonProperty("disableFieldsMapFix") + public Optional getDisableFieldsMapFix() { + return disableFieldsMapFix; + } + + /** + * @return When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). + */ + @JsonProperty("disableSignout") + public Optional getDisableSignout() { + return disableSignout; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("fieldsMap") + public Optional> getFieldsMap() { + return fieldsMap; + } + + /** + * @return Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object. + */ + @JsonProperty("fieldsMapJsonRaw") + public Optional getFieldsMapJsonRaw() { + return fieldsMapJsonRaw; + } + + /** + * @return Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. + */ + @JsonProperty("global_token_revocation_jwt_iss") + public Optional getGlobalTokenRevocationJwtIss() { + return globalTokenRevocationJwtIss; + } + + /** + * @return Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. + */ + @JsonProperty("global_token_revocation_jwt_sub") + public Optional getGlobalTokenRevocationJwtSub() { + return globalTokenRevocationJwtSub; + } + + /** + * @return HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. + */ + @JsonProperty("metadataUrl") + public Optional getMetadataUrl() { + return metadataUrl; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("recipientUrl") + public Optional getRecipientUrl() { + return recipientUrl; + } + + /** + * @return Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template + */ + @JsonProperty("requestTemplate") + public Optional getRequestTemplate() { + return requestTemplate; + } + + /** + * @return Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. + */ + @JsonProperty("signOutEndpoint") + public Optional getSignOutEndpoint() { + return signOutEndpoint; + } + + /** + * @return Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject2Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && debug.equals(other.debug) + && deflate.equals(other.deflate) + && destinationUrl.equals(other.destinationUrl) + && disableFieldsMapFix.equals(other.disableFieldsMapFix) + && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) + && fieldsMap.equals(other.fieldsMap) + && fieldsMapJsonRaw.equals(other.fieldsMapJsonRaw) + && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) + && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) + && metadataUrl.equals(other.metadataUrl) + && oidcMetadata.equals(other.oidcMetadata) + && recipientUrl.equals(other.recipientUrl) + && requestTemplate.equals(other.requestTemplate) + && signOutEndpoint.equals(other.signOutEndpoint) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.debug, + this.deflate, + this.destinationUrl, + this.disableFieldsMapFix, + this.disableSignout, + this.discoveryUrl, + this.fieldsMap, + this.fieldsMapJsonRaw, + this.globalTokenRevocationJwtIss, + this.globalTokenRevocationJwtSub, + this.metadataUrl, + this.oidcMetadata, + this.recipientUrl, + this.requestTemplate, + this.signOutEndpoint, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional + assertionDecryptionSettings = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional + digestAlgorithm = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + protocolBinding = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional subject = + Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional debug = Optional.empty(); + + private Optional deflate = Optional.empty(); + + private Optional destinationUrl = Optional.empty(); + + private Optional disableFieldsMapFix = Optional.empty(); + + private Optional disableSignout = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional> fieldsMap = Optional.empty(); + + private Optional fieldsMapJsonRaw = Optional.empty(); + + private Optional globalTokenRevocationJwtIss = Optional.empty(); + + private Optional globalTokenRevocationJwtSub = Optional.empty(); + + private Optional metadataUrl = Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional recipientUrl = Optional.empty(); + + private Optional requestTemplate = Optional.empty(); + + private Optional signOutEndpoint = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + debug(other.getDebug()); + deflate(other.getDeflate()); + destinationUrl(other.getDestinationUrl()); + disableFieldsMapFix(other.getDisableFieldsMapFix()); + disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); + fieldsMap(other.getFieldsMap()); + fieldsMapJsonRaw(other.getFieldsMapJsonRaw()); + globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); + globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); + metadataUrl(other.getMetadataUrl()); + oidcMetadata(other.getOidcMetadata()); + recipientUrl(other.getRecipientUrl()); + requestTemplate(other.getRequestTemplate()); + signOutEndpoint(other.getSignOutEndpoint()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public Builder cert(Optional cert) { + this.cert = cert; + return this; + } + + public Builder cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public Builder digestAlgorithm( + Optional + digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + public Builder digestAlgorithm( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public Builder expires(Optional expires) { + this.expires = expires; + return this; + } + + public Builder expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public Builder idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + public Builder idpinitiated( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public Builder protocolBinding( + Optional + protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + public Builder protocolBinding( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public Builder signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + public Builder signatureAlgorithm( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public Builder signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + public Builder signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public Builder signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + public Builder signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public Builder subject(Optional subject) { + this.subject = subject; + return this; + } + + public Builder subject(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes.

                                                              + */ + @JsonSetter(value = "debug", nulls = Nulls.SKIP) + public Builder debug(Optional debug) { + this.debug = debug; + return this; + } + + public Builder debug(Boolean debug) { + this.debug = Optional.ofNullable(debug); + return this; + } + + /** + *

                                                              When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding.

                                                              + */ + @JsonSetter(value = "deflate", nulls = Nulls.SKIP) + public Builder deflate(Optional deflate) { + this.deflate = deflate; + return this; + } + + public Builder deflate(Boolean deflate) { + this.deflate = Optional.ofNullable(deflate); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "destinationUrl", nulls = Nulls.SKIP) + public Builder destinationUrl(Optional destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + public Builder destinationUrl(String destinationUrl) { + this.destinationUrl = Optional.ofNullable(destinationUrl); + return this; + } + + /** + *

                                                              When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled).

                                                              + */ + @JsonSetter(value = "disableFieldsMapFix", nulls = Nulls.SKIP) + public Builder disableFieldsMapFix(Optional disableFieldsMapFix) { + this.disableFieldsMapFix = disableFieldsMapFix; + return this; + } + + public Builder disableFieldsMapFix(Boolean disableFieldsMapFix) { + this.disableFieldsMapFix = Optional.ofNullable(disableFieldsMapFix); + return this; + } + + /** + *

                                                              When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled).

                                                              + */ + @JsonSetter(value = "disableSignout", nulls = Nulls.SKIP) + public Builder disableSignout(Optional disableSignout) { + this.disableSignout = disableSignout; + return this; + } + + public Builder disableSignout(Boolean disableSignout) { + this.disableSignout = Optional.ofNullable(disableSignout); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access.

                                                              + */ + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) + public Builder fieldsMap(Optional> fieldsMap) { + this.fieldsMap = fieldsMap; + return this; + } + + public Builder fieldsMap(Map fieldsMap) { + this.fieldsMap = Optional.ofNullable(fieldsMap); + return this; + } + + /** + *

                                                              Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object.

                                                              + */ + @JsonSetter(value = "fieldsMapJsonRaw", nulls = Nulls.SKIP) + public Builder fieldsMapJsonRaw(Optional fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + return this; + } + + public Builder fieldsMapJsonRaw(String fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = Optional.ofNullable(fieldsMapJsonRaw); + return this; + } + + /** + *

                                                              Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_iss", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtIss(Optional globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + return this; + } + + public Builder globalTokenRevocationJwtIss(String globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = Optional.ofNullable(globalTokenRevocationJwtIss); + return this; + } + + /** + *

                                                              Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_sub", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtSub(Optional globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + return this; + } + + public Builder globalTokenRevocationJwtSub(String globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = Optional.ofNullable(globalTokenRevocationJwtSub); + return this; + } + + /** + *

                                                              HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both.

                                                              + */ + @JsonSetter(value = "metadataUrl", nulls = Nulls.SKIP) + public Builder metadataUrl(Optional metadataUrl) { + this.metadataUrl = metadataUrl; + return this; + } + + public Builder metadataUrl(String metadataUrl) { + this.metadataUrl = Optional.ofNullable(metadataUrl); + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) + public Builder recipientUrl(Optional recipientUrl) { + this.recipientUrl = recipientUrl; + return this; + } + + public Builder recipientUrl(String recipientUrl) { + this.recipientUrl = Optional.ofNullable(recipientUrl); + return this; + } + + /** + *

                                                              Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template

                                                              + */ + @JsonSetter(value = "requestTemplate", nulls = Nulls.SKIP) + public Builder requestTemplate(Optional requestTemplate) { + this.requestTemplate = requestTemplate; + return this; + } + + public Builder requestTemplate(String requestTemplate) { + this.requestTemplate = Optional.ofNullable(requestTemplate); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false.

                                                              + */ + @JsonSetter(value = "signOutEndpoint", nulls = Nulls.SKIP) + public Builder signOutEndpoint(Optional signOutEndpoint) { + this.signOutEndpoint = signOutEndpoint; + return this; + } + + public Builder signOutEndpoint(String signOutEndpoint) { + this.signOutEndpoint = Optional.ofNullable(signOutEndpoint); + return this; + } + + /** + *

                                                              Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject2Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + debug, + deflate, + destinationUrl, + disableFieldsMapFix, + disableSignout, + discoveryUrl, + fieldsMap, + fieldsMapJsonRaw, + globalTokenRevocationJwtIss, + globalTokenRevocationJwtSub, + metadataUrl, + oidcMetadata, + recipientUrl, + requestTemplate, + signOutEndpoint, + userIdAttribute, + 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/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..03646b0d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings.java @@ -0,0 +1,183 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..7c019117 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum valueOf( + String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..6fa00fbd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum valueOf( + String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated.java new file mode 100644 index 00000000..4b858715 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated.java @@ -0,0 +1,207 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional + clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..40889696 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,108 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + WSFED = new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + SAMLP = new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + OIDC = new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata.java new file mode 100644 index 00000000..315caa29 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..42e05c53 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum valueOf( + String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..5c330a0a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..5ec72c89 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum valueOf( + String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject.java new file mode 100644 index 00000000..9269f876 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject.java @@ -0,0 +1,70 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject( + Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject2OptionsSubject(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/EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum.java new file mode 100644 index 00000000..7e13865f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum SAMLP = + new EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum(Value.SAMLP, "samlp"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SAMLP: + return visitor.visitSamlp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum valueOf(String value) { + switch (value) { + case "samlp": + return SAMLP; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject2StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3.java new file mode 100644 index 00000000..66e20759 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject3.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject3) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject3 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject3 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject3Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject3Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject3Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject3Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject3Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject3Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject3 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject3Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3Authentication.java new file mode 100644 index 00000000..e352b75e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject3Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject3Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject3Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject3Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject3Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts.java new file mode 100644 index 00000000..3eb51304 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject3Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3Metadata.java new file mode 100644 index 00000000..8e9d58a2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject3Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject3Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject3Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3Options.java new file mode 100644 index 00000000..68598875 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3Options.java @@ -0,0 +1,993 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionDeletedPreviousObject3Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional + digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional + protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final String pingFederateBaseUrl; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional + signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + String pingFederateBaseUrl, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.pingFederateBaseUrl = pingFederateBaseUrl; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional + getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional + getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return URL provided by PingFederate which returns information used for creating the connection + */ + @JsonProperty("pingFederateBaseUrl") + public String getPingFederateBaseUrl() { + return pingFederateBaseUrl; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject3Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject3Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && pingFederateBaseUrl.equals(other.pingFederateBaseUrl); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.pingFederateBaseUrl); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PingFederateBaseUrlStage builder() { + return new Builder(); + } + + public interface PingFederateBaseUrlStage { + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + */ + _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject3Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings); + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + _FinalStage cert(Optional cert); + + _FinalStage cert(String cert); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + _FinalStage digestAlgorithm( + Optional + digestAlgorithm); + + _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum digestAlgorithm); + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + _FinalStage entityId(Optional entityId); + + _FinalStage entityId(String entityId); + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + _FinalStage expires(Optional expires); + + _FinalStage expires(OffsetDateTime expires); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage idpinitiated( + Optional idpinitiated); + + _FinalStage idpinitiated(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated idpinitiated); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage protocolBinding( + Optional + protocolBinding); + + _FinalStage protocolBinding( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum protocolBinding); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm); + + _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum signatureAlgorithm); + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + _FinalStage signInEndpoint(Optional signInEndpoint); + + _FinalStage signInEndpoint(String signInEndpoint); + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + _FinalStage signingCert(Optional signingCert); + + _FinalStage signingCert(String signingCert); + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + _FinalStage signSamlRequest(Optional signSamlRequest); + + _FinalStage signSamlRequest(Boolean signSamlRequest); + + _FinalStage subject(Optional subject); + + _FinalStage subject(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject subject); + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { + private String pingFederateBaseUrl; + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional subject = + Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + protocolBinding = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + digestAlgorithm = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional + assertionDecryptionSettings = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + pingFederateBaseUrl(other.getPingFederateBaseUrl()); + return this; + } + + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("pingFederateBaseUrl") + public _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl) { + this.pingFederateBaseUrl = + Objects.requireNonNull(pingFederateBaseUrl, "pingFederateBaseUrl must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage subject(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public _FinalStage subject( + Optional subject) { + this.subject = subject; + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public _FinalStage signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public _FinalStage signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public _FinalStage signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + @java.lang.Override + public _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + @java.lang.Override + public _FinalStage protocolBinding( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public _FinalStage protocolBinding( + Optional + protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + @java.lang.Override + public _FinalStage idpinitiated( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + @java.lang.Override + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public _FinalStage idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public _FinalStage expires(Optional expires) { + this.expires = expires; + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public _FinalStage entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public _FinalStage digestAlgorithm( + Optional + digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public _FinalStage cert(Optional cert) { + this.cert = cert; + return this; + } + + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject3Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + pingFederateBaseUrl, + 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/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..4d1116d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings.java @@ -0,0 +1,183 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..60bb8f19 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum valueOf( + String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..7f18af47 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum valueOf( + String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated.java new file mode 100644 index 00000000..d9fd2998 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated.java @@ -0,0 +1,207 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional + clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..4d9f39dc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,108 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + WSFED = new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + SAMLP = new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + OIDC = new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..4079ddae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum valueOf( + String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..1849411d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..216ae01a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum valueOf( + String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject.java new file mode 100644 index 00000000..1b76eefb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject.java @@ -0,0 +1,70 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject( + Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject3OptionsSubject(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/EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum.java new file mode 100644 index 00000000..40ed44a0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum PINGFEDERATE = + new EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum(Value.PINGFEDERATE, "pingfederate"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject3StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4.java new file mode 100644 index 00000000..ae396dde --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject4.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject4 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject4( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject4 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject4) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject4 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject4 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject4Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject4Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject4Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject4Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject4Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject4Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject4 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject4( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject4Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4Authentication.java new file mode 100644 index 00000000..04228e7e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject4Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject4Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject4Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject4Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject4Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject4Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject4Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject4Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject4Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts.java new file mode 100644 index 00000000..a9a51aaf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject4ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject4Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4Metadata.java new file mode 100644 index 00000000..2e7be327 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject4Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject4Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject4Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject4Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject4Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject4Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject4Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4Options.java new file mode 100644 index 00000000..ea59382c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4Options.java @@ -0,0 +1,568 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject4Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject4Options { + private final Optional adfsServer; + + private final Optional certRolloverNotification; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional fedMetadataXml; + + private final Optional iconUrl; + + private final Optional> nonPersistentAttrs; + + private final Optional> prevThumbprints; + + private final Optional + setUserRootAttributes; + + private final Optional< + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject4Options( + Optional adfsServer, + Optional certRolloverNotification, + Optional> domainAliases, + Optional entityId, + Optional fedMetadataXml, + Optional iconUrl, + Optional> nonPersistentAttrs, + Optional> prevThumbprints, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional userIdAttribute, + Map additionalProperties) { + this.adfsServer = adfsServer; + this.certRolloverNotification = certRolloverNotification; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.fedMetadataXml = fedMetadataXml; + this.iconUrl = iconUrl; + this.nonPersistentAttrs = nonPersistentAttrs; + this.prevThumbprints = prevThumbprints; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + /** + * @return ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. + */ + @JsonProperty("adfs_server") + public Optional getAdfsServer() { + return adfsServer; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. + */ + @JsonProperty("fedMetadataXml") + public Optional getFedMetadataXml() { + return fedMetadataXml; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("prev_thumbprints") + public Optional> getPrevThumbprints() { + return prevThumbprints; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + /** + * @return Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject4Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject4Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject4Options other) { + return adfsServer.equals(other.adfsServer) + && certRolloverNotification.equals(other.certRolloverNotification) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && fedMetadataXml.equals(other.fedMetadataXml) + && iconUrl.equals(other.iconUrl) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && prevThumbprints.equals(other.prevThumbprints) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adfsServer, + this.certRolloverNotification, + this.domainAliases, + this.entityId, + this.fedMetadataXml, + this.iconUrl, + this.nonPersistentAttrs, + this.prevThumbprints, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional adfsServer = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional fedMetadataXml = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional> prevThumbprints = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional< + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject4Options other) { + adfsServer(other.getAdfsServer()); + certRolloverNotification(other.getCertRolloverNotification()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + fedMetadataXml(other.getFedMetadataXml()); + iconUrl(other.getIconUrl()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + prevThumbprints(other.getPrevThumbprints()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + /** + *

                                                              ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent.

                                                              + */ + @JsonSetter(value = "adfs_server", nulls = Nulls.SKIP) + public Builder adfsServer(Optional adfsServer) { + this.adfsServer = adfsServer; + return this; + } + + public Builder adfsServer(String adfsServer) { + this.adfsServer = Optional.ofNullable(adfsServer); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'.

                                                              + */ + @JsonSetter(value = "fedMetadataXml", nulls = Nulls.SKIP) + public Builder fedMetadataXml(Optional fedMetadataXml) { + this.fedMetadataXml = fedMetadataXml; + return this; + } + + public Builder fedMetadataXml(String fedMetadataXml) { + this.fedMetadataXml = Optional.ofNullable(fedMetadataXml); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "prev_thumbprints", nulls = Nulls.SKIP) + public Builder prevThumbprints(Optional> prevThumbprints) { + this.prevThumbprints = prevThumbprints; + return this; + } + + public Builder prevThumbprints(List prevThumbprints) { + this.prevThumbprints = Optional.ofNullable(prevThumbprints); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public Builder shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + public Builder shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + /** + *

                                                              Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject4Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject4Options( + adfsServer, + certRolloverNotification, + domainAliases, + entityId, + fedMetadataXml, + iconUrl, + nonPersistentAttrs, + prevThumbprints, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + userIdAttribute, + 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/EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..e72092c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..51d51fae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,100 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + valueOf(String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum.java new file mode 100644 index 00000000..ae83e437 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum ADFS = + new EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum(Value.ADFS, "adfs"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADFS: + return visitor.visitAdfs(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum valueOf(String value) { + switch (value) { + case "adfs": + return ADFS; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject4StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADFS, + + UNKNOWN + } + + public interface Visitor { + T visitAdfs(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5.java new file mode 100644 index 00000000..e7f58f65 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5.java @@ -0,0 +1,517 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject5.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject5 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject5( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject5 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject5) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject5 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject5 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject5Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject5Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject5Options options); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum strategy; + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject5Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject5Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject5Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject5 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject5( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject5Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5Authentication.java new file mode 100644 index 00000000..a02a4b8b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject5Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject5Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject5Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject5Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject5Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject5Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject5Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject5Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject5Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts.java new file mode 100644 index 00000000..0a0d3ddc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject5ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject5Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5Metadata.java new file mode 100644 index 00000000..5fd1d09c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject5Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject5Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject5Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject5Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject5Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject5Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject5Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5Options.java new file mode 100644 index 00000000..6fc2d369 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5Options.java @@ -0,0 +1,690 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject5Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject5Options { + private final Optional agentIp; + + private final Optional agentMode; + + private final Optional agentVersion; + + private final Optional bruteForceProtection; + + private final Optional certAuth; + + private final Optional> certs; + + private final Optional disableCache; + + private final Optional disableSelfServiceChangePassword; + + private final Optional> domainAliases; + + private final Optional iconUrl; + + private final Optional> ips; + + private final Optional kerberos; + + private final Optional kerberosOnly; + + private final Optional> nonPersistentAttrs; + + private final Optional + setUserRootAttributes; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject5Options( + Optional agentIp, + Optional agentMode, + Optional agentVersion, + Optional bruteForceProtection, + Optional certAuth, + Optional> certs, + Optional disableCache, + Optional disableSelfServiceChangePassword, + Optional> domainAliases, + Optional iconUrl, + Optional> ips, + Optional kerberos, + Optional kerberosOnly, + Optional> nonPersistentAttrs, + Optional + setUserRootAttributes, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Map additionalProperties) { + this.agentIp = agentIp; + this.agentMode = agentMode; + this.agentVersion = agentVersion; + this.bruteForceProtection = bruteForceProtection; + this.certAuth = certAuth; + this.certs = certs; + this.disableCache = disableCache; + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + this.domainAliases = domainAliases; + this.iconUrl = iconUrl; + this.ips = ips; + this.kerberos = kerberos; + this.kerberosOnly = kerberosOnly; + this.nonPersistentAttrs = nonPersistentAttrs; + this.setUserRootAttributes = setUserRootAttributes; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ + @JsonProperty("agentIP") + public Optional getAgentIp() { + return agentIp; + } + + /** + * @return When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ + @JsonProperty("agentMode") + public Optional getAgentMode() { + return agentMode; + } + + /** + * @return Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ + @JsonProperty("agentVersion") + public Optional getAgentVersion() { + return agentVersion; + } + + /** + * @return Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. + */ + @JsonProperty("brute_force_protection") + public Optional getBruteForceProtection() { + return bruteForceProtection; + } + + /** + * @return Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint + */ + @JsonProperty("certAuth") + public Optional getCertAuth() { + return certAuth; + } + + /** + * @return Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ + @JsonProperty("certs") + public Optional> getCerts() { + return certs; + } + + /** + * @return When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory + */ + @JsonProperty("disable_cache") + public Optional getDisableCache() { + return disableCache; + } + + /** + * @return When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets + */ + @JsonProperty("disable_self_service_change_password") + public Optional getDisableSelfServiceChangePassword() { + return disableSelfServiceChangePassword; + } + + /** + * @return List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ + @JsonProperty("ips") + public Optional> getIps() { + return ips; + } + + /** + * @return Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges + */ + @JsonProperty("kerberos") + public Optional getKerberos() { + return kerberos; + } + + /** + * @return When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback. + */ + @JsonProperty("kerberos_only") + public Optional getKerberosOnly() { + return kerberosOnly; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Primary AD domain hint used for HRD and discovery. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject5Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject5Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject5Options other) { + return agentIp.equals(other.agentIp) + && agentMode.equals(other.agentMode) + && agentVersion.equals(other.agentVersion) + && bruteForceProtection.equals(other.bruteForceProtection) + && certAuth.equals(other.certAuth) + && certs.equals(other.certs) + && disableCache.equals(other.disableCache) + && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) + && domainAliases.equals(other.domainAliases) + && iconUrl.equals(other.iconUrl) + && ips.equals(other.ips) + && kerberos.equals(other.kerberos) + && kerberosOnly.equals(other.kerberosOnly) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentIp, + this.agentMode, + this.agentVersion, + this.bruteForceProtection, + this.certAuth, + this.certs, + this.disableCache, + this.disableSelfServiceChangePassword, + this.domainAliases, + this.iconUrl, + this.ips, + this.kerberos, + this.kerberosOnly, + this.nonPersistentAttrs, + this.setUserRootAttributes, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional agentIp = Optional.empty(); + + private Optional agentMode = Optional.empty(); + + private Optional agentVersion = Optional.empty(); + + private Optional bruteForceProtection = Optional.empty(); + + private Optional certAuth = Optional.empty(); + + private Optional> certs = Optional.empty(); + + private Optional disableCache = Optional.empty(); + + private Optional disableSelfServiceChangePassword = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> ips = Optional.empty(); + + private Optional kerberos = Optional.empty(); + + private Optional kerberosOnly = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject5Options other) { + agentIp(other.getAgentIp()); + agentMode(other.getAgentMode()); + agentVersion(other.getAgentVersion()); + bruteForceProtection(other.getBruteForceProtection()); + certAuth(other.getCertAuth()); + certs(other.getCerts()); + disableCache(other.getDisableCache()); + disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); + domainAliases(other.getDomainAliases()); + iconUrl(other.getIconUrl()); + ips(other.getIps()); + kerberos(other.getKerberos()); + kerberosOnly(other.getKerberosOnly()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentIP", nulls = Nulls.SKIP) + public Builder agentIp(Optional agentIp) { + this.agentIp = agentIp; + return this; + } + + public Builder agentIp(String agentIp) { + this.agentIp = Optional.ofNullable(agentIp); + return this; + } + + /** + *

                                                              When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentMode", nulls = Nulls.SKIP) + public Builder agentMode(Optional agentMode) { + this.agentMode = agentMode; + return this; + } + + public Builder agentMode(Boolean agentMode) { + this.agentMode = Optional.ofNullable(agentMode); + return this; + } + + /** + *

                                                              Version identifier of the installed AD connector agent software (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentVersion", nulls = Nulls.SKIP) + public Builder agentVersion(Optional agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + public Builder agentVersion(String agentVersion) { + this.agentVersion = Optional.ofNullable(agentVersion); + return this; + } + + /** + *

                                                              Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.

                                                              + */ + @JsonSetter(value = "brute_force_protection", nulls = Nulls.SKIP) + public Builder bruteForceProtection(Optional bruteForceProtection) { + this.bruteForceProtection = bruteForceProtection; + return this; + } + + public Builder bruteForceProtection(Boolean bruteForceProtection) { + this.bruteForceProtection = Optional.ofNullable(bruteForceProtection); + return this; + } + + /** + *

                                                              Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint

                                                              + */ + @JsonSetter(value = "certAuth", nulls = Nulls.SKIP) + public Builder certAuth(Optional certAuth) { + this.certAuth = certAuth; + return this; + } + + public Builder certAuth(Boolean certAuth) { + this.certAuth = Optional.ofNullable(certAuth); + return this; + } + + /** + *

                                                              Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "certs", nulls = Nulls.SKIP) + public Builder certs(Optional> certs) { + this.certs = certs; + return this; + } + + public Builder certs(List certs) { + this.certs = Optional.ofNullable(certs); + return this; + } + + /** + *

                                                              When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory

                                                              + */ + @JsonSetter(value = "disable_cache", nulls = Nulls.SKIP) + public Builder disableCache(Optional disableCache) { + this.disableCache = disableCache; + return this; + } + + public Builder disableCache(Boolean disableCache) { + this.disableCache = Optional.ofNullable(disableCache); + return this; + } + + /** + *

                                                              When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets

                                                              + */ + @JsonSetter(value = "disable_self_service_change_password", nulls = Nulls.SKIP) + public Builder disableSelfServiceChangePassword(Optional disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + return this; + } + + public Builder disableSelfServiceChangePassword(Boolean disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = Optional.ofNullable(disableSelfServiceChangePassword); + return this; + } + + /** + *

                                                              List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.

                                                              + */ + @JsonSetter(value = "ips", nulls = Nulls.SKIP) + public Builder ips(Optional> ips) { + this.ips = ips; + return this; + } + + public Builder ips(List ips) { + this.ips = Optional.ofNullable(ips); + return this; + } + + /** + *

                                                              Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges

                                                              + */ + @JsonSetter(value = "kerberos", nulls = Nulls.SKIP) + public Builder kerberos(Optional kerberos) { + this.kerberos = kerberos; + return this; + } + + public Builder kerberos(Boolean kerberos) { + this.kerberos = Optional.ofNullable(kerberos); + return this; + } + + /** + *

                                                              When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback.

                                                              + */ + @JsonSetter(value = "kerberos_only", nulls = Nulls.SKIP) + public Builder kerberosOnly(Optional kerberosOnly) { + this.kerberosOnly = kerberosOnly; + return this; + } + + public Builder kerberosOnly(Boolean kerberosOnly) { + this.kerberosOnly = Optional.ofNullable(kerberosOnly); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + /** + *

                                                              The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Primary AD domain hint used for HRD and discovery.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject5Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject5Options( + agentIp, + agentMode, + agentVersion, + bruteForceProtection, + certAuth, + certs, + disableCache, + disableSelfServiceChangePassword, + domainAliases, + iconUrl, + ips, + kerberos, + kerberosOnly, + nonPersistentAttrs, + setUserRootAttributes, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + 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/EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..1605dcdb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum.java new file mode 100644 index 00000000..f02dc799 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum AD = + new EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum(Value.AD, "ad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject5StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6.java new file mode 100644 index 00000000..fd0ab1b6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject6.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject6 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject6( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject6 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject6) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject6 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject6 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject6Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject6Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject6Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject6Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject6Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject6Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject6 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject6( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject6Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6Authentication.java new file mode 100644 index 00000000..912373ea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject6Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject6Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject6Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject6Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject6Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject6Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject6Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject6Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject6Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts.java new file mode 100644 index 00000000..3e4e1a25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject6ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject6Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6Metadata.java new file mode 100644 index 00000000..640b34a5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject6Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject6Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject6Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject6Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject6Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject6Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject6Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6Options.java new file mode 100644 index 00000000..1b43ffa2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6Options.java @@ -0,0 +1,1113 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionDeletedPreviousObject6Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject6Options { + private final Optional adminAccessTokenExpiresin; + + private final Optional allowSettingLoginScopes; + + private final Optional apiEnableGroups; + + private final Optional apiEnableUsers; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional email; + + private final Optional extAgreedTerms; + + private final Optional extGroups; + + private final Optional extGroupsExtended; + + private final Optional extIsAdmin; + + private final Optional extIsSuspended; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional handleLoginFromSocial; + + private final Optional iconUrl; + + private final Optional mapUserIdToId; + + private final Optional> nonPersistentAttrs; + + private final Optional profile; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject6Options( + Optional adminAccessTokenExpiresin, + Optional allowSettingLoginScopes, + Optional apiEnableGroups, + Optional apiEnableUsers, + String clientId, + Optional domain, + Optional> domainAliases, + Optional email, + Optional extAgreedTerms, + Optional extGroups, + Optional extGroupsExtended, + Optional extIsAdmin, + Optional extIsSuspended, + Optional + federatedConnectionsAccessTokens, + Optional handleLoginFromSocial, + Optional iconUrl, + Optional mapUserIdToId, + Optional> nonPersistentAttrs, + Optional profile, + Optional> scope, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional> upstreamParams, + Map additionalProperties) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; + this.apiEnableUsers = apiEnableUsers; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.email = email; + this.extAgreedTerms = extAgreedTerms; + this.extGroups = extGroups; + this.extGroupsExtended = extGroupsExtended; + this.extIsAdmin = extIsAdmin; + this.extIsSuspended = extIsSuspended; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.handleLoginFromSocial = handleLoginFromSocial; + this.iconUrl = iconUrl; + this.mapUserIdToId = mapUserIdToId; + this.nonPersistentAttrs = nonPersistentAttrs; + this.profile = profile; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. + */ + @JsonProperty("admin_access_token_expiresin") + public Optional getAdminAccessTokenExpiresin() { + return adminAccessTokenExpiresin; + } + + /** + * @return When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. + */ + @JsonProperty("allow_setting_login_scopes") + public Optional getAllowSettingLoginScopes() { + return allowSettingLoginScopes; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false. + */ + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Primary Google Workspace domain name that users must belong to. + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return Whether the OAuth flow requests the email scope. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Fetches the agreedToTerms flag from the Google Directory profile. + */ + @JsonProperty("ext_agreed_terms") + public Optional getExtAgreedTerms() { + return extAgreedTerms; + } + + /** + * @return Enables enrichment with Google group memberships (required for ext_groups_extended). + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true. + */ + @JsonProperty("ext_groups_extended") + public Optional getExtGroupsExtended() { + return extGroupsExtended; + } + + /** + * @return Fetches the Google Directory admin flag for the signing-in user. + */ + @JsonProperty("ext_is_admin") + public Optional getExtIsAdmin() { + return extIsAdmin; + } + + /** + * @return Fetches the Google Directory suspended flag for the signing-in user. + */ + @JsonProperty("ext_is_suspended") + public Optional getExtIsSuspended() { + return extIsSuspended; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. + */ + @JsonProperty("handle_login_from_social") + public Optional getHandleLoginFromSocial() { + return handleLoginFromSocial; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. + */ + @JsonProperty("map_user_id_to_id") + public Optional getMapUserIdToId() { + return mapUserIdToId; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Whether the OAuth flow requests the profile scope. + */ + @JsonProperty("profile") + public Optional getProfile() { + return profile; + } + + /** + * @return Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The Google Workspace primary domain used to identify the organization during authentication. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject6Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject6Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject6Options other) { + return adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) + && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) + && apiEnableUsers.equals(other.apiEnableUsers) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && email.equals(other.email) + && extAgreedTerms.equals(other.extAgreedTerms) + && extGroups.equals(other.extGroups) + && extGroupsExtended.equals(other.extGroupsExtended) + && extIsAdmin.equals(other.extIsAdmin) + && extIsSuspended.equals(other.extIsSuspended) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && handleLoginFromSocial.equals(other.handleLoginFromSocial) + && iconUrl.equals(other.iconUrl) + && mapUserIdToId.equals(other.mapUserIdToId) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && profile.equals(other.profile) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adminAccessTokenExpiresin, + this.allowSettingLoginScopes, + this.apiEnableGroups, + this.apiEnableUsers, + this.clientId, + this.domain, + this.domainAliases, + this.email, + this.extAgreedTerms, + this.extGroups, + this.extGroupsExtended, + this.extIsAdmin, + this.extIsSuspended, + this.federatedConnectionsAccessTokens, + this.handleLoginFromSocial, + this.iconUrl, + this.mapUserIdToId, + this.nonPersistentAttrs, + this.profile, + this.scope, + this.setUserRootAttributes, + this.tenantDomain, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject6Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); + + _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes); + + _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + _FinalStage apiEnableGroups(Optional apiEnableGroups); + + _FinalStage apiEnableGroups(Boolean apiEnableGroups); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(Boolean email); + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + _FinalStage extAgreedTerms(Optional extAgreedTerms); + + _FinalStage extAgreedTerms(Boolean extAgreedTerms); + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + _FinalStage extGroupsExtended(Optional extGroupsExtended); + + _FinalStage extGroupsExtended(Boolean extGroupsExtended); + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + _FinalStage extIsAdmin(Optional extIsAdmin); + + _FinalStage extIsAdmin(Boolean extIsAdmin); + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + _FinalStage extIsSuspended(Optional extIsSuspended); + + _FinalStage extIsSuspended(Boolean extIsSuspended); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial); + + _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + _FinalStage mapUserIdToId(Optional mapUserIdToId); + + _FinalStage mapUserIdToId(Boolean mapUserIdToId); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + _FinalStage profile(Optional profile); + + _FinalStage profile(Boolean profile); + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional> upstreamParams = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional mapUserIdToId = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional handleLoginFromSocial = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extIsSuspended = Optional.empty(); + + private Optional extIsAdmin = Optional.empty(); + + private Optional extGroupsExtended = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional extAgreedTerms = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + private Optional apiEnableGroups = Optional.empty(); + + private Optional allowSettingLoginScopes = Optional.empty(); + + private Optional adminAccessTokenExpiresin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject6Options other) { + adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); + allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); + apiEnableUsers(other.getApiEnableUsers()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + email(other.getEmail()); + extAgreedTerms(other.getExtAgreedTerms()); + extGroups(other.getExtGroups()); + extGroupsExtended(other.getExtGroupsExtended()); + extIsAdmin(other.getExtIsAdmin()); + extIsSuspended(other.getExtIsSuspended()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + handleLoginFromSocial(other.getHandleLoginFromSocial()); + iconUrl(other.getIconUrl()); + mapUserIdToId(other.getMapUserIdToId()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + profile(other.getProfile()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage profile(Boolean profile) { + this.profile = Optional.ofNullable(profile); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "profile", nulls = Nulls.SKIP) + public _FinalStage profile(Optional profile) { + this.profile = profile; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage mapUserIdToId(Boolean mapUserIdToId) { + this.mapUserIdToId = Optional.ofNullable(mapUserIdToId); + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "map_user_id_to_id", nulls = Nulls.SKIP) + public _FinalStage mapUserIdToId(Optional mapUserIdToId) { + this.mapUserIdToId = mapUserIdToId; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial) { + this.handleLoginFromSocial = Optional.ofNullable(handleLoginFromSocial); + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "handle_login_from_social", nulls = Nulls.SKIP) + public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial) { + this.handleLoginFromSocial = handleLoginFromSocial; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsSuspended(Boolean extIsSuspended) { + this.extIsSuspended = Optional.ofNullable(extIsSuspended); + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) + public _FinalStage extIsSuspended(Optional extIsSuspended) { + this.extIsSuspended = extIsSuspended; + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsAdmin(Boolean extIsAdmin) { + this.extIsAdmin = Optional.ofNullable(extIsAdmin); + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_admin", nulls = Nulls.SKIP) + public _FinalStage extIsAdmin(Optional extIsAdmin) { + this.extIsAdmin = extIsAdmin; + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroupsExtended(Boolean extGroupsExtended) { + this.extGroupsExtended = Optional.ofNullable(extGroupsExtended); + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups_extended", nulls = Nulls.SKIP) + public _FinalStage extGroupsExtended(Optional extGroupsExtended) { + this.extGroupsExtended = extGroupsExtended; + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extAgreedTerms(Boolean extAgreedTerms) { + this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) + public _FinalStage extAgreedTerms(Optional extAgreedTerms) { + this.extAgreedTerms = extAgreedTerms; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(Boolean email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public _FinalStage apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes) { + this.allowSettingLoginScopes = Optional.ofNullable(allowSettingLoginScopes); + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_setting_login_scopes", nulls = Nulls.SKIP) + public _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes) { + this.allowSettingLoginScopes = allowSettingLoginScopes; + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = Optional.ofNullable(adminAccessTokenExpiresin); + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "admin_access_token_expiresin", nulls = Nulls.SKIP) + public _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject6Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject6Options( + adminAccessTokenExpiresin, + allowSettingLoginScopes, + apiEnableGroups, + apiEnableUsers, + clientId, + domain, + domainAliases, + email, + extAgreedTerms, + extGroups, + extGroupsExtended, + extIsAdmin, + extIsSuspended, + federatedConnectionsAccessTokens, + handleLoginFromSocial, + iconUrl, + mapUserIdToId, + nonPersistentAttrs, + profile, + scope, + setUserRootAttributes, + tenantDomain, + upstreamParams, + 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/EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..973151e1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject6OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..ef9a580f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum.java new file mode 100644 index 00000000..185705c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum GOOGLE_APPS = + new EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum(Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum valueOf(String value) { + switch (value) { + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject6StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GOOGLE_APPS, + + UNKNOWN + } + + public interface Visitor { + T visitGoogleApps(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7.java new file mode 100644 index 00000000..95f25aa5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionDeletedPreviousObject7.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject7 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject7( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject7 + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject7) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject7 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject7 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionDeletedPreviousObject7Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject7Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject7Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionDeletedPreviousObject7Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionDeletedPreviousObject7Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionDeletedPreviousObject7Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject7 build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject7( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionDeletedPreviousObject7Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7Authentication.java new file mode 100644 index 00000000..de8af8d5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject7Authentication.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject7Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject7Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject7Authentication + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject7Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject7Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject7Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject7Authentication build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject7Authentication( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts.java new file mode 100644 index 00000000..1a7fb75a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject7ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject7Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7Metadata.java new file mode 100644 index 00000000..23cc616d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionDeletedPreviousObject7Metadata.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject7Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject7Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject7Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionDeletedPreviousObject7Metadata build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject7Metadata(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/EventStreamCloudEventConnectionDeletedPreviousObject7Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7Options.java new file mode 100644 index 00000000..e722fe3d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7Options.java @@ -0,0 +1,1308 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionDeletedPreviousObject7Options.Builder.class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject7Options { + private final Optional apiEnableUsers; + + private final Optional appDomain; + + private final Optional appId; + + private final Optional basicProfile; + + private final Optional certRolloverNotification; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional extGroups; + + private final Optional extNestedGroups; + + private final Optional extProfile; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional granted; + + private final Optional iconUrl; + + private final Optional identityApi; + + private final Optional maxGroupsToRetrieve; + + private final Optional> nonPersistentAttrs; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional< + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection; + + private final Optional tenantDomain; + + private final Optional tenantId; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional useWsfed; + + private final Optional useCommonEndpoint; + + private final Optional + useridAttribute; + + private final Optional waadProtocol; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject7Options( + Optional apiEnableUsers, + Optional appDomain, + Optional appId, + Optional basicProfile, + Optional certRolloverNotification, + String clientId, + Optional domain, + Optional> domainAliases, + Optional extGroups, + Optional extNestedGroups, + Optional extProfile, + Optional + federatedConnectionsAccessTokens, + Optional granted, + Optional iconUrl, + Optional identityApi, + Optional maxGroupsToRetrieve, + Optional> nonPersistentAttrs, + Optional> scope, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional tenantDomain, + Optional tenantId, + Optional> thumbprints, + Optional> upstreamParams, + Optional useWsfed, + Optional useCommonEndpoint, + Optional useridAttribute, + Optional waadProtocol, + Map additionalProperties) { + this.apiEnableUsers = apiEnableUsers; + this.appDomain = appDomain; + this.appId = appId; + this.basicProfile = basicProfile; + this.certRolloverNotification = certRolloverNotification; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.extGroups = extGroups; + this.extNestedGroups = extNestedGroups; + this.extProfile = extProfile; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.granted = granted; + this.iconUrl = iconUrl; + this.identityApi = identityApi; + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + this.nonPersistentAttrs = nonPersistentAttrs; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.tenantDomain = tenantDomain; + this.tenantId = tenantId; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.useWsfed = useWsfed; + this.useCommonEndpoint = useCommonEndpoint; + this.useridAttribute = useridAttribute; + this.waadProtocol = waadProtocol; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enable users API + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. + */ + @JsonProperty("app_domain") + public Optional getAppDomain() { + return appDomain; + } + + /** + * @return The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests. + */ + @JsonProperty("app_id") + public Optional getAppId() { + return appId; + } + + /** + * @return Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication. + */ + @JsonProperty("basic_profile") + public Optional getBasicProfile() { + return basicProfile; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com'). + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve. + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included. + */ + @JsonProperty("ext_nested_groups") + public Optional getExtNestedGroups() { + return extNestedGroups; + } + + /** + * @return When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2. + */ + @JsonProperty("ext_profile") + public Optional getExtProfile() { + return extProfile; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. + */ + @JsonProperty("granted") + public Optional getGranted() { + return granted; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("identity_api") + public Optional getIdentityApi() { + return identityApi; + } + + /** + * @return Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default. + */ + @JsonProperty("max_groups_to_retrieve") + public Optional getMaxGroupsToRetrieve() { + return maxGroupsToRetrieve; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. + */ + @JsonProperty("tenantId") + public Optional getTenantId() { + return tenantId; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. + */ + @JsonProperty("use_wsfed") + public Optional getUseWsfed() { + return useWsfed; + } + + /** + * @return When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false. + */ + @JsonProperty("useCommonEndpoint") + public Optional getUseCommonEndpoint() { + return useCommonEndpoint; + } + + @JsonProperty("userid_attribute") + public Optional + getUseridAttribute() { + return useridAttribute; + } + + @JsonProperty("waad_protocol") + public Optional getWaadProtocol() { + return waadProtocol; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionDeletedPreviousObject7Options + && equalTo((EventStreamCloudEventConnectionDeletedPreviousObject7Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionDeletedPreviousObject7Options other) { + return apiEnableUsers.equals(other.apiEnableUsers) + && appDomain.equals(other.appDomain) + && appId.equals(other.appId) + && basicProfile.equals(other.basicProfile) + && certRolloverNotification.equals(other.certRolloverNotification) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && extGroups.equals(other.extGroups) + && extNestedGroups.equals(other.extNestedGroups) + && extProfile.equals(other.extProfile) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && granted.equals(other.granted) + && iconUrl.equals(other.iconUrl) + && identityApi.equals(other.identityApi) + && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && tenantDomain.equals(other.tenantDomain) + && tenantId.equals(other.tenantId) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && useWsfed.equals(other.useWsfed) + && useCommonEndpoint.equals(other.useCommonEndpoint) + && useridAttribute.equals(other.useridAttribute) + && waadProtocol.equals(other.waadProtocol); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.apiEnableUsers, + this.appDomain, + this.appId, + this.basicProfile, + this.certRolloverNotification, + this.clientId, + this.domain, + this.domainAliases, + this.extGroups, + this.extNestedGroups, + this.extProfile, + this.federatedConnectionsAccessTokens, + this.granted, + this.iconUrl, + this.identityApi, + this.maxGroupsToRetrieve, + this.nonPersistentAttrs, + this.scope, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.tenantDomain, + this.tenantId, + this.thumbprints, + this.upstreamParams, + this.useWsfed, + this.useCommonEndpoint, + this.useridAttribute, + this.waadProtocol); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject7Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Enable users API

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + _FinalStage appDomain(Optional appDomain); + + _FinalStage appDomain(String appDomain); + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + _FinalStage appId(Optional appId); + + _FinalStage appId(String appId); + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + _FinalStage basicProfile(Optional basicProfile); + + _FinalStage basicProfile(Boolean basicProfile); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + _FinalStage extNestedGroups(Optional extNestedGroups); + + _FinalStage extNestedGroups(Boolean extNestedGroups); + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + _FinalStage extProfile(Optional extProfile); + + _FinalStage extProfile(Boolean extProfile); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + _FinalStage granted(Optional granted); + + _FinalStage granted(Boolean granted); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage identityApi( + Optional identityApi); + + _FinalStage identityApi( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum identityApi); + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve); + + _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + _FinalStage shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection); + + _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection); + + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + _FinalStage tenantId(Optional tenantId); + + _FinalStage tenantId(String tenantId); + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + _FinalStage useWsfed(Optional useWsfed); + + _FinalStage useWsfed(Boolean useWsfed); + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + _FinalStage useCommonEndpoint(Optional useCommonEndpoint); + + _FinalStage useCommonEndpoint(Boolean useCommonEndpoint); + + _FinalStage useridAttribute( + Optional + useridAttribute); + + _FinalStage useridAttribute( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum useridAttribute); + + _FinalStage waadProtocol( + Optional waadProtocol); + + _FinalStage waadProtocol( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum waadProtocol); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional waadProtocol = + Optional.empty(); + + private Optional + useridAttribute = Optional.empty(); + + private Optional useCommonEndpoint = Optional.empty(); + + private Optional useWsfed = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantId = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional< + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional maxGroupsToRetrieve = Optional.empty(); + + private Optional identityApi = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional granted = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extProfile = Optional.empty(); + + private Optional extNestedGroups = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional basicProfile = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional appDomain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionDeletedPreviousObject7Options other) { + apiEnableUsers(other.getApiEnableUsers()); + appDomain(other.getAppDomain()); + appId(other.getAppId()); + basicProfile(other.getBasicProfile()); + certRolloverNotification(other.getCertRolloverNotification()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + extGroups(other.getExtGroups()); + extNestedGroups(other.getExtNestedGroups()); + extProfile(other.getExtProfile()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + granted(other.getGranted()); + iconUrl(other.getIconUrl()); + identityApi(other.getIdentityApi()); + maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + tenantDomain(other.getTenantDomain()); + tenantId(other.getTenantId()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + useWsfed(other.getUseWsfed()); + useCommonEndpoint(other.getUseCommonEndpoint()); + useridAttribute(other.getUseridAttribute()); + waadProtocol(other.getWaadProtocol()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage waadProtocol( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum waadProtocol) { + this.waadProtocol = Optional.ofNullable(waadProtocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) + public _FinalStage waadProtocol( + Optional waadProtocol) { + this.waadProtocol = waadProtocol; + return this; + } + + @java.lang.Override + public _FinalStage useridAttribute( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum useridAttribute) { + this.useridAttribute = Optional.ofNullable(useridAttribute); + return this; + } + + @java.lang.Override + @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) + public _FinalStage useridAttribute( + Optional + useridAttribute) { + this.useridAttribute = useridAttribute; + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useCommonEndpoint(Boolean useCommonEndpoint) { + this.useCommonEndpoint = Optional.ofNullable(useCommonEndpoint); + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useCommonEndpoint", nulls = Nulls.SKIP) + public _FinalStage useCommonEndpoint(Optional useCommonEndpoint) { + this.useCommonEndpoint = useCommonEndpoint; + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useWsfed(Boolean useWsfed) { + this.useWsfed = Optional.ofNullable(useWsfed); + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) + public _FinalStage useWsfed(Optional useWsfed) { + this.useWsfed = useWsfed; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantId(String tenantId) { + this.tenantId = Optional.ofNullable(tenantId); + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) + public _FinalStage tenantId(Optional tenantId) { + this.tenantId = tenantId; + return this; + } + + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public _FinalStage shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = Optional.ofNullable(maxGroupsToRetrieve); + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) + public _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + return this; + } + + @java.lang.Override + public _FinalStage identityApi( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum identityApi) { + this.identityApi = Optional.ofNullable(identityApi); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_api", nulls = Nulls.SKIP) + public _FinalStage identityApi( + Optional identityApi) { + this.identityApi = identityApi; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage granted(Boolean granted) { + this.granted = Optional.ofNullable(granted); + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "granted", nulls = Nulls.SKIP) + public _FinalStage granted(Optional granted) { + this.granted = granted; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extProfile(Boolean extProfile) { + this.extProfile = Optional.ofNullable(extProfile); + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) + public _FinalStage extProfile(Optional extProfile) { + this.extProfile = extProfile; + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extNestedGroups(Boolean extNestedGroups) { + this.extNestedGroups = Optional.ofNullable(extNestedGroups); + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_nested_groups", nulls = Nulls.SKIP) + public _FinalStage extNestedGroups(Optional extNestedGroups) { + this.extNestedGroups = extNestedGroups; + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage basicProfile(Boolean basicProfile) { + this.basicProfile = Optional.ofNullable(basicProfile); + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) + public _FinalStage basicProfile(Optional basicProfile) { + this.basicProfile = basicProfile; + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appId(String appId) { + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_id", nulls = Nulls.SKIP) + public _FinalStage appId(Optional appId) { + this.appId = appId; + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appDomain(String appDomain) { + this.appDomain = Optional.ofNullable(appDomain); + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_domain", nulls = Nulls.SKIP) + public _FinalStage appDomain(Optional appDomain) { + this.appDomain = appDomain; + return this; + } + + /** + *

                                                              Enable users API

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enable users API

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject7Options build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject7Options( + apiEnableUsers, + appDomain, + appId, + basicProfile, + certRolloverNotification, + clientId, + domain, + domainAliases, + extGroups, + extNestedGroups, + extProfile, + federatedConnectionsAccessTokens, + granted, + iconUrl, + identityApi, + maxGroupsToRetrieve, + nonPersistentAttrs, + scope, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + tenantDomain, + tenantId, + thumbprints, + upstreamParams, + useWsfed, + useCommonEndpoint, + useridAttribute, + waadProtocol, + 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/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..f3df0af0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum.java new file mode 100644 index 00000000..bd38570b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum + AZURE_ACTIVE_DIRECTORY_V10 = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum( + Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum + MICROSOFT_IDENTITY_PLATFORM_V20 = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum( + Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AZURE_ACTIVE_DIRECTORY_V10: + return visitor.visitAzureActiveDirectoryV10(); + case MICROSOFT_IDENTITY_PLATFORM_V20: + return visitor.visitMicrosoftIdentityPlatformV20(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum valueOf(String value) { + switch (value) { + case "azure-active-directory-v1.0": + return AZURE_ACTIVE_DIRECTORY_V10; + case "microsoft-identity-platform-v2.0": + return MICROSOFT_IDENTITY_PLATFORM_V20; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsIdentityApiEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + MICROSOFT_IDENTITY_PLATFORM_V20, + + AZURE_ACTIVE_DIRECTORY_V10, + + UNKNOWN + } + + public interface Visitor { + T visitMicrosoftIdentityPlatformV20(); + + T visitAzureActiveDirectoryV10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..a3fb4e24 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..4e6ed619 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,100 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + valueOf(String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum.java new file mode 100644 index 00000000..3f46d285 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum SUB = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum(Value.SUB, "sub"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum OID = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum(Value.OID, "oid"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUB: + return visitor.visitSub(); + case OID: + return visitor.visitOid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum valueOf( + String value) { + switch (value) { + case "sub": + return SUB; + case "oid": + return OID; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsUseridAttributeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OID, + + SUB, + + UNKNOWN + } + + public interface Visitor { + T visitOid(); + + T visitSub(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum.java new file mode 100644 index 00000000..bc0f86cb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum OPENID_CONNECT = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum( + Value.OPENID_CONNECT, "openid-connect"); + + public static final EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum WS_FEDERATION = + new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum( + Value.WS_FEDERATION, "ws-federation"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID_CONNECT: + return visitor.visitOpenidConnect(); + case WS_FEDERATION: + return visitor.visitWsFederation(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum valueOf(String value) { + switch (value) { + case "openid-connect": + return OPENID_CONNECT; + case "ws-federation": + return WS_FEDERATION; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject7OptionsWaadProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + WS_FEDERATION, + + OPENID_CONNECT, + + UNKNOWN + } + + public interface Visitor { + T visitWsFederation(); + + T visitOpenidConnect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum.java new file mode 100644 index 00000000..c512a565 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum { + public static final EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum WAAD = + new EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum(Value.WAAD, "waad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum(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 EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WAAD: + return visitor.visitWaad(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum valueOf(String value) { + switch (value) { + case "waad": + return WAAD; + default: + return new EventStreamCloudEventConnectionDeletedPreviousObject7StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedTypeEnum.java new file mode 100644 index 00000000..e9f99505 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionDeletedTypeEnum.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 EventStreamCloudEventConnectionDeletedTypeEnum { + public static final EventStreamCloudEventConnectionDeletedTypeEnum CONNECTION_DELETED = + new EventStreamCloudEventConnectionDeletedTypeEnum(Value.CONNECTION_DELETED, "connection.deleted"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionDeletedTypeEnum(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 EventStreamCloudEventConnectionDeletedTypeEnum + && this.string.equals(((EventStreamCloudEventConnectionDeletedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION_DELETED: + return visitor.visitConnectionDeleted(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionDeletedTypeEnum valueOf(String value) { + switch (value) { + case "connection.deleted": + return CONNECTION_DELETED; + default: + return new EventStreamCloudEventConnectionDeletedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION_DELETED, + + UNKNOWN + } + + public interface Visitor { + T visitConnectionDeleted(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdated.java new file mode 100644 index 00000000..bb31eac2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdated.java @@ -0,0 +1,154 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdated.Builder.class) +public final class EventStreamCloudEventConnectionUpdated { + private final String offset; + + private final EventStreamCloudEventConnectionUpdatedCloudEvent event; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdated( + String offset, + EventStreamCloudEventConnectionUpdatedCloudEvent event, + Map additionalProperties) { + this.offset = offset; + this.event = event; + this.additionalProperties = additionalProperties; + } + + /** + * @return Opaque cursor representing position in the stream. Pass as the from query parameter to resume. + */ + @JsonProperty("offset") + public String getOffset() { + return offset; + } + + @JsonProperty("event") + public EventStreamCloudEventConnectionUpdatedCloudEvent getEvent() { + return event; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdated + && equalTo((EventStreamCloudEventConnectionUpdated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdated other) { + return offset.equals(other.offset) && event.equals(other.event); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.offset, this.event); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OffsetStage builder() { + return new Builder(); + } + + public interface OffsetStage { + /** + *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              + */ + EventStage offset(@NotNull String offset); + + Builder from(EventStreamCloudEventConnectionUpdated other); + } + + public interface EventStage { + _FinalStage event(@NotNull EventStreamCloudEventConnectionUpdatedCloudEvent event); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdated build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OffsetStage, EventStage, _FinalStage { + private String offset; + + private EventStreamCloudEventConnectionUpdatedCloudEvent event; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdated other) { + offset(other.getOffset()); + event(other.getEvent()); + return this; + } + + /** + *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("offset") + public EventStage offset(@NotNull String offset) { + this.offset = Objects.requireNonNull(offset, "offset must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("event") + public _FinalStage event(@NotNull EventStreamCloudEventConnectionUpdatedCloudEvent event) { + this.event = Objects.requireNonNull(event, "event must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdated build() { + return new EventStreamCloudEventConnectionUpdated(offset, event, 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/EventStreamCloudEventConnectionUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedCloudEvent.java new file mode 100644 index 00000000..23a65466 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedCloudEvent.java @@ -0,0 +1,407 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedCloudEvent.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedCloudEvent { + private final EventStreamCloudEventSpecVersionEnum specversion; + + private final EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum type; + + private final String source; + + private final String id; + + private final OffsetDateTime time; + + private final EventStreamCloudEventConnectionUpdatedData data; + + private final String a0Tenant; + + private final Optional a0Stream; + + private final Optional a0Purpose; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedCloudEvent( + EventStreamCloudEventSpecVersionEnum specversion, + EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum type, + String source, + String id, + OffsetDateTime time, + EventStreamCloudEventConnectionUpdatedData data, + String a0Tenant, + Optional a0Stream, + Optional a0Purpose, + Map additionalProperties) { + this.specversion = specversion; + this.type = type; + this.source = source; + this.id = id; + this.time = time; + this.data = data; + this.a0Tenant = a0Tenant; + this.a0Stream = a0Stream; + this.a0Purpose = a0Purpose; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("specversion") + public EventStreamCloudEventSpecVersionEnum getSpecversion() { + return specversion; + } + + @JsonProperty("type") + public EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum getType() { + return type; + } + + /** + * @return The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'. + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * @return A unique identifier for the event. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return An ISO-8601 timestamp indicating when the event physically occurred. + */ + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + @JsonProperty("data") + public EventStreamCloudEventConnectionUpdatedData getData() { + return data; + } + + /** + * @return The auth0 tenant ID to which the event is associated. + */ + @JsonProperty("a0tenant") + public String getA0Tenant() { + return a0Tenant; + } + + /** + * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). + */ + @JsonProperty("a0stream") + public Optional getA0Stream() { + return a0Stream; + } + + @JsonProperty("a0purpose") + public Optional getA0Purpose() { + return a0Purpose; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedCloudEvent + && equalTo((EventStreamCloudEventConnectionUpdatedCloudEvent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedCloudEvent other) { + return specversion.equals(other.specversion) + && type.equals(other.type) + && source.equals(other.source) + && id.equals(other.id) + && time.equals(other.time) + && data.equals(other.data) + && a0Tenant.equals(other.a0Tenant) + && a0Stream.equals(other.a0Stream) + && a0Purpose.equals(other.a0Purpose); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.specversion, + this.type, + this.source, + this.id, + this.time, + this.data, + this.a0Tenant, + this.a0Stream, + this.a0Purpose); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SpecversionStage builder() { + return new Builder(); + } + + public interface SpecversionStage { + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); + + Builder from(EventStreamCloudEventConnectionUpdatedCloudEvent other); + } + + public interface TypeStage { + SourceStage type(@NotNull EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum type); + } + + public interface SourceStage { + /** + *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              + */ + IdStage source(@NotNull String source); + } + + public interface IdStage { + /** + *

                                                              A unique identifier for the event.

                                                              + */ + TimeStage id(@NotNull String id); + } + + public interface TimeStage { + /** + *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              + */ + DataStage time(@NotNull OffsetDateTime time); + } + + public interface DataStage { + A0TenantStage data(@NotNull EventStreamCloudEventConnectionUpdatedData data); + } + + public interface A0TenantStage { + /** + *

                                                              The auth0 tenant ID to which the event is associated.

                                                              + */ + _FinalStage a0Tenant(@NotNull String a0Tenant); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedCloudEvent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + + _FinalStage a0Purpose(Optional a0Purpose); + + _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements SpecversionStage, + TypeStage, + SourceStage, + IdStage, + TimeStage, + DataStage, + A0TenantStage, + _FinalStage { + private EventStreamCloudEventSpecVersionEnum specversion; + + private EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum type; + + private String source; + + private String id; + + private OffsetDateTime time; + + private EventStreamCloudEventConnectionUpdatedData data; + + private String a0Tenant; + + private Optional a0Purpose = Optional.empty(); + + private Optional a0Stream = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedCloudEvent other) { + specversion(other.getSpecversion()); + type(other.getType()); + source(other.getSource()); + id(other.getId()); + time(other.getTime()); + data(other.getData()); + a0Tenant(other.getA0Tenant()); + a0Stream(other.getA0Stream()); + a0Purpose(other.getA0Purpose()); + return this; + } + + @java.lang.Override + @JsonSetter("specversion") + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { + this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public SourceStage type(@NotNull EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("source") + public IdStage source(@NotNull String source) { + this.source = Objects.requireNonNull(source, "source must not be null"); + return this; + } + + /** + *

                                                              A unique identifier for the event.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TimeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("time") + public DataStage time(@NotNull OffsetDateTime time) { + this.time = Objects.requireNonNull(time, "time must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("data") + public A0TenantStage data(@NotNull EventStreamCloudEventConnectionUpdatedData data) { + this.data = Objects.requireNonNull(data, "data must not be null"); + return this; + } + + /** + *

                                                              The auth0 tenant ID to which the event is associated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("a0tenant") + public _FinalStage a0Tenant(@NotNull String a0Tenant) { + this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { + this.a0Purpose = Optional.ofNullable(a0Purpose); + return this; + } + + @java.lang.Override + @JsonSetter(value = "a0purpose", nulls = Nulls.SKIP) + public _FinalStage a0Purpose(Optional a0Purpose) { + this.a0Purpose = a0Purpose; + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedCloudEvent build() { + return new EventStreamCloudEventConnectionUpdatedCloudEvent( + specversion, type, source, id, time, data, a0Tenant, a0Stream, a0Purpose, 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/EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum.java new file mode 100644 index 00000000..f6b20385 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum { + public static final EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum CONNECTION_UPDATED = + new EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum( + Value.CONNECTION_UPDATED, "connection.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum(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 EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION_UPDATED: + return visitor.visitConnectionUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum valueOf(String value) { + switch (value) { + case "connection.updated": + return CONNECTION_UPDATED; + default: + return new EventStreamCloudEventConnectionUpdatedCloudEventTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitConnectionUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedData.java new file mode 100644 index 00000000..9fb49afe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedData.java @@ -0,0 +1,185 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedData.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedData { + private final EventStreamCloudEventConnectionUpdatedObject object; + + private final Optional previousObject; + + private final Optional context; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedData( + EventStreamCloudEventConnectionUpdatedObject object, + Optional previousObject, + Optional context, + Map additionalProperties) { + this.object = object; + this.previousObject = previousObject; + this.context = context; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("object") + public EventStreamCloudEventConnectionUpdatedObject getObject() { + return object; + } + + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + + @JsonProperty("context") + public Optional getContext() { + return context; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedData + && equalTo((EventStreamCloudEventConnectionUpdatedData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedData other) { + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.object, this.previousObject, this.context); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ObjectStage builder() { + return new Builder(); + } + + public interface ObjectStage { + _FinalStage object(@NotNull EventStreamCloudEventConnectionUpdatedObject object); + + Builder from(EventStreamCloudEventConnectionUpdatedData other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedData build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventConnectionUpdatedPreviousObject previousObject); + + _FinalStage context(Optional context); + + _FinalStage context(EventStreamCloudEventContext context); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ObjectStage, _FinalStage { + private EventStreamCloudEventConnectionUpdatedObject object; + + private Optional context = Optional.empty(); + + private Optional previousObject = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedData other) { + object(other.getObject()); + previousObject(other.getPreviousObject()); + context(other.getContext()); + return this; + } + + @java.lang.Override + @JsonSetter("object") + public _FinalStage object(@NotNull EventStreamCloudEventConnectionUpdatedObject object) { + this.object = Objects.requireNonNull(object, "object must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage context(EventStreamCloudEventContext context) { + this.context = Optional.ofNullable(context); + return this; + } + + @java.lang.Override + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public _FinalStage context(Optional context) { + this.context = context; + return this; + } + + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventConnectionUpdatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedData build() { + return new EventStreamCloudEventConnectionUpdatedData( + object, previousObject, context, 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/EventStreamCloudEventConnectionUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject.java new file mode 100644 index 00000000..db70f490 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject.java @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventConnectionUpdatedObject.Deserializer.class) +public final class EventStreamCloudEventConnectionUpdatedObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventConnectionUpdatedObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject2) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject3) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject4) this.value); + } else if (this.type == 5) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject5) this.value); + } else if (this.type == 6) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject6) this.value); + } else if (this.type == 7) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedObject7) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject + && equalTo((EventStreamCloudEventConnectionUpdatedObject) other); + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject0 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 0); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject1 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 1); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject2 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 2); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject3 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 3); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject4 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 4); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject5 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 5); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject6 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 6); + } + + public static EventStreamCloudEventConnectionUpdatedObject of(EventStreamCloudEventConnectionUpdatedObject7 value) { + return new EventStreamCloudEventConnectionUpdatedObject(value, 7); + } + + public interface Visitor { + T visit(EventStreamCloudEventConnectionUpdatedObject0 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject1 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject2 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject3 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject4 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject5 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject6 value); + + T visit(EventStreamCloudEventConnectionUpdatedObject7 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventConnectionUpdatedObject.class); + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject2.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject3.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject4.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject5.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject6.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedObject7.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0.java new file mode 100644 index 00000000..c110b385 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject0.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0 { + private final Optional authentication; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional connectedAccounts; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject0StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0( + Optional authentication, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional connectedAccounts, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject0StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.connectedAccounts = connectedAccounts; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject0StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0 + && equalTo((EventStreamCloudEventConnectionUpdatedObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0 other) { + return authentication.equals(other.authentication) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && connectedAccounts.equals(other.connectedAccounts) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.connectedAccounts, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject0StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject0Authentication authentication); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject0Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts connectedAccounts); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject0Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject0StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject0 other) { + authentication(other.getAuthentication()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + connectedAccounts(other.getConnectedAccounts()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject0StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject0Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject0Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject0Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject0 build() { + return new EventStreamCloudEventConnectionUpdatedObject0( + authentication, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + connectedAccounts, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject0Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0Authentication.java new file mode 100644 index 00000000..17e19d1c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject0Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject0Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject0Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject0Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject0Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject0Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject0Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts.java new file mode 100644 index 00000000..7baaa9d9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts.java @@ -0,0 +1,150 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts { + private final boolean active; + + private final Optional crossAppAccess; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts( + boolean active, Optional crossAppAccess, Map additionalProperties) { + this.active = active; + this.crossAppAccess = crossAppAccess; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @JsonProperty("cross_app_access") + public Optional getCrossAppAccess() { + return crossAppAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts other) { + return active == other.active && crossAppAccess.equals(other.crossAppAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.crossAppAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage crossAppAccess(Optional crossAppAccess); + + _FinalStage crossAppAccess(Boolean crossAppAccess); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + private Optional crossAppAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts other) { + active(other.getActive()); + crossAppAccess(other.getCrossAppAccess()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccess(Boolean crossAppAccess) { + this.crossAppAccess = Optional.ofNullable(crossAppAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access", nulls = Nulls.SKIP) + public _FinalStage crossAppAccess(Optional crossAppAccess) { + this.crossAppAccess = crossAppAccess; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject0ConnectedAccounts( + active, crossAppAccess, 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/EventStreamCloudEventConnectionUpdatedObject0Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0Metadata.java new file mode 100644 index 00000000..cde119ee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject0Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject0Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject0Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject0Metadata(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/EventStreamCloudEventConnectionUpdatedObject0Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0Options.java new file mode 100644 index 00000000..90c518dd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0Options.java @@ -0,0 +1,1286 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject0Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional connectionSettings; + + private final Optional> domainAliases; + + private final Optional dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional discoveryUrl; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional discoveryUrl, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.discoveryUrl = discoveryUrl; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject0Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && discoveryUrl.equals(other.discoveryUrl) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.discoveryUrl, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedObject0Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject0Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion(EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap attributeMap); + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + _FinalStage discoveryUrl(Optional discoveryUrl); + + _FinalStage discoveryUrl(String discoveryUrl); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional dpopSigningAlg = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional connectionSettings = + Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject0Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + discoveryUrl(other.getDiscoveryUrl()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public _FinalStage discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap(EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata(EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject0Options build() { + return new EventStreamCloudEventConnectionUpdatedObject0Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + discoveryUrl, + type, + 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/EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap.java new file mode 100644 index 00000000..d32bae33 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap.java @@ -0,0 +1,166 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional mappingMode = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..ee1209cf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum BIND_ALL = + new EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum( + Value.BIND_ALL, "bind_all"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum USE_MAP = + new EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BIND_ALL: + return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "bind_all": + return BIND_ALL; + case "use_map": + return USE_MAP; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BIND_ALL, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBindAll(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings.java new file mode 100644 index 00000000..b1aa71c0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce(EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..ed860681 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum(Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum(Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum DISABLED = + new EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum(Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum valueOf(String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..127691d7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum.java @@ -0,0 +1,110 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsDpopSigningAlgEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..fcf285cf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedObject0OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..e438cacf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,155 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS512 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum ES384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum PS384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum ES256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum PS256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum RS256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum(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 + EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata.java new file mode 100644 index 00000000..95853a26 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionUpdatedObject0OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..7f7fee85 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum.java @@ -0,0 +1,88 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum(Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsSchemaVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..5d24645e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..0d39bfbb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..2ef74fe7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,153 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum RS512 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum PS384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum PS256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum RS384 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum RS256 = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..0d621dc3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum ISSUER = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum.java new file mode 100644 index 00000000..639129c3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum.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 EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum FRONT_CHANNEL = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum(Value.FRONT_CHANNEL, "front_channel"); + + public static final EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum(Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum(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 EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FRONT_CHANNEL: + return visitor.visitFrontChannel(); + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum valueOf(String value) { + switch (value) { + case "front_channel": + return FRONT_CHANNEL; + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionUpdatedObject0OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + FRONT_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitFrontChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0StrategyEnum.java new file mode 100644 index 00000000..e42d29de --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject0StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject0StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject0StrategyEnum OIDC = + new EventStreamCloudEventConnectionUpdatedObject0StrategyEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject0StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject0StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject0StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject0StrategyEnum valueOf(String value) { + switch (value) { + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionUpdatedObject0StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1.java new file mode 100644 index 00000000..e421465d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject1.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject1StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject1StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject1StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1 + && equalTo((EventStreamCloudEventConnectionUpdatedObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject1StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject1Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject1Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject1Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject1StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject1 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject1StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject1Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject1Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject1Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject1 build() { + return new EventStreamCloudEventConnectionUpdatedObject1( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject1Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1Authentication.java new file mode 100644 index 00000000..dd46f52f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject1Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject1Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject1Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject1Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject1Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject1Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject1Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts.java new file mode 100644 index 00000000..c5a82240 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject1ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject1Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1Metadata.java new file mode 100644 index 00000000..9c091c47 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject1Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject1Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject1Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject1Metadata(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/EventStreamCloudEventConnectionUpdatedObject1Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1Options.java new file mode 100644 index 00000000..21074902 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1Options.java @@ -0,0 +1,1286 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject1Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional connectionSettings; + + private final Optional> domainAliases; + + private final Optional dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional domain; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional domain, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.domain = domain; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject1Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && domain.equals(other.domain) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.domain, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedObject1Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject1Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion(EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap attributeMap); + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional dpopSigningAlg = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional connectionSettings = + Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject1Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + domain(other.getDomain()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap(EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata(EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject1Options build() { + return new EventStreamCloudEventConnectionUpdatedObject1Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + domain, + type, + 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/EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap.java new file mode 100644 index 00000000..44529741 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap.java @@ -0,0 +1,166 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional mappingMode = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..95ef02f3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum USE_MAP = + new EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum BASIC_PROFILE = + new EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum( + Value.BASIC_PROFILE, "basic_profile"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USE_MAP: + return visitor.visitUseMap(); + case BASIC_PROFILE: + return visitor.visitBasicProfile(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "use_map": + return USE_MAP; + case "basic_profile": + return BASIC_PROFILE; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BASIC_PROFILE, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBasicProfile(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings.java new file mode 100644 index 00000000..75b94a43 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce(EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..d52cd1c0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum(Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum(Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum DISABLED = + new EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum(Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum valueOf(String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..896f2e24 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum.java @@ -0,0 +1,110 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum(Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsDpopSigningAlgEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..1d6fcd64 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedObject1OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..ef6eab78 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,155 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS512 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum ES384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum PS384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum ES256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum PS256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum RS256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum(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 + EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata.java new file mode 100644 index 00000000..3e184308 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionUpdatedObject1OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..22242231 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum.java @@ -0,0 +1,88 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum(Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsSchemaVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..4713ca52 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..efe6e232 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..30f068cc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,153 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum RS512 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum PS384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum PS256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum RS384 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum RS256 = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..948efb55 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum ISSUER = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum.java new file mode 100644 index 00000000..f42ed018 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum(Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum(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 EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum valueOf(String value) { + switch (value) { + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionUpdatedObject1OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1StrategyEnum.java new file mode 100644 index 00000000..3af07bf6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject1StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject1StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject1StrategyEnum OKTA = + new EventStreamCloudEventConnectionUpdatedObject1StrategyEnum(Value.OKTA, "okta"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject1StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject1StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject1StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OKTA: + return visitor.visitOkta(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject1StrategyEnum valueOf(String value) { + switch (value) { + case "okta": + return OKTA; + default: + return new EventStreamCloudEventConnectionUpdatedObject1StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OKTA, + + UNKNOWN + } + + public interface Visitor { + T visitOkta(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2.java new file mode 100644 index 00000000..ec31b0d1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject2.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject2StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject2StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject2StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2 + && equalTo((EventStreamCloudEventConnectionUpdatedObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject2StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject2Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject2Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject2Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject2StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject2 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject2StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject2Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject2Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject2Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject2 build() { + return new EventStreamCloudEventConnectionUpdatedObject2( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject2Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2Authentication.java new file mode 100644 index 00000000..08b9c64a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject2Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject2Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject2Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject2Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject2Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject2Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts.java new file mode 100644 index 00000000..e936d850 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject2ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject2Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2Metadata.java new file mode 100644 index 00000000..c7e8c124 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject2Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject2Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject2Metadata(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/EventStreamCloudEventConnectionUpdatedObject2Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2Options.java new file mode 100644 index 00000000..d59feeb8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2Options.java @@ -0,0 +1,1210 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional debug; + + private final Optional deflate; + + private final Optional destinationUrl; + + private final Optional disableFieldsMapFix; + + private final Optional disableSignout; + + private final Optional discoveryUrl; + + private final Optional> fieldsMap; + + private final Optional fieldsMapJsonRaw; + + private final Optional globalTokenRevocationJwtIss; + + private final Optional globalTokenRevocationJwtSub; + + private final Optional metadataUrl; + + private final Optional oidcMetadata; + + private final Optional recipientUrl; + + private final Optional requestTemplate; + + private final Optional signOutEndpoint; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional debug, + Optional deflate, + Optional destinationUrl, + Optional disableFieldsMapFix, + Optional disableSignout, + Optional discoveryUrl, + Optional> fieldsMap, + Optional fieldsMapJsonRaw, + Optional globalTokenRevocationJwtIss, + Optional globalTokenRevocationJwtSub, + Optional metadataUrl, + Optional oidcMetadata, + Optional recipientUrl, + Optional requestTemplate, + Optional signOutEndpoint, + Optional userIdAttribute, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.debug = debug; + this.deflate = deflate; + this.destinationUrl = destinationUrl; + this.disableFieldsMapFix = disableFieldsMapFix; + this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; + this.fieldsMap = fieldsMap; + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + this.metadataUrl = metadataUrl; + this.oidcMetadata = oidcMetadata; + this.recipientUrl = recipientUrl; + this.requestTemplate = requestTemplate; + this.signOutEndpoint = signOutEndpoint; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes. + */ + @JsonProperty("debug") + public Optional getDebug() { + return debug; + } + + /** + * @return When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. + */ + @JsonProperty("deflate") + public Optional getDeflate() { + return deflate; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("destinationUrl") + public Optional getDestinationUrl() { + return destinationUrl; + } + + /** + * @return When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled). + */ + @JsonProperty("disableFieldsMapFix") + public Optional getDisableFieldsMapFix() { + return disableFieldsMapFix; + } + + /** + * @return When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). + */ + @JsonProperty("disableSignout") + public Optional getDisableSignout() { + return disableSignout; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("fieldsMap") + public Optional> getFieldsMap() { + return fieldsMap; + } + + /** + * @return Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object. + */ + @JsonProperty("fieldsMapJsonRaw") + public Optional getFieldsMapJsonRaw() { + return fieldsMapJsonRaw; + } + + /** + * @return Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. + */ + @JsonProperty("global_token_revocation_jwt_iss") + public Optional getGlobalTokenRevocationJwtIss() { + return globalTokenRevocationJwtIss; + } + + /** + * @return Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. + */ + @JsonProperty("global_token_revocation_jwt_sub") + public Optional getGlobalTokenRevocationJwtSub() { + return globalTokenRevocationJwtSub; + } + + /** + * @return HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. + */ + @JsonProperty("metadataUrl") + public Optional getMetadataUrl() { + return metadataUrl; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("recipientUrl") + public Optional getRecipientUrl() { + return recipientUrl; + } + + /** + * @return Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template + */ + @JsonProperty("requestTemplate") + public Optional getRequestTemplate() { + return requestTemplate; + } + + /** + * @return Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. + */ + @JsonProperty("signOutEndpoint") + public Optional getSignOutEndpoint() { + return signOutEndpoint; + } + + /** + * @return Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject2Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && debug.equals(other.debug) + && deflate.equals(other.deflate) + && destinationUrl.equals(other.destinationUrl) + && disableFieldsMapFix.equals(other.disableFieldsMapFix) + && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) + && fieldsMap.equals(other.fieldsMap) + && fieldsMapJsonRaw.equals(other.fieldsMapJsonRaw) + && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) + && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) + && metadataUrl.equals(other.metadataUrl) + && oidcMetadata.equals(other.oidcMetadata) + && recipientUrl.equals(other.recipientUrl) + && requestTemplate.equals(other.requestTemplate) + && signOutEndpoint.equals(other.signOutEndpoint) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.debug, + this.deflate, + this.destinationUrl, + this.disableFieldsMapFix, + this.disableSignout, + this.discoveryUrl, + this.fieldsMap, + this.fieldsMapJsonRaw, + this.globalTokenRevocationJwtIss, + this.globalTokenRevocationJwtSub, + this.metadataUrl, + this.oidcMetadata, + this.recipientUrl, + this.requestTemplate, + this.signOutEndpoint, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional + assertionDecryptionSettings = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional digestAlgorithm = + Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional protocolBinding = + Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional subject = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional debug = Optional.empty(); + + private Optional deflate = Optional.empty(); + + private Optional destinationUrl = Optional.empty(); + + private Optional disableFieldsMapFix = Optional.empty(); + + private Optional disableSignout = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional> fieldsMap = Optional.empty(); + + private Optional fieldsMapJsonRaw = Optional.empty(); + + private Optional globalTokenRevocationJwtIss = Optional.empty(); + + private Optional globalTokenRevocationJwtSub = Optional.empty(); + + private Optional metadataUrl = Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional recipientUrl = Optional.empty(); + + private Optional requestTemplate = Optional.empty(); + + private Optional signOutEndpoint = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject2Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + debug(other.getDebug()); + deflate(other.getDeflate()); + destinationUrl(other.getDestinationUrl()); + disableFieldsMapFix(other.getDisableFieldsMapFix()); + disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); + fieldsMap(other.getFieldsMap()); + fieldsMapJsonRaw(other.getFieldsMapJsonRaw()); + globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); + globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); + metadataUrl(other.getMetadataUrl()); + oidcMetadata(other.getOidcMetadata()); + recipientUrl(other.getRecipientUrl()); + requestTemplate(other.getRequestTemplate()); + signOutEndpoint(other.getSignOutEndpoint()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings( + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public Builder cert(Optional cert) { + this.cert = cert; + return this; + } + + public Builder cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public Builder digestAlgorithm( + Optional digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + public Builder digestAlgorithm( + EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public Builder expires(Optional expires) { + this.expires = expires; + return this; + } + + public Builder expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public Builder idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + public Builder idpinitiated(EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public Builder protocolBinding( + Optional protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + public Builder protocolBinding( + EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public Builder signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + public Builder signatureAlgorithm( + EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public Builder signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + public Builder signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public Builder signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + public Builder signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public Builder subject(Optional subject) { + this.subject = subject; + return this; + } + + public Builder subject(EventStreamCloudEventConnectionUpdatedObject2OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes.

                                                              + */ + @JsonSetter(value = "debug", nulls = Nulls.SKIP) + public Builder debug(Optional debug) { + this.debug = debug; + return this; + } + + public Builder debug(Boolean debug) { + this.debug = Optional.ofNullable(debug); + return this; + } + + /** + *

                                                              When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding.

                                                              + */ + @JsonSetter(value = "deflate", nulls = Nulls.SKIP) + public Builder deflate(Optional deflate) { + this.deflate = deflate; + return this; + } + + public Builder deflate(Boolean deflate) { + this.deflate = Optional.ofNullable(deflate); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "destinationUrl", nulls = Nulls.SKIP) + public Builder destinationUrl(Optional destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + public Builder destinationUrl(String destinationUrl) { + this.destinationUrl = Optional.ofNullable(destinationUrl); + return this; + } + + /** + *

                                                              When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled).

                                                              + */ + @JsonSetter(value = "disableFieldsMapFix", nulls = Nulls.SKIP) + public Builder disableFieldsMapFix(Optional disableFieldsMapFix) { + this.disableFieldsMapFix = disableFieldsMapFix; + return this; + } + + public Builder disableFieldsMapFix(Boolean disableFieldsMapFix) { + this.disableFieldsMapFix = Optional.ofNullable(disableFieldsMapFix); + return this; + } + + /** + *

                                                              When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled).

                                                              + */ + @JsonSetter(value = "disableSignout", nulls = Nulls.SKIP) + public Builder disableSignout(Optional disableSignout) { + this.disableSignout = disableSignout; + return this; + } + + public Builder disableSignout(Boolean disableSignout) { + this.disableSignout = Optional.ofNullable(disableSignout); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access.

                                                              + */ + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) + public Builder fieldsMap(Optional> fieldsMap) { + this.fieldsMap = fieldsMap; + return this; + } + + public Builder fieldsMap(Map fieldsMap) { + this.fieldsMap = Optional.ofNullable(fieldsMap); + return this; + } + + /** + *

                                                              Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object.

                                                              + */ + @JsonSetter(value = "fieldsMapJsonRaw", nulls = Nulls.SKIP) + public Builder fieldsMapJsonRaw(Optional fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + return this; + } + + public Builder fieldsMapJsonRaw(String fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = Optional.ofNullable(fieldsMapJsonRaw); + return this; + } + + /** + *

                                                              Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_iss", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtIss(Optional globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + return this; + } + + public Builder globalTokenRevocationJwtIss(String globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = Optional.ofNullable(globalTokenRevocationJwtIss); + return this; + } + + /** + *

                                                              Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_sub", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtSub(Optional globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + return this; + } + + public Builder globalTokenRevocationJwtSub(String globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = Optional.ofNullable(globalTokenRevocationJwtSub); + return this; + } + + /** + *

                                                              HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both.

                                                              + */ + @JsonSetter(value = "metadataUrl", nulls = Nulls.SKIP) + public Builder metadataUrl(Optional metadataUrl) { + this.metadataUrl = metadataUrl; + return this; + } + + public Builder metadataUrl(String metadataUrl) { + this.metadataUrl = Optional.ofNullable(metadataUrl); + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata(EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) + public Builder recipientUrl(Optional recipientUrl) { + this.recipientUrl = recipientUrl; + return this; + } + + public Builder recipientUrl(String recipientUrl) { + this.recipientUrl = Optional.ofNullable(recipientUrl); + return this; + } + + /** + *

                                                              Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template

                                                              + */ + @JsonSetter(value = "requestTemplate", nulls = Nulls.SKIP) + public Builder requestTemplate(Optional requestTemplate) { + this.requestTemplate = requestTemplate; + return this; + } + + public Builder requestTemplate(String requestTemplate) { + this.requestTemplate = Optional.ofNullable(requestTemplate); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false.

                                                              + */ + @JsonSetter(value = "signOutEndpoint", nulls = Nulls.SKIP) + public Builder signOutEndpoint(Optional signOutEndpoint) { + this.signOutEndpoint = signOutEndpoint; + return this; + } + + public Builder signOutEndpoint(String signOutEndpoint) { + this.signOutEndpoint = Optional.ofNullable(signOutEndpoint); + return this; + } + + /** + *

                                                              Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject2Options build() { + return new EventStreamCloudEventConnectionUpdatedObject2Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + debug, + deflate, + destinationUrl, + disableFieldsMapFix, + disableSignout, + discoveryUrl, + fieldsMap, + fieldsMapJsonRaw, + globalTokenRevocationJwtIss, + globalTokenRevocationJwtSub, + metadataUrl, + oidcMetadata, + recipientUrl, + requestTemplate, + signOutEndpoint, + userIdAttribute, + 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/EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..b0c1e5a7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings.java @@ -0,0 +1,178 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..644adefc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionUpdatedObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..3297ee82 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum.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 EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum valueOf(String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionUpdatedObject2OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated.java new file mode 100644 index 00000000..1374b262 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..7b2caa35 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,104 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum WSFED = + new EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum SAMLP = + new EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum OIDC = + new EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum(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 EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionUpdatedObject2OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata.java new file mode 100644 index 00000000..209e48c1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionUpdatedObject2OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..edd2b8df --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum.java @@ -0,0 +1,95 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum valueOf(String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionUpdatedObject2OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..9ffc6daa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject2OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..04dc4c76 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum(Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum valueOf(String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionUpdatedObject2OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSubject.java new file mode 100644 index 00000000..7eb6cabf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2OptionsSubject.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject2OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject2OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject2OptionsSubject(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject2OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject2OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject2OptionsSubject build() { + return new EventStreamCloudEventConnectionUpdatedObject2OptionsSubject(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/EventStreamCloudEventConnectionUpdatedObject2StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2StrategyEnum.java new file mode 100644 index 00000000..ed2fd7cc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject2StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject2StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject2StrategyEnum SAMLP = + new EventStreamCloudEventConnectionUpdatedObject2StrategyEnum(Value.SAMLP, "samlp"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject2StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject2StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject2StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SAMLP: + return visitor.visitSamlp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject2StrategyEnum valueOf(String value) { + switch (value) { + case "samlp": + return SAMLP; + default: + return new EventStreamCloudEventConnectionUpdatedObject2StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3.java new file mode 100644 index 00000000..27727db5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject3.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject3StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject3StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject3StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3 + && equalTo((EventStreamCloudEventConnectionUpdatedObject3) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject3 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject3 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject3StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject3 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject3Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject3Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject3Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject3StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject3 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject3StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject3Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject3Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject3Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject3 build() { + return new EventStreamCloudEventConnectionUpdatedObject3( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject3Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3Authentication.java new file mode 100644 index 00000000..d464f52e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject3Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject3Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject3Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject3Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject3Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject3Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject3Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject3Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts.java new file mode 100644 index 00000000..a9d50ab6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject3ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject3Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3Metadata.java new file mode 100644 index 00000000..e86c50a8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject3Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject3Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject3Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject3Metadata(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/EventStreamCloudEventConnectionUpdatedObject3Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3Options.java new file mode 100644 index 00000000..1d847154 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3Options.java @@ -0,0 +1,979 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionUpdatedObject3Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final String pingFederateBaseUrl; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + String pingFederateBaseUrl, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.pingFederateBaseUrl = pingFederateBaseUrl; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return URL provided by PingFederate which returns information used for creating the connection + */ + @JsonProperty("pingFederateBaseUrl") + public String getPingFederateBaseUrl() { + return pingFederateBaseUrl; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject3Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject3Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && pingFederateBaseUrl.equals(other.pingFederateBaseUrl); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.pingFederateBaseUrl); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PingFederateBaseUrlStage builder() { + return new Builder(); + } + + public interface PingFederateBaseUrlStage { + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + */ + _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); + + Builder from(EventStreamCloudEventConnectionUpdatedObject3Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject3Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings); + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + _FinalStage cert(Optional cert); + + _FinalStage cert(String cert); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + _FinalStage digestAlgorithm( + Optional digestAlgorithm); + + _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum digestAlgorithm); + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + _FinalStage entityId(Optional entityId); + + _FinalStage entityId(String entityId); + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + _FinalStage expires(Optional expires); + + _FinalStage expires(OffsetDateTime expires); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage idpinitiated( + Optional idpinitiated); + + _FinalStage idpinitiated(EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated idpinitiated); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage protocolBinding( + Optional protocolBinding); + + _FinalStage protocolBinding( + EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum protocolBinding); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum setUserRootAttributes); + + _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm); + + _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum signatureAlgorithm); + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + _FinalStage signInEndpoint(Optional signInEndpoint); + + _FinalStage signInEndpoint(String signInEndpoint); + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + _FinalStage signingCert(Optional signingCert); + + _FinalStage signingCert(String signingCert); + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + _FinalStage signSamlRequest(Optional signSamlRequest); + + _FinalStage signSamlRequest(Boolean signSamlRequest); + + _FinalStage subject(Optional subject); + + _FinalStage subject(EventStreamCloudEventConnectionUpdatedObject3OptionsSubject subject); + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { + private String pingFederateBaseUrl; + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional subject = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional protocolBinding = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional digestAlgorithm = + Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional + assertionDecryptionSettings = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject3Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + pingFederateBaseUrl(other.getPingFederateBaseUrl()); + return this; + } + + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("pingFederateBaseUrl") + public _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl) { + this.pingFederateBaseUrl = + Objects.requireNonNull(pingFederateBaseUrl, "pingFederateBaseUrl must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage subject(EventStreamCloudEventConnectionUpdatedObject3OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public _FinalStage subject(Optional subject) { + this.subject = subject; + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public _FinalStage signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public _FinalStage signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public _FinalStage signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + @java.lang.Override + public _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + @java.lang.Override + public _FinalStage protocolBinding( + EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public _FinalStage protocolBinding( + Optional protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + @java.lang.Override + public _FinalStage idpinitiated(EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + @java.lang.Override + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public _FinalStage idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public _FinalStage expires(Optional expires) { + this.expires = expires; + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public _FinalStage entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public _FinalStage digestAlgorithm( + Optional digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public _FinalStage cert(Optional cert) { + this.cert = cert; + return this; + } + + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject3Options build() { + return new EventStreamCloudEventConnectionUpdatedObject3Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + pingFederateBaseUrl, + 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/EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..86b3f664 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings.java @@ -0,0 +1,178 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..e9dbee16 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + valueOf(String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionUpdatedObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..8c80bb4b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum.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 EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum valueOf(String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionUpdatedObject3OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated.java new file mode 100644 index 00000000..978a7024 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..e4c22d5c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,104 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum WSFED = + new EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum SAMLP = + new EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum OIDC = + new EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum(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 EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionUpdatedObject3OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..39b5d04d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum.java @@ -0,0 +1,95 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum valueOf(String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionUpdatedObject3OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..1b6af939 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject3OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..41966b58 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum(Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum valueOf(String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionUpdatedObject3OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSubject.java new file mode 100644 index 00000000..d902994a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3OptionsSubject.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject3OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject3OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject3OptionsSubject(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject3OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject3OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject3OptionsSubject build() { + return new EventStreamCloudEventConnectionUpdatedObject3OptionsSubject(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/EventStreamCloudEventConnectionUpdatedObject3StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3StrategyEnum.java new file mode 100644 index 00000000..590be737 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject3StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject3StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject3StrategyEnum PINGFEDERATE = + new EventStreamCloudEventConnectionUpdatedObject3StrategyEnum(Value.PINGFEDERATE, "pingfederate"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject3StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject3StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject3StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject3StrategyEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + default: + return new EventStreamCloudEventConnectionUpdatedObject3StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4.java new file mode 100644 index 00000000..6250a25f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject4.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject4 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject4StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject4( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject4StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject4StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject4 + && equalTo((EventStreamCloudEventConnectionUpdatedObject4) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject4 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject4 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject4StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject4 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject4Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject4Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject4Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject4StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject4 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject4StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject4Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject4Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject4Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject4 build() { + return new EventStreamCloudEventConnectionUpdatedObject4( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject4Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4Authentication.java new file mode 100644 index 00000000..c07297f5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject4Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject4Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject4Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject4Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject4Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject4Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject4Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject4Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject4Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject4Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject4Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts.java new file mode 100644 index 00000000..1fda0355 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject4ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject4Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4Metadata.java new file mode 100644 index 00000000..cbb89823 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject4Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject4Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject4Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject4Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject4Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject4Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject4Metadata(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/EventStreamCloudEventConnectionUpdatedObject4Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4Options.java new file mode 100644 index 00000000..2c919ba8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4Options.java @@ -0,0 +1,564 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject4Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject4Options { + private final Optional adfsServer; + + private final Optional certRolloverNotification; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional fedMetadataXml; + + private final Optional iconUrl; + + private final Optional> nonPersistentAttrs; + + private final Optional> prevThumbprints; + + private final Optional + setUserRootAttributes; + + private final Optional + shouldTrustEmailVerifiedConnection; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject4Options( + Optional adfsServer, + Optional certRolloverNotification, + Optional> domainAliases, + Optional entityId, + Optional fedMetadataXml, + Optional iconUrl, + Optional> nonPersistentAttrs, + Optional> prevThumbprints, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional userIdAttribute, + Map additionalProperties) { + this.adfsServer = adfsServer; + this.certRolloverNotification = certRolloverNotification; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.fedMetadataXml = fedMetadataXml; + this.iconUrl = iconUrl; + this.nonPersistentAttrs = nonPersistentAttrs; + this.prevThumbprints = prevThumbprints; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + /** + * @return ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. + */ + @JsonProperty("adfs_server") + public Optional getAdfsServer() { + return adfsServer; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. + */ + @JsonProperty("fedMetadataXml") + public Optional getFedMetadataXml() { + return fedMetadataXml; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("prev_thumbprints") + public Optional> getPrevThumbprints() { + return prevThumbprints; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + /** + * @return Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject4Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject4Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject4Options other) { + return adfsServer.equals(other.adfsServer) + && certRolloverNotification.equals(other.certRolloverNotification) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && fedMetadataXml.equals(other.fedMetadataXml) + && iconUrl.equals(other.iconUrl) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && prevThumbprints.equals(other.prevThumbprints) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adfsServer, + this.certRolloverNotification, + this.domainAliases, + this.entityId, + this.fedMetadataXml, + this.iconUrl, + this.nonPersistentAttrs, + this.prevThumbprints, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional adfsServer = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional fedMetadataXml = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional> prevThumbprints = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject4Options other) { + adfsServer(other.getAdfsServer()); + certRolloverNotification(other.getCertRolloverNotification()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + fedMetadataXml(other.getFedMetadataXml()); + iconUrl(other.getIconUrl()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + prevThumbprints(other.getPrevThumbprints()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + /** + *

                                                              ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent.

                                                              + */ + @JsonSetter(value = "adfs_server", nulls = Nulls.SKIP) + public Builder adfsServer(Optional adfsServer) { + this.adfsServer = adfsServer; + return this; + } + + public Builder adfsServer(String adfsServer) { + this.adfsServer = Optional.ofNullable(adfsServer); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'.

                                                              + */ + @JsonSetter(value = "fedMetadataXml", nulls = Nulls.SKIP) + public Builder fedMetadataXml(Optional fedMetadataXml) { + this.fedMetadataXml = fedMetadataXml; + return this; + } + + public Builder fedMetadataXml(String fedMetadataXml) { + this.fedMetadataXml = Optional.ofNullable(fedMetadataXml); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "prev_thumbprints", nulls = Nulls.SKIP) + public Builder prevThumbprints(Optional> prevThumbprints) { + this.prevThumbprints = prevThumbprints; + return this; + } + + public Builder prevThumbprints(List prevThumbprints) { + this.prevThumbprints = Optional.ofNullable(prevThumbprints); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public Builder shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + public Builder shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + /** + *

                                                              Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject4Options build() { + return new EventStreamCloudEventConnectionUpdatedObject4Options( + adfsServer, + certRolloverNotification, + domainAliases, + entityId, + fedMetadataXml, + iconUrl, + nonPersistentAttrs, + prevThumbprints, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + userIdAttribute, + 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/EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..5de352f8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject4OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..6c76f8fd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum valueOf( + String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionUpdatedObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4StrategyEnum.java new file mode 100644 index 00000000..873ea12c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject4StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject4StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject4StrategyEnum ADFS = + new EventStreamCloudEventConnectionUpdatedObject4StrategyEnum(Value.ADFS, "adfs"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject4StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject4StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject4StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADFS: + return visitor.visitAdfs(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject4StrategyEnum valueOf(String value) { + switch (value) { + case "adfs": + return ADFS; + default: + return new EventStreamCloudEventConnectionUpdatedObject4StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADFS, + + UNKNOWN + } + + public interface Visitor { + T visitAdfs(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5.java new file mode 100644 index 00000000..f4c0b109 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5.java @@ -0,0 +1,513 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject5.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject5 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final EventStreamCloudEventConnectionUpdatedObject5StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject5( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + EventStreamCloudEventConnectionUpdatedObject5StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject5StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject5 + && equalTo((EventStreamCloudEventConnectionUpdatedObject5) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject5 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject5 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject5StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject5 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject5Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject5Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject5Options options); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject5StrategyEnum strategy; + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject5 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject5StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject5Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject5Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject5Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject5 build() { + return new EventStreamCloudEventConnectionUpdatedObject5( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject5Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5Authentication.java new file mode 100644 index 00000000..cff88223 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject5Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject5Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject5Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject5Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject5Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject5Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject5Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject5Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject5Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject5Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject5Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts.java new file mode 100644 index 00000000..c3f8825c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject5ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject5Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5Metadata.java new file mode 100644 index 00000000..0e819a2e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject5Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject5Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject5Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject5Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject5Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject5Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject5Metadata(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/EventStreamCloudEventConnectionUpdatedObject5Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5Options.java new file mode 100644 index 00000000..802e848b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5Options.java @@ -0,0 +1,689 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject5Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject5Options { + private final Optional agentIp; + + private final Optional agentMode; + + private final Optional agentVersion; + + private final Optional bruteForceProtection; + + private final Optional certAuth; + + private final Optional> certs; + + private final Optional disableCache; + + private final Optional disableSelfServiceChangePassword; + + private final Optional> domainAliases; + + private final Optional iconUrl; + + private final Optional> ips; + + private final Optional kerberos; + + private final Optional kerberosOnly; + + private final Optional> nonPersistentAttrs; + + private final Optional + setUserRootAttributes; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject5Options( + Optional agentIp, + Optional agentMode, + Optional agentVersion, + Optional bruteForceProtection, + Optional certAuth, + Optional> certs, + Optional disableCache, + Optional disableSelfServiceChangePassword, + Optional> domainAliases, + Optional iconUrl, + Optional> ips, + Optional kerberos, + Optional kerberosOnly, + Optional> nonPersistentAttrs, + Optional + setUserRootAttributes, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Map additionalProperties) { + this.agentIp = agentIp; + this.agentMode = agentMode; + this.agentVersion = agentVersion; + this.bruteForceProtection = bruteForceProtection; + this.certAuth = certAuth; + this.certs = certs; + this.disableCache = disableCache; + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + this.domainAliases = domainAliases; + this.iconUrl = iconUrl; + this.ips = ips; + this.kerberos = kerberos; + this.kerberosOnly = kerberosOnly; + this.nonPersistentAttrs = nonPersistentAttrs; + this.setUserRootAttributes = setUserRootAttributes; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ + @JsonProperty("agentIP") + public Optional getAgentIp() { + return agentIp; + } + + /** + * @return When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ + @JsonProperty("agentMode") + public Optional getAgentMode() { + return agentMode; + } + + /** + * @return Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ + @JsonProperty("agentVersion") + public Optional getAgentVersion() { + return agentVersion; + } + + /** + * @return Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. + */ + @JsonProperty("brute_force_protection") + public Optional getBruteForceProtection() { + return bruteForceProtection; + } + + /** + * @return Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint + */ + @JsonProperty("certAuth") + public Optional getCertAuth() { + return certAuth; + } + + /** + * @return Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ + @JsonProperty("certs") + public Optional> getCerts() { + return certs; + } + + /** + * @return When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory + */ + @JsonProperty("disable_cache") + public Optional getDisableCache() { + return disableCache; + } + + /** + * @return When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets + */ + @JsonProperty("disable_self_service_change_password") + public Optional getDisableSelfServiceChangePassword() { + return disableSelfServiceChangePassword; + } + + /** + * @return List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ + @JsonProperty("ips") + public Optional> getIps() { + return ips; + } + + /** + * @return Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges + */ + @JsonProperty("kerberos") + public Optional getKerberos() { + return kerberos; + } + + /** + * @return When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback. + */ + @JsonProperty("kerberos_only") + public Optional getKerberosOnly() { + return kerberosOnly; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Primary AD domain hint used for HRD and discovery. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject5Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject5Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject5Options other) { + return agentIp.equals(other.agentIp) + && agentMode.equals(other.agentMode) + && agentVersion.equals(other.agentVersion) + && bruteForceProtection.equals(other.bruteForceProtection) + && certAuth.equals(other.certAuth) + && certs.equals(other.certs) + && disableCache.equals(other.disableCache) + && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) + && domainAliases.equals(other.domainAliases) + && iconUrl.equals(other.iconUrl) + && ips.equals(other.ips) + && kerberos.equals(other.kerberos) + && kerberosOnly.equals(other.kerberosOnly) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentIp, + this.agentMode, + this.agentVersion, + this.bruteForceProtection, + this.certAuth, + this.certs, + this.disableCache, + this.disableSelfServiceChangePassword, + this.domainAliases, + this.iconUrl, + this.ips, + this.kerberos, + this.kerberosOnly, + this.nonPersistentAttrs, + this.setUserRootAttributes, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional agentIp = Optional.empty(); + + private Optional agentMode = Optional.empty(); + + private Optional agentVersion = Optional.empty(); + + private Optional bruteForceProtection = Optional.empty(); + + private Optional certAuth = Optional.empty(); + + private Optional> certs = Optional.empty(); + + private Optional disableCache = Optional.empty(); + + private Optional disableSelfServiceChangePassword = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> ips = Optional.empty(); + + private Optional kerberos = Optional.empty(); + + private Optional kerberosOnly = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject5Options other) { + agentIp(other.getAgentIp()); + agentMode(other.getAgentMode()); + agentVersion(other.getAgentVersion()); + bruteForceProtection(other.getBruteForceProtection()); + certAuth(other.getCertAuth()); + certs(other.getCerts()); + disableCache(other.getDisableCache()); + disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); + domainAliases(other.getDomainAliases()); + iconUrl(other.getIconUrl()); + ips(other.getIps()); + kerberos(other.getKerberos()); + kerberosOnly(other.getKerberosOnly()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentIP", nulls = Nulls.SKIP) + public Builder agentIp(Optional agentIp) { + this.agentIp = agentIp; + return this; + } + + public Builder agentIp(String agentIp) { + this.agentIp = Optional.ofNullable(agentIp); + return this; + } + + /** + *

                                                              When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentMode", nulls = Nulls.SKIP) + public Builder agentMode(Optional agentMode) { + this.agentMode = agentMode; + return this; + } + + public Builder agentMode(Boolean agentMode) { + this.agentMode = Optional.ofNullable(agentMode); + return this; + } + + /** + *

                                                              Version identifier of the installed AD connector agent software (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentVersion", nulls = Nulls.SKIP) + public Builder agentVersion(Optional agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + public Builder agentVersion(String agentVersion) { + this.agentVersion = Optional.ofNullable(agentVersion); + return this; + } + + /** + *

                                                              Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.

                                                              + */ + @JsonSetter(value = "brute_force_protection", nulls = Nulls.SKIP) + public Builder bruteForceProtection(Optional bruteForceProtection) { + this.bruteForceProtection = bruteForceProtection; + return this; + } + + public Builder bruteForceProtection(Boolean bruteForceProtection) { + this.bruteForceProtection = Optional.ofNullable(bruteForceProtection); + return this; + } + + /** + *

                                                              Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint

                                                              + */ + @JsonSetter(value = "certAuth", nulls = Nulls.SKIP) + public Builder certAuth(Optional certAuth) { + this.certAuth = certAuth; + return this; + } + + public Builder certAuth(Boolean certAuth) { + this.certAuth = Optional.ofNullable(certAuth); + return this; + } + + /** + *

                                                              Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "certs", nulls = Nulls.SKIP) + public Builder certs(Optional> certs) { + this.certs = certs; + return this; + } + + public Builder certs(List certs) { + this.certs = Optional.ofNullable(certs); + return this; + } + + /** + *

                                                              When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory

                                                              + */ + @JsonSetter(value = "disable_cache", nulls = Nulls.SKIP) + public Builder disableCache(Optional disableCache) { + this.disableCache = disableCache; + return this; + } + + public Builder disableCache(Boolean disableCache) { + this.disableCache = Optional.ofNullable(disableCache); + return this; + } + + /** + *

                                                              When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets

                                                              + */ + @JsonSetter(value = "disable_self_service_change_password", nulls = Nulls.SKIP) + public Builder disableSelfServiceChangePassword(Optional disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + return this; + } + + public Builder disableSelfServiceChangePassword(Boolean disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = Optional.ofNullable(disableSelfServiceChangePassword); + return this; + } + + /** + *

                                                              List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.

                                                              + */ + @JsonSetter(value = "ips", nulls = Nulls.SKIP) + public Builder ips(Optional> ips) { + this.ips = ips; + return this; + } + + public Builder ips(List ips) { + this.ips = Optional.ofNullable(ips); + return this; + } + + /** + *

                                                              Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges

                                                              + */ + @JsonSetter(value = "kerberos", nulls = Nulls.SKIP) + public Builder kerberos(Optional kerberos) { + this.kerberos = kerberos; + return this; + } + + public Builder kerberos(Boolean kerberos) { + this.kerberos = Optional.ofNullable(kerberos); + return this; + } + + /** + *

                                                              When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback.

                                                              + */ + @JsonSetter(value = "kerberos_only", nulls = Nulls.SKIP) + public Builder kerberosOnly(Optional kerberosOnly) { + this.kerberosOnly = kerberosOnly; + return this; + } + + public Builder kerberosOnly(Boolean kerberosOnly) { + this.kerberosOnly = Optional.ofNullable(kerberosOnly); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + /** + *

                                                              The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Primary AD domain hint used for HRD and discovery.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject5Options build() { + return new EventStreamCloudEventConnectionUpdatedObject5Options( + agentIp, + agentMode, + agentVersion, + bruteForceProtection, + certAuth, + certs, + disableCache, + disableSelfServiceChangePassword, + domainAliases, + iconUrl, + ips, + kerberos, + kerberosOnly, + nonPersistentAttrs, + setUserRootAttributes, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + 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/EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..2d13c5c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject5OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5StrategyEnum.java new file mode 100644 index 00000000..aca91e39 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject5StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject5StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject5StrategyEnum AD = + new EventStreamCloudEventConnectionUpdatedObject5StrategyEnum(Value.AD, "ad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject5StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject5StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject5StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject5StrategyEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + default: + return new EventStreamCloudEventConnectionUpdatedObject5StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6.java new file mode 100644 index 00000000..9bc1cde9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject6.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject6 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject6StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject6( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject6StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject6StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject6 + && equalTo((EventStreamCloudEventConnectionUpdatedObject6) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject6 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject6 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject6StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject6 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject6Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject6Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject6Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject6StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject6 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject6StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject6Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject6Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject6Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject6 build() { + return new EventStreamCloudEventConnectionUpdatedObject6( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject6Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6Authentication.java new file mode 100644 index 00000000..933d448b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject6Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject6Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject6Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject6Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject6Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject6Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject6Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject6Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject6Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject6Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject6Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts.java new file mode 100644 index 00000000..b2d60b33 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject6ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject6Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6Metadata.java new file mode 100644 index 00000000..a76007a1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject6Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject6Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject6Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject6Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject6Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject6Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject6Metadata(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/EventStreamCloudEventConnectionUpdatedObject6Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6Options.java new file mode 100644 index 00000000..c81539d9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6Options.java @@ -0,0 +1,1111 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionUpdatedObject6Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject6Options { + private final Optional adminAccessTokenExpiresin; + + private final Optional allowSettingLoginScopes; + + private final Optional apiEnableGroups; + + private final Optional apiEnableUsers; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional email; + + private final Optional extAgreedTerms; + + private final Optional extGroups; + + private final Optional extGroupsExtended; + + private final Optional extIsAdmin; + + private final Optional extIsSuspended; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional handleLoginFromSocial; + + private final Optional iconUrl; + + private final Optional mapUserIdToId; + + private final Optional> nonPersistentAttrs; + + private final Optional profile; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject6Options( + Optional adminAccessTokenExpiresin, + Optional allowSettingLoginScopes, + Optional apiEnableGroups, + Optional apiEnableUsers, + String clientId, + Optional domain, + Optional> domainAliases, + Optional email, + Optional extAgreedTerms, + Optional extGroups, + Optional extGroupsExtended, + Optional extIsAdmin, + Optional extIsSuspended, + Optional + federatedConnectionsAccessTokens, + Optional handleLoginFromSocial, + Optional iconUrl, + Optional mapUserIdToId, + Optional> nonPersistentAttrs, + Optional profile, + Optional> scope, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional> upstreamParams, + Map additionalProperties) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; + this.apiEnableUsers = apiEnableUsers; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.email = email; + this.extAgreedTerms = extAgreedTerms; + this.extGroups = extGroups; + this.extGroupsExtended = extGroupsExtended; + this.extIsAdmin = extIsAdmin; + this.extIsSuspended = extIsSuspended; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.handleLoginFromSocial = handleLoginFromSocial; + this.iconUrl = iconUrl; + this.mapUserIdToId = mapUserIdToId; + this.nonPersistentAttrs = nonPersistentAttrs; + this.profile = profile; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. + */ + @JsonProperty("admin_access_token_expiresin") + public Optional getAdminAccessTokenExpiresin() { + return adminAccessTokenExpiresin; + } + + /** + * @return When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. + */ + @JsonProperty("allow_setting_login_scopes") + public Optional getAllowSettingLoginScopes() { + return allowSettingLoginScopes; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false. + */ + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Primary Google Workspace domain name that users must belong to. + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return Whether the OAuth flow requests the email scope. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Fetches the agreedToTerms flag from the Google Directory profile. + */ + @JsonProperty("ext_agreed_terms") + public Optional getExtAgreedTerms() { + return extAgreedTerms; + } + + /** + * @return Enables enrichment with Google group memberships (required for ext_groups_extended). + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true. + */ + @JsonProperty("ext_groups_extended") + public Optional getExtGroupsExtended() { + return extGroupsExtended; + } + + /** + * @return Fetches the Google Directory admin flag for the signing-in user. + */ + @JsonProperty("ext_is_admin") + public Optional getExtIsAdmin() { + return extIsAdmin; + } + + /** + * @return Fetches the Google Directory suspended flag for the signing-in user. + */ + @JsonProperty("ext_is_suspended") + public Optional getExtIsSuspended() { + return extIsSuspended; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. + */ + @JsonProperty("handle_login_from_social") + public Optional getHandleLoginFromSocial() { + return handleLoginFromSocial; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. + */ + @JsonProperty("map_user_id_to_id") + public Optional getMapUserIdToId() { + return mapUserIdToId; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Whether the OAuth flow requests the profile scope. + */ + @JsonProperty("profile") + public Optional getProfile() { + return profile; + } + + /** + * @return Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The Google Workspace primary domain used to identify the organization during authentication. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject6Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject6Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject6Options other) { + return adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) + && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) + && apiEnableUsers.equals(other.apiEnableUsers) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && email.equals(other.email) + && extAgreedTerms.equals(other.extAgreedTerms) + && extGroups.equals(other.extGroups) + && extGroupsExtended.equals(other.extGroupsExtended) + && extIsAdmin.equals(other.extIsAdmin) + && extIsSuspended.equals(other.extIsSuspended) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && handleLoginFromSocial.equals(other.handleLoginFromSocial) + && iconUrl.equals(other.iconUrl) + && mapUserIdToId.equals(other.mapUserIdToId) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && profile.equals(other.profile) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adminAccessTokenExpiresin, + this.allowSettingLoginScopes, + this.apiEnableGroups, + this.apiEnableUsers, + this.clientId, + this.domain, + this.domainAliases, + this.email, + this.extAgreedTerms, + this.extGroups, + this.extGroupsExtended, + this.extIsAdmin, + this.extIsSuspended, + this.federatedConnectionsAccessTokens, + this.handleLoginFromSocial, + this.iconUrl, + this.mapUserIdToId, + this.nonPersistentAttrs, + this.profile, + this.scope, + this.setUserRootAttributes, + this.tenantDomain, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedObject6Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject6Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); + + _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes); + + _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + _FinalStage apiEnableGroups(Optional apiEnableGroups); + + _FinalStage apiEnableGroups(Boolean apiEnableGroups); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(Boolean email); + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + _FinalStage extAgreedTerms(Optional extAgreedTerms); + + _FinalStage extAgreedTerms(Boolean extAgreedTerms); + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + _FinalStage extGroupsExtended(Optional extGroupsExtended); + + _FinalStage extGroupsExtended(Boolean extGroupsExtended); + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + _FinalStage extIsAdmin(Optional extIsAdmin); + + _FinalStage extIsAdmin(Boolean extIsAdmin); + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + _FinalStage extIsSuspended(Optional extIsSuspended); + + _FinalStage extIsSuspended(Boolean extIsSuspended); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial); + + _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + _FinalStage mapUserIdToId(Optional mapUserIdToId); + + _FinalStage mapUserIdToId(Boolean mapUserIdToId); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + _FinalStage profile(Optional profile); + + _FinalStage profile(Boolean profile); + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum setUserRootAttributes); + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional> upstreamParams = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional mapUserIdToId = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional handleLoginFromSocial = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extIsSuspended = Optional.empty(); + + private Optional extIsAdmin = Optional.empty(); + + private Optional extGroupsExtended = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional extAgreedTerms = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + private Optional apiEnableGroups = Optional.empty(); + + private Optional allowSettingLoginScopes = Optional.empty(); + + private Optional adminAccessTokenExpiresin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject6Options other) { + adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); + allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); + apiEnableUsers(other.getApiEnableUsers()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + email(other.getEmail()); + extAgreedTerms(other.getExtAgreedTerms()); + extGroups(other.getExtGroups()); + extGroupsExtended(other.getExtGroupsExtended()); + extIsAdmin(other.getExtIsAdmin()); + extIsSuspended(other.getExtIsSuspended()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + handleLoginFromSocial(other.getHandleLoginFromSocial()); + iconUrl(other.getIconUrl()); + mapUserIdToId(other.getMapUserIdToId()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + profile(other.getProfile()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage profile(Boolean profile) { + this.profile = Optional.ofNullable(profile); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "profile", nulls = Nulls.SKIP) + public _FinalStage profile(Optional profile) { + this.profile = profile; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage mapUserIdToId(Boolean mapUserIdToId) { + this.mapUserIdToId = Optional.ofNullable(mapUserIdToId); + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "map_user_id_to_id", nulls = Nulls.SKIP) + public _FinalStage mapUserIdToId(Optional mapUserIdToId) { + this.mapUserIdToId = mapUserIdToId; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial) { + this.handleLoginFromSocial = Optional.ofNullable(handleLoginFromSocial); + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "handle_login_from_social", nulls = Nulls.SKIP) + public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial) { + this.handleLoginFromSocial = handleLoginFromSocial; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsSuspended(Boolean extIsSuspended) { + this.extIsSuspended = Optional.ofNullable(extIsSuspended); + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) + public _FinalStage extIsSuspended(Optional extIsSuspended) { + this.extIsSuspended = extIsSuspended; + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsAdmin(Boolean extIsAdmin) { + this.extIsAdmin = Optional.ofNullable(extIsAdmin); + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_admin", nulls = Nulls.SKIP) + public _FinalStage extIsAdmin(Optional extIsAdmin) { + this.extIsAdmin = extIsAdmin; + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroupsExtended(Boolean extGroupsExtended) { + this.extGroupsExtended = Optional.ofNullable(extGroupsExtended); + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups_extended", nulls = Nulls.SKIP) + public _FinalStage extGroupsExtended(Optional extGroupsExtended) { + this.extGroupsExtended = extGroupsExtended; + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extAgreedTerms(Boolean extAgreedTerms) { + this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) + public _FinalStage extAgreedTerms(Optional extAgreedTerms) { + this.extAgreedTerms = extAgreedTerms; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(Boolean email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public _FinalStage apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes) { + this.allowSettingLoginScopes = Optional.ofNullable(allowSettingLoginScopes); + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_setting_login_scopes", nulls = Nulls.SKIP) + public _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes) { + this.allowSettingLoginScopes = allowSettingLoginScopes; + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = Optional.ofNullable(adminAccessTokenExpiresin); + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "admin_access_token_expiresin", nulls = Nulls.SKIP) + public _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject6Options build() { + return new EventStreamCloudEventConnectionUpdatedObject6Options( + adminAccessTokenExpiresin, + allowSettingLoginScopes, + apiEnableGroups, + apiEnableUsers, + clientId, + domain, + domainAliases, + email, + extAgreedTerms, + extGroups, + extGroupsExtended, + extIsAdmin, + extIsSuspended, + federatedConnectionsAccessTokens, + handleLoginFromSocial, + iconUrl, + mapUserIdToId, + nonPersistentAttrs, + profile, + scope, + setUserRootAttributes, + tenantDomain, + upstreamParams, + 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/EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..6faca28c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedObject6OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..ab19c742 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject6OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6StrategyEnum.java new file mode 100644 index 00000000..30097b57 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject6StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject6StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject6StrategyEnum GOOGLE_APPS = + new EventStreamCloudEventConnectionUpdatedObject6StrategyEnum(Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject6StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject6StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject6StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject6StrategyEnum valueOf(String value) { + switch (value) { + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventConnectionUpdatedObject6StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GOOGLE_APPS, + + UNKNOWN + } + + public interface Visitor { + T visitGoogleApps(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7.java new file mode 100644 index 00000000..26792d96 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7.java @@ -0,0 +1,558 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedObject7.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject7 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedObject7StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject7( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedObject7StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedObject7StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject7 + && equalTo((EventStreamCloudEventConnectionUpdatedObject7) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject7 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedObject7 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject7StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject7 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject7Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts(EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject7Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedObject7Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedObject7StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject7 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedObject7StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedObject7Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedObject7Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication(EventStreamCloudEventConnectionUpdatedObject7Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject7 build() { + return new EventStreamCloudEventConnectionUpdatedObject7( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedObject7Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7Authentication.java new file mode 100644 index 00000000..1c0952f6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7Authentication.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject7Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject7Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject7Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject7Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedObject7Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject7Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject7Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject7Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject7Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject7Authentication build() { + return new EventStreamCloudEventConnectionUpdatedObject7Authentication(active, 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/EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts.java new file mode 100644 index 00000000..7de822a7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts.java @@ -0,0 +1,119 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedObject7ConnectedAccounts(active, 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/EventStreamCloudEventConnectionUpdatedObject7Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7Metadata.java new file mode 100644 index 00000000..7dd0e869 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedObject7Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject7Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject7Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject7Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedObject7Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedObject7Metadata build() { + return new EventStreamCloudEventConnectionUpdatedObject7Metadata(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/EventStreamCloudEventConnectionUpdatedObject7Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7Options.java new file mode 100644 index 00000000..d5bc21c2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7Options.java @@ -0,0 +1,1296 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionUpdatedObject7Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject7Options { + private final Optional apiEnableUsers; + + private final Optional appDomain; + + private final Optional appId; + + private final Optional basicProfile; + + private final Optional certRolloverNotification; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional extGroups; + + private final Optional extNestedGroups; + + private final Optional extProfile; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional granted; + + private final Optional iconUrl; + + private final Optional identityApi; + + private final Optional maxGroupsToRetrieve; + + private final Optional> nonPersistentAttrs; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional + shouldTrustEmailVerifiedConnection; + + private final Optional tenantDomain; + + private final Optional tenantId; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional useWsfed; + + private final Optional useCommonEndpoint; + + private final Optional useridAttribute; + + private final Optional waadProtocol; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject7Options( + Optional apiEnableUsers, + Optional appDomain, + Optional appId, + Optional basicProfile, + Optional certRolloverNotification, + String clientId, + Optional domain, + Optional> domainAliases, + Optional extGroups, + Optional extNestedGroups, + Optional extProfile, + Optional + federatedConnectionsAccessTokens, + Optional granted, + Optional iconUrl, + Optional identityApi, + Optional maxGroupsToRetrieve, + Optional> nonPersistentAttrs, + Optional> scope, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional tenantDomain, + Optional tenantId, + Optional> thumbprints, + Optional> upstreamParams, + Optional useWsfed, + Optional useCommonEndpoint, + Optional useridAttribute, + Optional waadProtocol, + Map additionalProperties) { + this.apiEnableUsers = apiEnableUsers; + this.appDomain = appDomain; + this.appId = appId; + this.basicProfile = basicProfile; + this.certRolloverNotification = certRolloverNotification; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.extGroups = extGroups; + this.extNestedGroups = extNestedGroups; + this.extProfile = extProfile; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.granted = granted; + this.iconUrl = iconUrl; + this.identityApi = identityApi; + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + this.nonPersistentAttrs = nonPersistentAttrs; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.tenantDomain = tenantDomain; + this.tenantId = tenantId; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.useWsfed = useWsfed; + this.useCommonEndpoint = useCommonEndpoint; + this.useridAttribute = useridAttribute; + this.waadProtocol = waadProtocol; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enable users API + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. + */ + @JsonProperty("app_domain") + public Optional getAppDomain() { + return appDomain; + } + + /** + * @return The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests. + */ + @JsonProperty("app_id") + public Optional getAppId() { + return appId; + } + + /** + * @return Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication. + */ + @JsonProperty("basic_profile") + public Optional getBasicProfile() { + return basicProfile; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com'). + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve. + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included. + */ + @JsonProperty("ext_nested_groups") + public Optional getExtNestedGroups() { + return extNestedGroups; + } + + /** + * @return When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2. + */ + @JsonProperty("ext_profile") + public Optional getExtProfile() { + return extProfile; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. + */ + @JsonProperty("granted") + public Optional getGranted() { + return granted; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("identity_api") + public Optional getIdentityApi() { + return identityApi; + } + + /** + * @return Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default. + */ + @JsonProperty("max_groups_to_retrieve") + public Optional getMaxGroupsToRetrieve() { + return maxGroupsToRetrieve; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. + */ + @JsonProperty("tenantId") + public Optional getTenantId() { + return tenantId; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. + */ + @JsonProperty("use_wsfed") + public Optional getUseWsfed() { + return useWsfed; + } + + /** + * @return When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false. + */ + @JsonProperty("useCommonEndpoint") + public Optional getUseCommonEndpoint() { + return useCommonEndpoint; + } + + @JsonProperty("userid_attribute") + public Optional getUseridAttribute() { + return useridAttribute; + } + + @JsonProperty("waad_protocol") + public Optional getWaadProtocol() { + return waadProtocol; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject7Options + && equalTo((EventStreamCloudEventConnectionUpdatedObject7Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedObject7Options other) { + return apiEnableUsers.equals(other.apiEnableUsers) + && appDomain.equals(other.appDomain) + && appId.equals(other.appId) + && basicProfile.equals(other.basicProfile) + && certRolloverNotification.equals(other.certRolloverNotification) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && extGroups.equals(other.extGroups) + && extNestedGroups.equals(other.extNestedGroups) + && extProfile.equals(other.extProfile) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && granted.equals(other.granted) + && iconUrl.equals(other.iconUrl) + && identityApi.equals(other.identityApi) + && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && tenantDomain.equals(other.tenantDomain) + && tenantId.equals(other.tenantId) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && useWsfed.equals(other.useWsfed) + && useCommonEndpoint.equals(other.useCommonEndpoint) + && useridAttribute.equals(other.useridAttribute) + && waadProtocol.equals(other.waadProtocol); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.apiEnableUsers, + this.appDomain, + this.appId, + this.basicProfile, + this.certRolloverNotification, + this.clientId, + this.domain, + this.domainAliases, + this.extGroups, + this.extNestedGroups, + this.extProfile, + this.federatedConnectionsAccessTokens, + this.granted, + this.iconUrl, + this.identityApi, + this.maxGroupsToRetrieve, + this.nonPersistentAttrs, + this.scope, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.tenantDomain, + this.tenantId, + this.thumbprints, + this.upstreamParams, + this.useWsfed, + this.useCommonEndpoint, + this.useridAttribute, + this.waadProtocol); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedObject7Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject7Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Enable users API

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + _FinalStage appDomain(Optional appDomain); + + _FinalStage appDomain(String appDomain); + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + _FinalStage appId(Optional appId); + + _FinalStage appId(String appId); + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + _FinalStage basicProfile(Optional basicProfile); + + _FinalStage basicProfile(Boolean basicProfile); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + _FinalStage extNestedGroups(Optional extNestedGroups); + + _FinalStage extNestedGroups(Boolean extNestedGroups); + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + _FinalStage extProfile(Optional extProfile); + + _FinalStage extProfile(Boolean extProfile); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + _FinalStage granted(Optional granted); + + _FinalStage granted(Boolean granted); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage identityApi( + Optional identityApi); + + _FinalStage identityApi(EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum identityApi); + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve); + + _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum setUserRootAttributes); + + _FinalStage shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection); + + _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection); + + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + _FinalStage tenantId(Optional tenantId); + + _FinalStage tenantId(String tenantId); + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + _FinalStage useWsfed(Optional useWsfed); + + _FinalStage useWsfed(Boolean useWsfed); + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + _FinalStage useCommonEndpoint(Optional useCommonEndpoint); + + _FinalStage useCommonEndpoint(Boolean useCommonEndpoint); + + _FinalStage useridAttribute( + Optional useridAttribute); + + _FinalStage useridAttribute( + EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum useridAttribute); + + _FinalStage waadProtocol( + Optional waadProtocol); + + _FinalStage waadProtocol(EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum waadProtocol); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional waadProtocol = + Optional.empty(); + + private Optional useridAttribute = + Optional.empty(); + + private Optional useCommonEndpoint = Optional.empty(); + + private Optional useWsfed = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantId = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional maxGroupsToRetrieve = Optional.empty(); + + private Optional identityApi = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional granted = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extProfile = Optional.empty(); + + private Optional extNestedGroups = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional basicProfile = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional appDomain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedObject7Options other) { + apiEnableUsers(other.getApiEnableUsers()); + appDomain(other.getAppDomain()); + appId(other.getAppId()); + basicProfile(other.getBasicProfile()); + certRolloverNotification(other.getCertRolloverNotification()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + extGroups(other.getExtGroups()); + extNestedGroups(other.getExtNestedGroups()); + extProfile(other.getExtProfile()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + granted(other.getGranted()); + iconUrl(other.getIconUrl()); + identityApi(other.getIdentityApi()); + maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + tenantDomain(other.getTenantDomain()); + tenantId(other.getTenantId()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + useWsfed(other.getUseWsfed()); + useCommonEndpoint(other.getUseCommonEndpoint()); + useridAttribute(other.getUseridAttribute()); + waadProtocol(other.getWaadProtocol()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage waadProtocol( + EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum waadProtocol) { + this.waadProtocol = Optional.ofNullable(waadProtocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) + public _FinalStage waadProtocol( + Optional waadProtocol) { + this.waadProtocol = waadProtocol; + return this; + } + + @java.lang.Override + public _FinalStage useridAttribute( + EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum useridAttribute) { + this.useridAttribute = Optional.ofNullable(useridAttribute); + return this; + } + + @java.lang.Override + @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) + public _FinalStage useridAttribute( + Optional useridAttribute) { + this.useridAttribute = useridAttribute; + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useCommonEndpoint(Boolean useCommonEndpoint) { + this.useCommonEndpoint = Optional.ofNullable(useCommonEndpoint); + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useCommonEndpoint", nulls = Nulls.SKIP) + public _FinalStage useCommonEndpoint(Optional useCommonEndpoint) { + this.useCommonEndpoint = useCommonEndpoint; + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useWsfed(Boolean useWsfed) { + this.useWsfed = Optional.ofNullable(useWsfed); + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) + public _FinalStage useWsfed(Optional useWsfed) { + this.useWsfed = useWsfed; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantId(String tenantId) { + this.tenantId = Optional.ofNullable(tenantId); + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) + public _FinalStage tenantId(Optional tenantId) { + this.tenantId = tenantId; + return this; + } + + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public _FinalStage shouldTrustEmailVerifiedConnection( + Optional + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = Optional.ofNullable(maxGroupsToRetrieve); + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) + public _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + return this; + } + + @java.lang.Override + public _FinalStage identityApi( + EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum identityApi) { + this.identityApi = Optional.ofNullable(identityApi); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_api", nulls = Nulls.SKIP) + public _FinalStage identityApi( + Optional identityApi) { + this.identityApi = identityApi; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage granted(Boolean granted) { + this.granted = Optional.ofNullable(granted); + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "granted", nulls = Nulls.SKIP) + public _FinalStage granted(Optional granted) { + this.granted = granted; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extProfile(Boolean extProfile) { + this.extProfile = Optional.ofNullable(extProfile); + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) + public _FinalStage extProfile(Optional extProfile) { + this.extProfile = extProfile; + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extNestedGroups(Boolean extNestedGroups) { + this.extNestedGroups = Optional.ofNullable(extNestedGroups); + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_nested_groups", nulls = Nulls.SKIP) + public _FinalStage extNestedGroups(Optional extNestedGroups) { + this.extNestedGroups = extNestedGroups; + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage basicProfile(Boolean basicProfile) { + this.basicProfile = Optional.ofNullable(basicProfile); + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) + public _FinalStage basicProfile(Optional basicProfile) { + this.basicProfile = basicProfile; + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appId(String appId) { + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_id", nulls = Nulls.SKIP) + public _FinalStage appId(Optional appId) { + this.appId = appId; + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appDomain(String appDomain) { + this.appDomain = Optional.ofNullable(appDomain); + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_domain", nulls = Nulls.SKIP) + public _FinalStage appDomain(Optional appDomain) { + this.appDomain = appDomain; + return this; + } + + /** + *

                                                              Enable users API

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enable users API

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject7Options build() { + return new EventStreamCloudEventConnectionUpdatedObject7Options( + apiEnableUsers, + appDomain, + appId, + basicProfile, + certRolloverNotification, + clientId, + domain, + domainAliases, + extGroups, + extNestedGroups, + extProfile, + federatedConnectionsAccessTokens, + granted, + iconUrl, + identityApi, + maxGroupsToRetrieve, + nonPersistentAttrs, + scope, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + tenantDomain, + tenantId, + thumbprints, + upstreamParams, + useWsfed, + useCommonEndpoint, + useridAttribute, + waadProtocol, + 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/EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..8c436139 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,134 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedObject7OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum.java new file mode 100644 index 00000000..5168b193 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum.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 EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum { + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum AZURE_ACTIVE_DIRECTORY_V10 = + new EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum( + Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); + + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum + MICROSOFT_IDENTITY_PLATFORM_V20 = new EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum( + Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum(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 EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AZURE_ACTIVE_DIRECTORY_V10: + return visitor.visitAzureActiveDirectoryV10(); + case MICROSOFT_IDENTITY_PLATFORM_V20: + return visitor.visitMicrosoftIdentityPlatformV20(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum valueOf(String value) { + switch (value) { + case "azure-active-directory-v1.0": + return AZURE_ACTIVE_DIRECTORY_V10; + case "microsoft-identity-platform-v2.0": + return MICROSOFT_IDENTITY_PLATFORM_V20; + default: + return new EventStreamCloudEventConnectionUpdatedObject7OptionsIdentityApiEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + MICROSOFT_IDENTITY_PLATFORM_V20, + + AZURE_ACTIVE_DIRECTORY_V10, + + UNKNOWN + } + + public interface Visitor { + T visitMicrosoftIdentityPlatformV20(); + + T visitAzureActiveDirectoryV10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..1e167601 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,103 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum NEVER_ON_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum ON_EACH_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum ON_FIRST_LOGIN = + new EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum(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 EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum valueOf(String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedObject7OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..f89402fe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum valueOf( + String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionUpdatedObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum.java new file mode 100644 index 00000000..e3dd1d95 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum.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 EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum { + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum SUB = + new EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum(Value.SUB, "sub"); + + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum OID = + new EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum(Value.OID, "oid"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum(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 EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUB: + return visitor.visitSub(); + case OID: + return visitor.visitOid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum valueOf(String value) { + switch (value) { + case "sub": + return SUB; + case "oid": + return OID; + default: + return new EventStreamCloudEventConnectionUpdatedObject7OptionsUseridAttributeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OID, + + SUB, + + UNKNOWN + } + + public interface Visitor { + T visitOid(); + + T visitSub(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum.java new file mode 100644 index 00000000..2431a506 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum.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 EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum { + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum OPENID_CONNECT = + new EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum( + Value.OPENID_CONNECT, "openid-connect"); + + public static final EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum WS_FEDERATION = + new EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum( + Value.WS_FEDERATION, "ws-federation"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum(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 EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID_CONNECT: + return visitor.visitOpenidConnect(); + case WS_FEDERATION: + return visitor.visitWsFederation(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum valueOf(String value) { + switch (value) { + case "openid-connect": + return OPENID_CONNECT; + case "ws-federation": + return WS_FEDERATION; + default: + return new EventStreamCloudEventConnectionUpdatedObject7OptionsWaadProtocolEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WS_FEDERATION, + + OPENID_CONNECT, + + UNKNOWN + } + + public interface Visitor { + T visitWsFederation(); + + T visitOpenidConnect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7StrategyEnum.java new file mode 100644 index 00000000..7df1a7b7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedObject7StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedObject7StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedObject7StrategyEnum WAAD = + new EventStreamCloudEventConnectionUpdatedObject7StrategyEnum(Value.WAAD, "waad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedObject7StrategyEnum(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 EventStreamCloudEventConnectionUpdatedObject7StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedObject7StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WAAD: + return visitor.visitWaad(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedObject7StrategyEnum valueOf(String value) { + switch (value) { + case "waad": + return WAAD; + default: + return new EventStreamCloudEventConnectionUpdatedObject7StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject.java new file mode 100644 index 00000000..5cf4e7bc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject.java @@ -0,0 +1,226 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventConnectionUpdatedPreviousObject.Deserializer.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventConnectionUpdatedPreviousObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject2) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject3) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject4) this.value); + } else if (this.type == 5) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject5) this.value); + } else if (this.type == 6) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject6) this.value); + } else if (this.type == 7) { + return visitor.visit((EventStreamCloudEventConnectionUpdatedPreviousObject7) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject) other); + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject0 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 0); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject1 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 1); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject2 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 2); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject3 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 3); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject4 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 4); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject5 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 5); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject6 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 6); + } + + public static EventStreamCloudEventConnectionUpdatedPreviousObject of( + EventStreamCloudEventConnectionUpdatedPreviousObject7 value) { + return new EventStreamCloudEventConnectionUpdatedPreviousObject(value, 7); + } + + public interface Visitor { + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject0 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject1 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject2 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject3 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject4 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject5 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject6 value); + + T visit(EventStreamCloudEventConnectionUpdatedPreviousObject7 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventConnectionUpdatedPreviousObject.class); + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject2.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject3.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject4.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject5.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject6.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("strategy")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventConnectionUpdatedPreviousObject7.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0.java new file mode 100644 index 00000000..4d146532 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject0.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0 { + private final Optional authentication; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional connectedAccounts; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0( + Optional authentication, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional connectedAccounts, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.connectedAccounts = connectedAccounts; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0 other) { + return authentication.equals(other.authentication) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && connectedAccounts.equals(other.connectedAccounts) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.connectedAccounts, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication authentication); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts connectedAccounts); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject0Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0 other) { + authentication(other.getAuthentication()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + connectedAccounts(other.getConnectedAccounts()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject0Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject0 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0( + authentication, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + connectedAccounts, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication.java new file mode 100644 index 00000000..e35ecf1d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts.java new file mode 100644 index 00000000..b2143fdc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts.java @@ -0,0 +1,150 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts { + private final boolean active; + + private final Optional crossAppAccess; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts( + boolean active, Optional crossAppAccess, Map additionalProperties) { + this.active = active; + this.crossAppAccess = crossAppAccess; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @JsonProperty("cross_app_access") + public Optional getCrossAppAccess() { + return crossAppAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts other) { + return active == other.active && crossAppAccess.equals(other.crossAppAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.crossAppAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage crossAppAccess(Optional crossAppAccess); + + _FinalStage crossAppAccess(Boolean crossAppAccess); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + private Optional crossAppAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts other) { + active(other.getActive()); + crossAppAccess(other.getCrossAppAccess()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public _FinalStage crossAppAccess(Boolean crossAppAccess) { + this.crossAppAccess = Optional.ofNullable(crossAppAccess); + return this; + } + + @java.lang.Override + @JsonSetter(value = "cross_app_access", nulls = Nulls.SKIP) + public _FinalStage crossAppAccess(Optional crossAppAccess) { + this.crossAppAccess = crossAppAccess; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0ConnectedAccounts( + active, crossAppAccess, 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/EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata.java new file mode 100644 index 00000000..871cca14 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject0Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0Options.java new file mode 100644 index 00000000..f9e0f73d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0Options.java @@ -0,0 +1,1308 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject0Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional + connectionSettings; + + private final Optional> domainAliases; + + private final Optional + dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional< + List> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional discoveryUrl; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional discoveryUrl, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.discoveryUrl = discoveryUrl; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional + getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional + getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && discoveryUrl.equals(other.discoveryUrl) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.discoveryUrl, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject0Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional + connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap attributeMap); + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + _FinalStage discoveryUrl(Optional discoveryUrl); + + _FinalStage discoveryUrl(String discoveryUrl); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional + dpopSigningAlg = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + connectionSettings = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + discoveryUrl(other.getDiscoveryUrl()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public _FinalStage discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional + connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject0Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + discoveryUrl, + type, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap.java new file mode 100644 index 00000000..b71ba4db --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap.java @@ -0,0 +1,170 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional + mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional + mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional + getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional + mappingMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional + mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..1d6d17b1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,96 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum + BIND_ALL = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.BIND_ALL, "bind_all"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum + USE_MAP = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BIND_ALL: + return visitor.visitBindAll(); + case USE_MAP: + return visitor.visitUseMap(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "bind_all": + return BIND_ALL; + case "use_map": + return USE_MAP; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BIND_ALL, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBindAll(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings.java new file mode 100644 index 00000000..21d9d66e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..7e9a4ab2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,119 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum + DISABLED = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum valueOf( + String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..b223d2ad --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum( + Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsDpopSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..53b1c7ea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..edeef5fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS512 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + ES384 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + PS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + ES256 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + PS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + RS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata.java new file mode 100644 index 00000000..5c9b4241 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..944cb970 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum( + Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSchemaVersionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..3b600b10 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..b84eedf0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..548fa61a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS512 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + ES384 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + PS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + ES256 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + PS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + RS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..042937b6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + ISSUER = new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum.java new file mode 100644 index 00000000..5385043c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum.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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum FRONT_CHANNEL = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum( + Value.FRONT_CHANNEL, "front_channel"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum( + Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FRONT_CHANNEL: + return visitor.visitFrontChannel(); + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum valueOf(String value) { + switch (value) { + case "front_channel": + return FRONT_CHANNEL; + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + FRONT_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitFrontChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum.java new file mode 100644 index 00000000..772a96a8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum OIDC = + new EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum(Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum valueOf(String value) { + switch (value) { + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject0StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1.java new file mode 100644 index 00000000..b1823a42 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject1.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject1Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject1Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject1 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication.java new file mode 100644 index 00000000..e4554c20 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts.java new file mode 100644 index 00000000..4f57ad60 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata.java new file mode 100644 index 00000000..40c63045 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject1Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1Options.java new file mode 100644 index 00000000..76f08ce8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1Options.java @@ -0,0 +1,1308 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject1Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1Options { + private final Optional authorizationEndpoint; + + private final String clientId; + + private final Optional + connectionSettings; + + private final Optional> domainAliases; + + private final Optional + dpopSigningAlg; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional iconUrl; + + private final Optional idTokenSessionExpirySupported; + + private final Optional< + List> + idTokenSignedResponseAlgs; + + private final Optional issuer; + + private final Optional jwksUri; + + private final Optional> nonPersistentAttrs; + + private final Optional oidcMetadata; + + private final Optional schemaVersion; + + private final Optional scope; + + private final Optional sendBackChannelNonce; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional tokenEndpoint; + + private final Optional + tokenEndpointAuthMethod; + + private final Optional + tokenEndpointAuthSigningAlg; + + private final Optional + tokenEndpointJwtcaAudFormat; + + private final Optional> upstreamParams; + + private final Optional useOauthSpecScope; + + private final Optional userinfoEndpoint; + + private final Optional attributeMap; + + private final Optional domain; + + private final Optional type; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1Options( + Optional authorizationEndpoint, + String clientId, + Optional connectionSettings, + Optional> domainAliases, + Optional dpopSigningAlg, + Optional + federatedConnectionsAccessTokens, + Optional iconUrl, + Optional idTokenSessionExpirySupported, + Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs, + Optional issuer, + Optional jwksUri, + Optional> nonPersistentAttrs, + Optional oidcMetadata, + Optional schemaVersion, + Optional scope, + Optional sendBackChannelNonce, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional tokenEndpoint, + Optional + tokenEndpointAuthMethod, + Optional + tokenEndpointAuthSigningAlg, + Optional + tokenEndpointJwtcaAudFormat, + Optional> upstreamParams, + Optional useOauthSpecScope, + Optional userinfoEndpoint, + Optional attributeMap, + Optional domain, + Optional type, + Map additionalProperties) { + this.authorizationEndpoint = authorizationEndpoint; + this.clientId = clientId; + this.connectionSettings = connectionSettings; + this.domainAliases = domainAliases; + this.dpopSigningAlg = dpopSigningAlg; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.iconUrl = iconUrl; + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.nonPersistentAttrs = nonPersistentAttrs; + this.oidcMetadata = oidcMetadata; + this.schemaVersion = schemaVersion; + this.scope = scope; + this.sendBackChannelNonce = sendBackChannelNonce; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + this.upstreamParams = upstreamParams; + this.useOauthSpecScope = useOauthSpecScope; + this.userinfoEndpoint = userinfoEndpoint; + this.attributeMap = attributeMap; + this.domain = domain; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public Optional getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("connection_settings") + public Optional + getConnectionSettings() { + return connectionSettings; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + @JsonProperty("dpop_signing_alg") + public Optional + getDpopSigningAlg() { + return dpopSigningAlg; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry. + */ + @JsonProperty("id_token_session_expiry_supported") + public Optional getIdTokenSessionExpirySupported() { + return idTokenSessionExpirySupported; + } + + /** + * @return List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta. + */ + @JsonProperty("id_token_signed_response_algs") + public Optional> + getIdTokenSignedResponseAlgs() { + return idTokenSignedResponseAlgs; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public Optional getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public Optional getJwksUri() { + return jwksUri; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + @JsonProperty("schema_version") + public Optional getSchemaVersion() { + return schemaVersion; + } + + /** + * @return Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. + */ + @JsonProperty("scope") + public Optional getScope() { + return scope; + } + + /** + * @return When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. + */ + @JsonProperty("send_back_channel_nonce") + public Optional getSendBackChannelNonce() { + return sendBackChannelNonce; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + @JsonProperty("token_endpoint_auth_method") + public Optional + getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("token_endpoint_auth_signing_alg") + public Optional + getTokenEndpointAuthSigningAlg() { + return tokenEndpointAuthSigningAlg; + } + + @JsonProperty("token_endpoint_jwtca_aud_format") + public Optional + getTokenEndpointJwtcaAudFormat() { + return tokenEndpointJwtcaAudFormat; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint + */ + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + @JsonProperty("attribute_map") + public Optional getAttributeMap() { + return attributeMap; + } + + /** + * @return Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1Options other) { + return authorizationEndpoint.equals(other.authorizationEndpoint) + && clientId.equals(other.clientId) + && connectionSettings.equals(other.connectionSettings) + && domainAliases.equals(other.domainAliases) + && dpopSigningAlg.equals(other.dpopSigningAlg) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && iconUrl.equals(other.iconUrl) + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && oidcMetadata.equals(other.oidcMetadata) + && schemaVersion.equals(other.schemaVersion) + && scope.equals(other.scope) + && sendBackChannelNonce.equals(other.sendBackChannelNonce) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) + && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) + && upstreamParams.equals(other.upstreamParams) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && attributeMap.equals(other.attributeMap) + && domain.equals(other.domain) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authorizationEndpoint, + this.clientId, + this.connectionSettings, + this.domainAliases, + this.dpopSigningAlg, + this.federatedConnectionsAccessTokens, + this.iconUrl, + this.idTokenSessionExpirySupported, + this.idTokenSignedResponseAlgs, + this.issuer, + this.jwksUri, + this.nonPersistentAttrs, + this.oidcMetadata, + this.schemaVersion, + this.scope, + this.sendBackChannelNonce, + this.setUserRootAttributes, + this.tenantDomain, + this.tokenEndpoint, + this.tokenEndpointAuthMethod, + this.tokenEndpointAuthSigningAlg, + this.tokenEndpointJwtcaAudFormat, + this.upstreamParams, + this.useOauthSpecScope, + this.userinfoEndpoint, + this.attributeMap, + this.domain, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject1Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + _FinalStage authorizationEndpoint(Optional authorizationEndpoint); + + _FinalStage authorizationEndpoint(String authorizationEndpoint); + + _FinalStage connectionSettings( + Optional + connectionSettings); + + _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings connectionSettings); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg); + + _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum dpopSigningAlg); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported); + + _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported); + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs); + + _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs); + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + _FinalStage issuer(Optional issuer); + + _FinalStage issuer(String issuer); + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(Optional jwksUri); + + _FinalStage jwksUri(String jwksUri); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage oidcMetadata( + Optional oidcMetadata); + + _FinalStage oidcMetadata(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata oidcMetadata); + + _FinalStage schemaVersion( + Optional schemaVersion); + + _FinalStage schemaVersion( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum schemaVersion); + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + _FinalStage scope(Optional scope); + + _FinalStage scope(String scope); + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); + + _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              Tenant domain

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod); + + _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg); + + _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat); + + _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + _FinalStage useOauthSpecScope(Optional useOauthSpecScope); + + _FinalStage useOauthSpecScope(Boolean useOauthSpecScope); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + _FinalStage attributeMap( + Optional attributeMap); + + _FinalStage attributeMap(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap attributeMap); + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + _FinalStage type(Optional type); + + _FinalStage type(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum type); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional type = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional attributeMap = + Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional useOauthSpecScope = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional + tokenEndpointJwtcaAudFormat = Optional.empty(); + + private Optional + tokenEndpointAuthSigningAlg = Optional.empty(); + + private Optional + tokenEndpointAuthMethod = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional sendBackChannelNonce = Optional.empty(); + + private Optional scope = Optional.empty(); + + private Optional schemaVersion = + Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional jwksUri = Optional.empty(); + + private Optional issuer = Optional.empty(); + + private Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs = Optional.empty(); + + private Optional idTokenSessionExpirySupported = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional + dpopSigningAlg = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + connectionSettings = Optional.empty(); + + private Optional authorizationEndpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1Options other) { + authorizationEndpoint(other.getAuthorizationEndpoint()); + clientId(other.getClientId()); + connectionSettings(other.getConnectionSettings()); + domainAliases(other.getDomainAliases()); + dpopSigningAlg(other.getDpopSigningAlg()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + iconUrl(other.getIconUrl()); + idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + oidcMetadata(other.getOidcMetadata()); + schemaVersion(other.getSchemaVersion()); + scope(other.getScope()); + sendBackChannelNonce(other.getSendBackChannelNonce()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); + tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); + upstreamParams(other.getUpstreamParams()); + useOauthSpecScope(other.getUseOauthSpecScope()); + userinfoEndpoint(other.getUserinfoEndpoint()); + attributeMap(other.getAttributeMap()); + domain(other.getDomain()); + type(other.getType()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage type(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Domain of the Okta organization (e.g., dev-123456.okta.com). Should be just the domain of the okta server with no scheme or trailing backslash. Discovery runs only when connection.options.oidc_metadata is empty and a domain is provided

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + @java.lang.Override + public _FinalStage attributeMap( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap attributeMap) { + this.attributeMap = Optional.ofNullable(attributeMap); + return this; + } + + @java.lang.Override + @JsonSetter(value = "attribute_map", nulls = Nulls.SKIP) + public _FinalStage attributeMap( + Optional attributeMap) { + this.attributeMap = attributeMap; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useOauthSpecScope(Boolean useOauthSpecScope) { + this.useOauthSpecScope = Optional.ofNullable(useOauthSpecScope); + return this; + } + + /** + *

                                                              When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useOauthSpecScope", nulls = Nulls.SKIP) + public _FinalStage useOauthSpecScope(Optional useOauthSpecScope) { + this.useOauthSpecScope = useOauthSpecScope; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointJwtcaAudFormat( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = Optional.ofNullable(tokenEndpointJwtcaAudFormat); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_jwtca_aud_format", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointJwtcaAudFormat( + Optional + tokenEndpointJwtcaAudFormat) { + this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = Optional.ofNullable(tokenEndpointAuthSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlg( + Optional + tokenEndpointAuthSigningAlg) { + this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + return this; + } + + @java.lang.Override + public _FinalStage tokenEndpointAuthMethod( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = Optional.ofNullable(tokenEndpointAuthMethod); + return this; + } + + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethod( + Optional + tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              Tenant domain

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce) { + this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); + return this; + } + + /** + *

                                                              When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) + public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { + this.sendBackChannelNonce = sendBackChannelNonce; + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(String scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional scope) { + this.scope = scope; + return this; + } + + @java.lang.Override + public _FinalStage schemaVersion( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum schemaVersion) { + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + @java.lang.Override + @JsonSetter(value = "schema_version", nulls = Nulls.SKIP) + public _FinalStage schemaVersion( + Optional schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + @java.lang.Override + public _FinalStage oidcMetadata( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public _FinalStage oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage jwksUri(String jwksUri) { + this.jwksUri = Optional.ofNullable(jwksUri); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) + public _FinalStage jwksUri(Optional jwksUri) { + this.jwksUri = jwksUri; + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage issuer(String issuer) { + this.issuer = Optional.ofNullable(issuer); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "issuer", nulls = Nulls.SKIP) + public _FinalStage issuer(Optional issuer) { + this.issuer = issuer; + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSignedResponseAlgs( + List + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = Optional.ofNullable(idTokenSignedResponseAlgs); + return this; + } + + /** + *

                                                              List of algorithms allowed to verify the ID tokens. Applicable when strategy=oidc or okta.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) + public _FinalStage idTokenSignedResponseAlgs( + Optional< + List< + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum>> + idTokenSignedResponseAlgs) { + this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenSessionExpirySupported(Boolean idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = Optional.ofNullable(idTokenSessionExpirySupported); + return this; + } + + /** + *

                                                              Indicates whether the identity provider supports session expiry via the id_token. If true, the system will use the session_expiry claim in the id_token to determine session expiry.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_session_expiry_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSessionExpirySupported(Optional idTokenSessionExpirySupported) { + this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + @java.lang.Override + public _FinalStage dpopSigningAlg( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum dpopSigningAlg) { + this.dpopSigningAlg = Optional.ofNullable(dpopSigningAlg); + return this; + } + + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlg( + Optional + dpopSigningAlg) { + this.dpopSigningAlg = dpopSigningAlg; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage connectionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings connectionSettings) { + this.connectionSettings = Optional.ofNullable(connectionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connection_settings", nulls = Nulls.SKIP) + public _FinalStage connectionSettings( + Optional + connectionSettings) { + this.connectionSettings = connectionSettings; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage authorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) + public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject1Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1Options( + authorizationEndpoint, + clientId, + connectionSettings, + domainAliases, + dpopSigningAlg, + federatedConnectionsAccessTokens, + iconUrl, + idTokenSessionExpirySupported, + idTokenSignedResponseAlgs, + issuer, + jwksUri, + nonPersistentAttrs, + oidcMetadata, + schemaVersion, + scope, + sendBackChannelNonce, + setUserRootAttributes, + tenantDomain, + tokenEndpoint, + tokenEndpointAuthMethod, + tokenEndpointAuthSigningAlg, + tokenEndpointJwtcaAudFormat, + upstreamParams, + useOauthSpecScope, + userinfoEndpoint, + attributeMap, + domain, + type, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap.java new file mode 100644 index 00000000..a06493d8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap.java @@ -0,0 +1,170 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap { + private final Optional> attributes; + + private final Optional userinfoScope; + + private final Optional + mappingMode; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap( + Optional> attributes, + Optional userinfoScope, + Optional + mappingMode, + Map additionalProperties) { + this.attributes = attributes; + this.userinfoScope = userinfoScope; + this.mappingMode = mappingMode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("attributes") + public Optional> getAttributes() { + return attributes; + } + + /** + * @return Scopes to send to the IdP's Userinfo endpoint + */ + @JsonProperty("userinfo_scope") + public Optional getUserinfoScope() { + return userinfoScope; + } + + @JsonProperty("mapping_mode") + public Optional + getMappingMode() { + return mappingMode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap other) { + return attributes.equals(other.attributes) + && userinfoScope.equals(other.userinfoScope) + && mappingMode.equals(other.mappingMode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.attributes, this.userinfoScope, this.mappingMode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> attributes = Optional.empty(); + + private Optional userinfoScope = Optional.empty(); + + private Optional + mappingMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap other) { + attributes(other.getAttributes()); + userinfoScope(other.getUserinfoScope()); + mappingMode(other.getMappingMode()); + return this; + } + + @JsonSetter(value = "attributes", nulls = Nulls.SKIP) + public Builder attributes(Optional> attributes) { + this.attributes = attributes; + return this; + } + + public Builder attributes(Map attributes) { + this.attributes = Optional.ofNullable(attributes); + return this; + } + + /** + *

                                                              Scopes to send to the IdP's Userinfo endpoint

                                                              + */ + @JsonSetter(value = "userinfo_scope", nulls = Nulls.SKIP) + public Builder userinfoScope(Optional userinfoScope) { + this.userinfoScope = userinfoScope; + return this; + } + + public Builder userinfoScope(String userinfoScope) { + this.userinfoScope = Optional.ofNullable(userinfoScope); + return this; + } + + @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) + public Builder mappingMode( + Optional + mappingMode) { + this.mappingMode = mappingMode; + return this; + } + + public Builder mappingMode( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum mappingMode) { + this.mappingMode = Optional.ofNullable(mappingMode); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMap( + attributes, userinfoScope, mappingMode, 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/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum.java new file mode 100644 index 00000000..88dd1a9b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum.java @@ -0,0 +1,96 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum + USE_MAP = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.USE_MAP, "use_map"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum + BASIC_PROFILE = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.BASIC_PROFILE, "basic_profile"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USE_MAP: + return visitor.visitUseMap(); + case BASIC_PROFILE: + return visitor.visitBasicProfile(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum valueOf( + String value) { + switch (value) { + case "use_map": + return USE_MAP; + case "basic_profile": + return BASIC_PROFILE; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsAttributeMapMappingModeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + BASIC_PROFILE, + + USE_MAP, + + UNKNOWN + } + + public interface Visitor { + T visitBasicProfile(); + + T visitUseMap(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings.java new file mode 100644 index 00000000..fd8af7b5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings { + private final Optional pkce; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings( + Optional pkce, + Map additionalProperties) { + this.pkce = pkce; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("pkce") + public Optional getPkce() { + return pkce; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings other) { + return pkce.equals(other.pkce); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.pkce); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional pkce = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings other) { + pkce(other.getPkce()); + return this; + } + + @JsonSetter(value = "pkce", nulls = Nulls.SKIP) + public Builder pkce( + Optional pkce) { + this.pkce = pkce; + return this; + } + + public Builder pkce( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum pkce) { + this.pkce = Optional.ofNullable(pkce); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettings( + pkce, 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/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum.java new file mode 100644 index 00000000..442f6810 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum.java @@ -0,0 +1,119 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum S256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.S256, "S256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum AUTO = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.AUTO, "auto"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum + DISABLED = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.DISABLED, "disabled"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum PLAIN = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.PLAIN, "plain"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case S256: + return visitor.visitS256(); + case AUTO: + return visitor.visitAuto(); + case DISABLED: + return visitor.visitDisabled(); + case PLAIN: + return visitor.visitPlain(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum valueOf( + String value) { + switch (value) { + case "S256": + return S256; + case "auto": + return AUTO; + case "disabled": + return DISABLED; + case "plain": + return PLAIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsConnectionSettingsPkceEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTO, + + S256, + + PLAIN, + + DISABLED, + + UNKNOWN + } + + public interface Visitor { + T visitAuto(); + + T visitS256(); + + T visitPlain(); + + T visitDisabled(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum.java new file mode 100644 index 00000000..2b3e9751 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum.java @@ -0,0 +1,112 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum ED25519 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum( + Value.ED25519, "Ed25519"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum ES384 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum ES256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum ES512 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum(Value.ES512, "ES512"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ED25519: + return visitor.visitEd25519(); + case ES384: + return visitor.visitEs384(); + case ES256: + return visitor.visitEs256(); + case ES512: + return visitor.visitEs512(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum valueOf(String value) { + switch (value) { + case "Ed25519": + return ED25519; + case "ES384": + return ES384; + case "ES256": + return ES256; + case "ES512": + return ES512; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsDpopSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + ES512, + + ED25519, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitEs512(); + + T visitEd25519(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..fc05ef75 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java new file mode 100644 index 00000000..27b86c98 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS512 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + ES384 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + PS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + ES256 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + PS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + RS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsIdTokenSignedResponseAlgsItemEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata.java new file mode 100644 index 00000000..898a9ff3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum.java new file mode 100644 index 00000000..75ba4c92 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum.java @@ -0,0 +1,90 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum OPENID100 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum( + Value.OPENID100, "openid-1.0.0"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum OIDC_V4 = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum(Value.OIDC_V4, "oidc-v4"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID100: + return visitor.visitOpenid100(); + case OIDC_V4: + return visitor.visitOidcV4(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum valueOf(String value) { + switch (value) { + case "openid-1.0.0": + return OPENID100; + case "oidc-v4": + return OIDC_V4; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSchemaVersionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OPENID100, + + OIDC_V4, + + UNKNOWN + } + + public interface Visitor { + T visitOpenid100(); + + T visitOidcV4(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..d3045348 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java new file mode 100644 index 00000000..4b31f934 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + PRIVATE_KEY_JWT = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.PRIVATE_KEY_JWT, "private_key_jwt"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + CLIENT_SECRET_POST = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PRIVATE_KEY_JWT: + return visitor.visitPrivateKeyJwt(); + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum valueOf( + String value) { + switch (value) { + case "private_key_jwt": + return PRIVATE_KEY_JWT; + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthMethodEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + PRIVATE_KEY_JWT, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitPrivateKeyJwt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java new file mode 100644 index 00000000..f8a5c1e3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum.java @@ -0,0 +1,156 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS512 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS512, "RS512"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + ES384 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES384, "ES384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + PS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS384, "PS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + ES256 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.ES256, "ES256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + PS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.PS256, "PS256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS384 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS384, "RS384"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + RS256 = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.RS256, "RS256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RS512: + return visitor.visitRs512(); + case ES384: + return visitor.visitEs384(); + case PS384: + return visitor.visitPs384(); + case ES256: + return visitor.visitEs256(); + case PS256: + return visitor.visitPs256(); + case RS384: + return visitor.visitRs384(); + case RS256: + return visitor.visitRs256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum valueOf( + String value) { + switch (value) { + case "RS512": + return RS512; + case "ES384": + return ES384; + case "PS384": + return PS384; + case "ES256": + return ES256; + case "PS256": + return PS256; + case "RS384": + return RS384; + case "RS256": + return RS256; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointAuthSigningAlgEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ES256, + + ES384, + + PS256, + + PS384, + + RS256, + + RS384, + + RS512, + + UNKNOWN + } + + public interface Visitor { + T visitEs256(); + + T visitEs384(); + + T visitPs256(); + + T visitPs384(); + + T visitRs256(); + + T visitRs384(); + + T visitRs512(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java new file mode 100644 index 00000000..396d27b4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + ISSUER = new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.ISSUER, "issuer"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + TOKEN_ENDPOINT = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.TOKEN_ENDPOINT, "token_endpoint"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ISSUER: + return visitor.visitIssuer(); + case TOKEN_ENDPOINT: + return visitor.visitTokenEndpoint(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum valueOf( + String value) { + switch (value) { + case "issuer": + return ISSUER; + case "token_endpoint": + return TOKEN_ENDPOINT; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTokenEndpointJwtcaAudFormatEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ISSUER, + + TOKEN_ENDPOINT, + + UNKNOWN + } + + public interface Visitor { + T visitIssuer(); + + T visitTokenEndpoint(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum.java new file mode 100644 index 00000000..cb3fb454 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum BACK_CHANNEL = + new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum( + Value.BACK_CHANNEL, "back_channel"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BACK_CHANNEL: + return visitor.visitBackChannel(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum valueOf(String value) { + switch (value) { + case "back_channel": + return BACK_CHANNEL; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1OptionsTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BACK_CHANNEL, + + UNKNOWN + } + + public interface Visitor { + T visitBackChannel(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum.java new file mode 100644 index 00000000..94a1f38c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum OKTA = + new EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum(Value.OKTA, "okta"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OKTA: + return visitor.visitOkta(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum valueOf(String value) { + switch (value) { + case "okta": + return OKTA; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject1StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OKTA, + + UNKNOWN + } + + public interface Visitor { + T visitOkta(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2.java new file mode 100644 index 00000000..c6aa56e2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject2.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject2 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject2Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject2Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject2 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication.java new file mode 100644 index 00000000..3afb5508 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts.java new file mode 100644 index 00000000..fa95a159 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata.java new file mode 100644 index 00000000..0c22ea06 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject2Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2Options.java new file mode 100644 index 00000000..b498c664 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2Options.java @@ -0,0 +1,1221 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional + digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional + protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional debug; + + private final Optional deflate; + + private final Optional destinationUrl; + + private final Optional disableFieldsMapFix; + + private final Optional disableSignout; + + private final Optional discoveryUrl; + + private final Optional> fieldsMap; + + private final Optional fieldsMapJsonRaw; + + private final Optional globalTokenRevocationJwtIss; + + private final Optional globalTokenRevocationJwtSub; + + private final Optional metadataUrl; + + private final Optional oidcMetadata; + + private final Optional recipientUrl; + + private final Optional requestTemplate; + + private final Optional signOutEndpoint; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional + signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional debug, + Optional deflate, + Optional destinationUrl, + Optional disableFieldsMapFix, + Optional disableSignout, + Optional discoveryUrl, + Optional> fieldsMap, + Optional fieldsMapJsonRaw, + Optional globalTokenRevocationJwtIss, + Optional globalTokenRevocationJwtSub, + Optional metadataUrl, + Optional oidcMetadata, + Optional recipientUrl, + Optional requestTemplate, + Optional signOutEndpoint, + Optional userIdAttribute, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.debug = debug; + this.deflate = deflate; + this.destinationUrl = destinationUrl; + this.disableFieldsMapFix = disableFieldsMapFix; + this.disableSignout = disableSignout; + this.discoveryUrl = discoveryUrl; + this.fieldsMap = fieldsMap; + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + this.metadataUrl = metadataUrl; + this.oidcMetadata = oidcMetadata; + this.recipientUrl = recipientUrl; + this.requestTemplate = requestTemplate; + this.signOutEndpoint = signOutEndpoint; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional + getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional + getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes. + */ + @JsonProperty("debug") + public Optional getDebug() { + return debug; + } + + /** + * @return When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. + */ + @JsonProperty("deflate") + public Optional getDeflate() { + return deflate; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("destinationUrl") + public Optional getDestinationUrl() { + return destinationUrl; + } + + /** + * @return When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled). + */ + @JsonProperty("disableFieldsMapFix") + public Optional getDisableFieldsMapFix() { + return disableFieldsMapFix; + } + + /** + * @return When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). + */ + @JsonProperty("disableSignout") + public Optional getDisableSignout() { + return disableSignout; + } + + /** + * @return URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access. + */ + @JsonProperty("discovery_url") + public Optional getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonProperty("fieldsMap") + public Optional> getFieldsMap() { + return fieldsMap; + } + + /** + * @return Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object. + */ + @JsonProperty("fieldsMapJsonRaw") + public Optional getFieldsMapJsonRaw() { + return fieldsMapJsonRaw; + } + + /** + * @return Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. + */ + @JsonProperty("global_token_revocation_jwt_iss") + public Optional getGlobalTokenRevocationJwtIss() { + return globalTokenRevocationJwtIss; + } + + /** + * @return Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. + */ + @JsonProperty("global_token_revocation_jwt_sub") + public Optional getGlobalTokenRevocationJwtSub() { + return globalTokenRevocationJwtSub; + } + + /** + * @return HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. + */ + @JsonProperty("metadataUrl") + public Optional getMetadataUrl() { + return metadataUrl; + } + + @JsonProperty("oidc_metadata") + public Optional getOidcMetadata() { + return oidcMetadata; + } + + /** + * @return The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. + */ + @JsonProperty("recipientUrl") + public Optional getRecipientUrl() { + return recipientUrl; + } + + /** + * @return Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template + */ + @JsonProperty("requestTemplate") + public Optional getRequestTemplate() { + return requestTemplate; + } + + /** + * @return Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. + */ + @JsonProperty("signOutEndpoint") + public Optional getSignOutEndpoint() { + return signOutEndpoint; + } + + /** + * @return Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject2Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && debug.equals(other.debug) + && deflate.equals(other.deflate) + && destinationUrl.equals(other.destinationUrl) + && disableFieldsMapFix.equals(other.disableFieldsMapFix) + && disableSignout.equals(other.disableSignout) + && discoveryUrl.equals(other.discoveryUrl) + && fieldsMap.equals(other.fieldsMap) + && fieldsMapJsonRaw.equals(other.fieldsMapJsonRaw) + && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) + && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) + && metadataUrl.equals(other.metadataUrl) + && oidcMetadata.equals(other.oidcMetadata) + && recipientUrl.equals(other.recipientUrl) + && requestTemplate.equals(other.requestTemplate) + && signOutEndpoint.equals(other.signOutEndpoint) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.debug, + this.deflate, + this.destinationUrl, + this.disableFieldsMapFix, + this.disableSignout, + this.discoveryUrl, + this.fieldsMap, + this.fieldsMapJsonRaw, + this.globalTokenRevocationJwtIss, + this.globalTokenRevocationJwtSub, + this.metadataUrl, + this.oidcMetadata, + this.recipientUrl, + this.requestTemplate, + this.signOutEndpoint, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional + assertionDecryptionSettings = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional + digestAlgorithm = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + protocolBinding = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional subject = + Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional debug = Optional.empty(); + + private Optional deflate = Optional.empty(); + + private Optional destinationUrl = Optional.empty(); + + private Optional disableFieldsMapFix = Optional.empty(); + + private Optional disableSignout = Optional.empty(); + + private Optional discoveryUrl = Optional.empty(); + + private Optional> fieldsMap = Optional.empty(); + + private Optional fieldsMapJsonRaw = Optional.empty(); + + private Optional globalTokenRevocationJwtIss = Optional.empty(); + + private Optional globalTokenRevocationJwtSub = Optional.empty(); + + private Optional metadataUrl = Optional.empty(); + + private Optional oidcMetadata = + Optional.empty(); + + private Optional recipientUrl = Optional.empty(); + + private Optional requestTemplate = Optional.empty(); + + private Optional signOutEndpoint = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + debug(other.getDebug()); + deflate(other.getDeflate()); + destinationUrl(other.getDestinationUrl()); + disableFieldsMapFix(other.getDisableFieldsMapFix()); + disableSignout(other.getDisableSignout()); + discoveryUrl(other.getDiscoveryUrl()); + fieldsMap(other.getFieldsMap()); + fieldsMapJsonRaw(other.getFieldsMapJsonRaw()); + globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); + globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); + metadataUrl(other.getMetadataUrl()); + oidcMetadata(other.getOidcMetadata()); + recipientUrl(other.getRecipientUrl()); + requestTemplate(other.getRequestTemplate()); + signOutEndpoint(other.getSignOutEndpoint()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public Builder assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + public Builder assertionDecryptionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public Builder cert(Optional cert) { + this.cert = cert; + return this; + } + + public Builder cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public Builder digestAlgorithm( + Optional + digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + public Builder digestAlgorithm( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public Builder expires(Optional expires) { + this.expires = expires; + return this; + } + + public Builder expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public Builder idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + public Builder idpinitiated( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public Builder protocolBinding( + Optional + protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + public Builder protocolBinding( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public Builder signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + public Builder signatureAlgorithm( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public Builder signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + public Builder signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public Builder signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + public Builder signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public Builder subject(Optional subject) { + this.subject = subject; + return this; + } + + public Builder subject(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              When true, enables detailed SAML debugging by issuing 'w' (warning) events in tenant logs containing SAML request/response details. WARNING: Potentially exposes sensitive user information (PII, credentials) and should only be enabled temporarily for debugging purposes.

                                                              + */ + @JsonSetter(value = "debug", nulls = Nulls.SKIP) + public Builder debug(Optional debug) { + this.debug = debug; + return this; + } + + public Builder debug(Boolean debug) { + this.debug = Optional.ofNullable(debug); + return this; + } + + /** + *

                                                              When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding.

                                                              + */ + @JsonSetter(value = "deflate", nulls = Nulls.SKIP) + public Builder deflate(Optional deflate) { + this.deflate = deflate; + return this; + } + + public Builder deflate(Boolean deflate) { + this.deflate = Optional.ofNullable(deflate); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "destinationUrl", nulls = Nulls.SKIP) + public Builder destinationUrl(Optional destinationUrl) { + this.destinationUrl = destinationUrl; + return this; + } + + public Builder destinationUrl(String destinationUrl) { + this.destinationUrl = Optional.ofNullable(destinationUrl); + return this; + } + + /** + *

                                                              When true, disables the automatic correction of the fieldsMap configuration to ensure proper mapping of SAML attributes to user profile fields. Defaults to false (fieldsMap fix enabled).

                                                              + */ + @JsonSetter(value = "disableFieldsMapFix", nulls = Nulls.SKIP) + public Builder disableFieldsMapFix(Optional disableFieldsMapFix) { + this.disableFieldsMapFix = disableFieldsMapFix; + return this; + } + + public Builder disableFieldsMapFix(Boolean disableFieldsMapFix) { + this.disableFieldsMapFix = Optional.ofNullable(disableFieldsMapFix); + return this; + } + + /** + *

                                                              When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled).

                                                              + */ + @JsonSetter(value = "disableSignout", nulls = Nulls.SKIP) + public Builder disableSignout(Optional disableSignout) { + this.disableSignout = disableSignout; + return this; + } + + public Builder disableSignout(Boolean disableSignout) { + this.disableSignout = Optional.ofNullable(disableSignout); + return this; + } + + /** + *

                                                              URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. Used with Cross App Access.

                                                              + */ + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(Optional discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = Optional.ofNullable(discoveryUrl); + return this; + } + + @JsonSetter(value = "fieldsMap", nulls = Nulls.SKIP) + public Builder fieldsMap(Optional> fieldsMap) { + this.fieldsMap = fieldsMap; + return this; + } + + public Builder fieldsMap(Map fieldsMap) { + this.fieldsMap = Optional.ofNullable(fieldsMap); + return this; + } + + /** + *

                                                              Raw JSON string representation of the fieldsMap configuration. Used internally for storage and retrieval of the fieldsMap object.

                                                              + */ + @JsonSetter(value = "fieldsMapJsonRaw", nulls = Nulls.SKIP) + public Builder fieldsMapJsonRaw(Optional fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = fieldsMapJsonRaw; + return this; + } + + public Builder fieldsMapJsonRaw(String fieldsMapJsonRaw) { + this.fieldsMapJsonRaw = Optional.ofNullable(fieldsMapJsonRaw); + return this; + } + + /** + *

                                                              Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_iss", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtIss(Optional globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; + return this; + } + + public Builder globalTokenRevocationJwtIss(String globalTokenRevocationJwtIss) { + this.globalTokenRevocationJwtIss = Optional.ofNullable(globalTokenRevocationJwtIss); + return this; + } + + /** + *

                                                              Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss.

                                                              + */ + @JsonSetter(value = "global_token_revocation_jwt_sub", nulls = Nulls.SKIP) + public Builder globalTokenRevocationJwtSub(Optional globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; + return this; + } + + public Builder globalTokenRevocationJwtSub(String globalTokenRevocationJwtSub) { + this.globalTokenRevocationJwtSub = Optional.ofNullable(globalTokenRevocationJwtSub); + return this; + } + + /** + *

                                                              HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both.

                                                              + */ + @JsonSetter(value = "metadataUrl", nulls = Nulls.SKIP) + public Builder metadataUrl(Optional metadataUrl) { + this.metadataUrl = metadataUrl; + return this; + } + + public Builder metadataUrl(String metadataUrl) { + this.metadataUrl = Optional.ofNullable(metadataUrl); + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata( + Optional oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata oidcMetadata) { + this.oidcMetadata = Optional.ofNullable(oidcMetadata); + return this; + } + + /** + *

                                                              The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL.

                                                              + */ + @JsonSetter(value = "recipientUrl", nulls = Nulls.SKIP) + public Builder recipientUrl(Optional recipientUrl) { + this.recipientUrl = recipientUrl; + return this; + } + + public Builder recipientUrl(String recipientUrl) { + this.recipientUrl = Optional.ofNullable(recipientUrl); + return this; + } + + /** + *

                                                              Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template

                                                              + */ + @JsonSetter(value = "requestTemplate", nulls = Nulls.SKIP) + public Builder requestTemplate(Optional requestTemplate) { + this.requestTemplate = requestTemplate; + return this; + } + + public Builder requestTemplate(String requestTemplate) { + this.requestTemplate = Optional.ofNullable(requestTemplate); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false.

                                                              + */ + @JsonSetter(value = "signOutEndpoint", nulls = Nulls.SKIP) + public Builder signOutEndpoint(Optional signOutEndpoint) { + this.signOutEndpoint = signOutEndpoint; + return this; + } + + public Builder signOutEndpoint(String signOutEndpoint) { + this.signOutEndpoint = Optional.ofNullable(signOutEndpoint); + return this; + } + + /** + *

                                                              Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject2Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + debug, + deflate, + destinationUrl, + disableFieldsMapFix, + disableSignout, + discoveryUrl, + fieldsMap, + fieldsMapJsonRaw, + globalTokenRevocationJwtIss, + globalTokenRevocationJwtSub, + metadataUrl, + oidcMetadata, + recipientUrl, + requestTemplate, + signOutEndpoint, + userIdAttribute, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..f7ca36f3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings.java @@ -0,0 +1,183 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..007d9e2b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum valueOf( + String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..1ca54456 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum valueOf( + String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated.java new file mode 100644 index 00000000..252235be --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated.java @@ -0,0 +1,207 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional + clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..94e66a42 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,108 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + WSFED = new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + SAMLP = new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + OIDC = new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata.java new file mode 100644 index 00000000..621784e9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata.java @@ -0,0 +1,1821 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata { + private final Optional> acrValuesSupported; + + private final String authorizationEndpoint; + + private final Optional> claimTypesSupported; + + private final Optional> claimsLocalesSupported; + + private final Optional claimsParameterSupported; + + private final Optional> claimsSupported; + + private final Optional> codeChallengeMethodsSupported; + + private final Optional> displayValuesSupported; + + private final Optional> dpopSigningAlgValuesSupported; + + private final Optional endSessionEndpoint; + + private final Optional> grantTypesSupported; + + private final Optional> idTokenEncryptionAlgValuesSupported; + + private final Optional> idTokenEncryptionEncValuesSupported; + + private final List idTokenSigningAlgValuesSupported; + + private final String issuer; + + private final String jwksUri; + + private final Optional opPolicyUri; + + private final Optional opTosUri; + + private final Optional registrationEndpoint; + + private final Optional> requestObjectEncryptionAlgValuesSupported; + + private final Optional> requestObjectEncryptionEncValuesSupported; + + private final Optional> requestObjectSigningAlgValuesSupported; + + private final Optional requestParameterSupported; + + private final Optional requestUriParameterSupported; + + private final Optional requireRequestUriRegistration; + + private final Optional> responseModesSupported; + + private final Optional> responseTypesSupported; + + private final Optional> scopesSupported; + + private final Optional serviceDocumentation; + + private final Optional> subjectTypesSupported; + + private final Optional tokenEndpoint; + + private final Optional> tokenEndpointAuthMethodsSupported; + + private final Optional> tokenEndpointAuthSigningAlgValuesSupported; + + private final Optional> uiLocalesSupported; + + private final Optional> userinfoEncryptionAlgValuesSupported; + + private final Optional> userinfoEncryptionEncValuesSupported; + + private final Optional userinfoEndpoint; + + private final Optional> userinfoSigningAlgValuesSupported; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata( + Optional> acrValuesSupported, + String authorizationEndpoint, + Optional> claimTypesSupported, + Optional> claimsLocalesSupported, + Optional claimsParameterSupported, + Optional> claimsSupported, + Optional> codeChallengeMethodsSupported, + Optional> displayValuesSupported, + Optional> dpopSigningAlgValuesSupported, + Optional endSessionEndpoint, + Optional> grantTypesSupported, + Optional> idTokenEncryptionAlgValuesSupported, + Optional> idTokenEncryptionEncValuesSupported, + List idTokenSigningAlgValuesSupported, + String issuer, + String jwksUri, + Optional opPolicyUri, + Optional opTosUri, + Optional registrationEndpoint, + Optional> requestObjectEncryptionAlgValuesSupported, + Optional> requestObjectEncryptionEncValuesSupported, + Optional> requestObjectSigningAlgValuesSupported, + Optional requestParameterSupported, + Optional requestUriParameterSupported, + Optional requireRequestUriRegistration, + Optional> responseModesSupported, + Optional> responseTypesSupported, + Optional> scopesSupported, + Optional serviceDocumentation, + Optional> subjectTypesSupported, + Optional tokenEndpoint, + Optional> tokenEndpointAuthMethodsSupported, + Optional> tokenEndpointAuthSigningAlgValuesSupported, + Optional> uiLocalesSupported, + Optional> userinfoEncryptionAlgValuesSupported, + Optional> userinfoEncryptionEncValuesSupported, + Optional userinfoEndpoint, + Optional> userinfoSigningAlgValuesSupported, + Map additionalProperties) { + this.acrValuesSupported = acrValuesSupported; + this.authorizationEndpoint = authorizationEndpoint; + this.claimTypesSupported = claimTypesSupported; + this.claimsLocalesSupported = claimsLocalesSupported; + this.claimsParameterSupported = claimsParameterSupported; + this.claimsSupported = claimsSupported; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.displayValuesSupported = displayValuesSupported; + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + this.endSessionEndpoint = endSessionEndpoint; + this.grantTypesSupported = grantTypesSupported; + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + this.issuer = issuer; + this.jwksUri = jwksUri; + this.opPolicyUri = opPolicyUri; + this.opTosUri = opTosUri; + this.registrationEndpoint = registrationEndpoint; + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.requestParameterSupported = requestParameterSupported; + this.requestUriParameterSupported = requestUriParameterSupported; + this.requireRequestUriRegistration = requireRequestUriRegistration; + this.responseModesSupported = responseModesSupported; + this.responseTypesSupported = responseTypesSupported; + this.scopesSupported = scopesSupported; + this.serviceDocumentation = serviceDocumentation; + this.subjectTypesSupported = subjectTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + this.uiLocalesSupported = uiLocalesSupported; + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + this.userinfoEndpoint = userinfoEndpoint; + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of the Authentication Context Class References that this OP supports + */ + @JsonProperty("acr_values_supported") + public Optional> getAcrValuesSupported() { + return acrValuesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow. + */ + @JsonProperty("authorization_endpoint") + public String getAuthorizationEndpoint() { + return authorizationEndpoint; + } + + /** + * @return JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. + */ + @JsonProperty("claim_types_supported") + public Optional> getClaimTypesSupported() { + return claimTypesSupported; + } + + /** + * @return Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values. + */ + @JsonProperty("claims_locales_supported") + public Optional> getClaimsLocalesSupported() { + return claimsLocalesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("claims_parameter_supported") + public Optional getClaimsParameterSupported() { + return claimsParameterSupported; + } + + /** + * @return JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + */ + @JsonProperty("claims_supported") + public Optional> getClaimsSupported() { + return claimsSupported; + } + + /** + * @return JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636. + */ + @JsonProperty("code_challenge_methods_supported") + public Optional> getCodeChallengeMethodsSupported() { + return codeChallengeMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("display_values_supported") + public Optional> getDisplayValuesSupported() { + return displayValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing. + */ + @JsonProperty("dpop_signing_alg_values_supported") + public Optional> getDpopSigningAlgValuesSupported() { + return dpopSigningAlgValuesSupported; + } + + /** + * @return URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme. + */ + @JsonProperty("end_session_endpoint") + public Optional getEndSessionEndpoint() { + return endSessionEndpoint; + } + + /** + * @return A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. + */ + @JsonProperty("grant_types_supported") + public Optional> getGrantTypesSupported() { + return grantTypesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT + */ + @JsonProperty("id_token_encryption_alg_values_supported") + public Optional> getIdTokenEncryptionAlgValuesSupported() { + return idTokenEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("id_token_encryption_enc_values_supported") + public Optional> getIdTokenEncryptionEncValuesSupported() { + return idTokenEncryptionEncValuesSupported; + } + + /** + * @return A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518 + */ + @JsonProperty("id_token_signing_alg_values_supported") + public List getIdTokenSigningAlgValuesSupported() { + return idTokenSigningAlgValuesSupported; + } + + /** + * @return The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider. + */ + @JsonProperty("issuer") + public String getIssuer() { + return issuer; + } + + /** + * @return URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures. + */ + @JsonProperty("jwks_uri") + public String getJwksUri() { + return jwksUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_policy_uri") + public Optional getOpPolicyUri() { + return opPolicyUri; + } + + /** + * @return URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. + */ + @JsonProperty("op_tos_uri") + public Optional getOpTosUri() { + return opTosUri; + } + + /** + * @return URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration + */ + @JsonProperty("registration_endpoint") + public Optional getRegistrationEndpoint() { + return registrationEndpoint; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_alg_values_supported") + public Optional> getRequestObjectEncryptionAlgValuesSupported() { + return requestObjectEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. + */ + @JsonProperty("request_object_encryption_enc_values_supported") + public Optional> getRequestObjectEncryptionEncValuesSupported() { + return requestObjectEncryptionEncValuesSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. + */ + @JsonProperty("request_object_signing_alg_values_supported") + public Optional> getRequestObjectSigningAlgValuesSupported() { + return requestObjectSigningAlgValuesSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_parameter_supported") + public Optional getRequestParameterSupported() { + return requestParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. + */ + @JsonProperty("request_uri_parameter_supported") + public Optional getRequestUriParameterSupported() { + return requestUriParameterSupported; + } + + /** + * @return Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false. + */ + @JsonProperty("require_request_uri_registration") + public Optional getRequireRequestUriRegistration() { + return requireRequestUriRegistration; + } + + /** + * @return A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] + */ + @JsonProperty("response_modes_supported") + public Optional> getResponseModesSupported() { + return responseModesSupported; + } + + /** + * @return A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values + */ + @JsonProperty("response_types_supported") + public Optional> getResponseTypesSupported() { + return responseTypesSupported; + } + + /** + * @return A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED + */ + @JsonProperty("scopes_supported") + public Optional> getScopesSupported() { + return scopesSupported; + } + + /** + * @return URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. + */ + @JsonProperty("service_documentation") + public Optional getServiceDocumentation() { + return serviceDocumentation; + } + + /** + * @return A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public + */ + @JsonProperty("subject_types_supported") + public Optional> getSubjectTypesSupported() { + return subjectTypesSupported; + } + + /** + * @return URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ + @JsonProperty("token_endpoint") + public Optional getTokenEndpoint() { + return tokenEndpoint; + } + + /** + * @return JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749]. + */ + @JsonProperty("token_endpoint_auth_methods_supported") + public Optional> getTokenEndpointAuthMethodsSupported() { + return tokenEndpointAuthMethodsSupported; + } + + /** + * @return JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { + return tokenEndpointAuthSigningAlgValuesSupported; + } + + /** + * @return Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. + */ + @JsonProperty("ui_locales_supported") + public Optional> getUiLocalesSupported() { + return uiLocalesSupported; + } + + /** + * @return JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_alg_values_supported") + public Optional> getUserinfoEncryptionAlgValuesSupported() { + return userinfoEncryptionAlgValuesSupported; + } + + /** + * @return JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + */ + @JsonProperty("userinfo_encryption_enc_values_supported") + public Optional> getUserinfoEncryptionEncValuesSupported() { + return userinfoEncryptionEncValuesSupported; + } + + /** + * @return Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token. + */ + @JsonProperty("userinfo_endpoint") + public Optional getUserinfoEndpoint() { + return userinfoEndpoint; + } + + /** + * @return JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included. + */ + @JsonProperty("userinfo_signing_alg_values_supported") + public Optional> getUserinfoSigningAlgValuesSupported() { + return userinfoSigningAlgValuesSupported; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata other) { + return acrValuesSupported.equals(other.acrValuesSupported) + && authorizationEndpoint.equals(other.authorizationEndpoint) + && claimTypesSupported.equals(other.claimTypesSupported) + && claimsLocalesSupported.equals(other.claimsLocalesSupported) + && claimsParameterSupported.equals(other.claimsParameterSupported) + && claimsSupported.equals(other.claimsSupported) + && codeChallengeMethodsSupported.equals(other.codeChallengeMethodsSupported) + && displayValuesSupported.equals(other.displayValuesSupported) + && dpopSigningAlgValuesSupported.equals(other.dpopSigningAlgValuesSupported) + && endSessionEndpoint.equals(other.endSessionEndpoint) + && grantTypesSupported.equals(other.grantTypesSupported) + && idTokenEncryptionAlgValuesSupported.equals(other.idTokenEncryptionAlgValuesSupported) + && idTokenEncryptionEncValuesSupported.equals(other.idTokenEncryptionEncValuesSupported) + && idTokenSigningAlgValuesSupported.equals(other.idTokenSigningAlgValuesSupported) + && issuer.equals(other.issuer) + && jwksUri.equals(other.jwksUri) + && opPolicyUri.equals(other.opPolicyUri) + && opTosUri.equals(other.opTosUri) + && registrationEndpoint.equals(other.registrationEndpoint) + && requestObjectEncryptionAlgValuesSupported.equals(other.requestObjectEncryptionAlgValuesSupported) + && requestObjectEncryptionEncValuesSupported.equals(other.requestObjectEncryptionEncValuesSupported) + && requestObjectSigningAlgValuesSupported.equals(other.requestObjectSigningAlgValuesSupported) + && requestParameterSupported.equals(other.requestParameterSupported) + && requestUriParameterSupported.equals(other.requestUriParameterSupported) + && requireRequestUriRegistration.equals(other.requireRequestUriRegistration) + && responseModesSupported.equals(other.responseModesSupported) + && responseTypesSupported.equals(other.responseTypesSupported) + && scopesSupported.equals(other.scopesSupported) + && serviceDocumentation.equals(other.serviceDocumentation) + && subjectTypesSupported.equals(other.subjectTypesSupported) + && tokenEndpoint.equals(other.tokenEndpoint) + && tokenEndpointAuthMethodsSupported.equals(other.tokenEndpointAuthMethodsSupported) + && tokenEndpointAuthSigningAlgValuesSupported.equals(other.tokenEndpointAuthSigningAlgValuesSupported) + && uiLocalesSupported.equals(other.uiLocalesSupported) + && userinfoEncryptionAlgValuesSupported.equals(other.userinfoEncryptionAlgValuesSupported) + && userinfoEncryptionEncValuesSupported.equals(other.userinfoEncryptionEncValuesSupported) + && userinfoEndpoint.equals(other.userinfoEndpoint) + && userinfoSigningAlgValuesSupported.equals(other.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValuesSupported, + this.authorizationEndpoint, + this.claimTypesSupported, + this.claimsLocalesSupported, + this.claimsParameterSupported, + this.claimsSupported, + this.codeChallengeMethodsSupported, + this.displayValuesSupported, + this.dpopSigningAlgValuesSupported, + this.endSessionEndpoint, + this.grantTypesSupported, + this.idTokenEncryptionAlgValuesSupported, + this.idTokenEncryptionEncValuesSupported, + this.idTokenSigningAlgValuesSupported, + this.issuer, + this.jwksUri, + this.opPolicyUri, + this.opTosUri, + this.registrationEndpoint, + this.requestObjectEncryptionAlgValuesSupported, + this.requestObjectEncryptionEncValuesSupported, + this.requestObjectSigningAlgValuesSupported, + this.requestParameterSupported, + this.requestUriParameterSupported, + this.requireRequestUriRegistration, + this.responseModesSupported, + this.responseTypesSupported, + this.scopesSupported, + this.serviceDocumentation, + this.subjectTypesSupported, + this.tokenEndpoint, + this.tokenEndpointAuthMethodsSupported, + this.tokenEndpointAuthSigningAlgValuesSupported, + this.uiLocalesSupported, + this.userinfoEncryptionAlgValuesSupported, + this.userinfoEncryptionEncValuesSupported, + this.userinfoEndpoint, + this.userinfoSigningAlgValuesSupported); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthorizationEndpointStage builder() { + return new Builder(); + } + + public interface AuthorizationEndpointStage { + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + */ + IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata other); + } + + public interface IssuerStage { + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + */ + JwksUriStage issuer(@NotNull String issuer); + } + + public interface JwksUriStage { + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + */ + _FinalStage jwksUri(@NotNull String jwksUri); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + _FinalStage acrValuesSupported(Optional> acrValuesSupported); + + _FinalStage acrValuesSupported(List acrValuesSupported); + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + _FinalStage claimTypesSupported(Optional> claimTypesSupported); + + _FinalStage claimTypesSupported(List claimTypesSupported); + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); + + _FinalStage claimsLocalesSupported(List claimsLocalesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage claimsParameterSupported(Optional claimsParameterSupported); + + _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + _FinalStage claimsSupported(Optional> claimsSupported); + + _FinalStage claimsSupported(List claimsSupported); + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported); + + _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage displayValuesSupported(Optional> displayValuesSupported); + + _FinalStage displayValuesSupported(List displayValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported); + + _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported); + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + _FinalStage endSessionEndpoint(Optional endSessionEndpoint); + + _FinalStage endSessionEndpoint(String endSessionEndpoint); + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + _FinalStage grantTypesSupported(Optional> grantTypesSupported); + + _FinalStage grantTypesSupported(List grantTypesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); + + _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); + + _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); + + _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opPolicyUri(Optional opPolicyUri); + + _FinalStage opPolicyUri(String opPolicyUri); + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + _FinalStage opTosUri(Optional opTosUri); + + _FinalStage opTosUri(String opTosUri); + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + _FinalStage registrationEndpoint(Optional registrationEndpoint); + + _FinalStage registrationEndpoint(String registrationEndpoint); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported); + + _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported); + + _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported); + + _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestParameterSupported(Optional requestParameterSupported); + + _FinalStage requestParameterSupported(Boolean requestParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); + + _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); + + _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + _FinalStage responseModesSupported(Optional> responseModesSupported); + + _FinalStage responseModesSupported(List responseModesSupported); + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + _FinalStage responseTypesSupported(Optional> responseTypesSupported); + + _FinalStage responseTypesSupported(List responseTypesSupported); + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + _FinalStage scopesSupported(Optional> scopesSupported); + + _FinalStage scopesSupported(List scopesSupported); + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + _FinalStage serviceDocumentation(Optional serviceDocumentation); + + _FinalStage serviceDocumentation(String serviceDocumentation); + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); + + _FinalStage subjectTypesSupported(List subjectTypesSupported); + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + _FinalStage tokenEndpoint(Optional tokenEndpoint); + + _FinalStage tokenEndpoint(String tokenEndpoint); + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); + + _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported); + + _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); + + _FinalStage uiLocalesSupported(List uiLocalesSupported); + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); + + _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); + + _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + _FinalStage userinfoEndpoint(Optional userinfoEndpoint); + + _FinalStage userinfoEndpoint(String userinfoEndpoint); + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported); + + _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthorizationEndpointStage, IssuerStage, JwksUriStage, _FinalStage { + private String authorizationEndpoint; + + private String issuer; + + private String jwksUri; + + private Optional> userinfoSigningAlgValuesSupported = Optional.empty(); + + private Optional userinfoEndpoint = Optional.empty(); + + private Optional> userinfoEncryptionEncValuesSupported = Optional.empty(); + + private Optional> userinfoEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> uiLocalesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthSigningAlgValuesSupported = Optional.empty(); + + private Optional> tokenEndpointAuthMethodsSupported = Optional.empty(); + + private Optional tokenEndpoint = Optional.empty(); + + private Optional> subjectTypesSupported = Optional.empty(); + + private Optional serviceDocumentation = Optional.empty(); + + private Optional> scopesSupported = Optional.empty(); + + private Optional> responseTypesSupported = Optional.empty(); + + private Optional> responseModesSupported = Optional.empty(); + + private Optional requireRequestUriRegistration = Optional.empty(); + + private Optional requestUriParameterSupported = Optional.empty(); + + private Optional requestParameterSupported = Optional.empty(); + + private Optional> requestObjectSigningAlgValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionEncValuesSupported = Optional.empty(); + + private Optional> requestObjectEncryptionAlgValuesSupported = Optional.empty(); + + private Optional registrationEndpoint = Optional.empty(); + + private Optional opTosUri = Optional.empty(); + + private Optional opPolicyUri = Optional.empty(); + + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + private Optional> idTokenEncryptionEncValuesSupported = Optional.empty(); + + private Optional> idTokenEncryptionAlgValuesSupported = Optional.empty(); + + private Optional> grantTypesSupported = Optional.empty(); + + private Optional endSessionEndpoint = Optional.empty(); + + private Optional> dpopSigningAlgValuesSupported = Optional.empty(); + + private Optional> displayValuesSupported = Optional.empty(); + + private Optional> codeChallengeMethodsSupported = Optional.empty(); + + private Optional> claimsSupported = Optional.empty(); + + private Optional claimsParameterSupported = Optional.empty(); + + private Optional> claimsLocalesSupported = Optional.empty(); + + private Optional> claimTypesSupported = Optional.empty(); + + private Optional> acrValuesSupported = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata other) { + acrValuesSupported(other.getAcrValuesSupported()); + authorizationEndpoint(other.getAuthorizationEndpoint()); + claimTypesSupported(other.getClaimTypesSupported()); + claimsLocalesSupported(other.getClaimsLocalesSupported()); + claimsParameterSupported(other.getClaimsParameterSupported()); + claimsSupported(other.getClaimsSupported()); + codeChallengeMethodsSupported(other.getCodeChallengeMethodsSupported()); + displayValuesSupported(other.getDisplayValuesSupported()); + dpopSigningAlgValuesSupported(other.getDpopSigningAlgValuesSupported()); + endSessionEndpoint(other.getEndSessionEndpoint()); + grantTypesSupported(other.getGrantTypesSupported()); + idTokenEncryptionAlgValuesSupported(other.getIdTokenEncryptionAlgValuesSupported()); + idTokenEncryptionEncValuesSupported(other.getIdTokenEncryptionEncValuesSupported()); + idTokenSigningAlgValuesSupported(other.getIdTokenSigningAlgValuesSupported()); + issuer(other.getIssuer()); + jwksUri(other.getJwksUri()); + opPolicyUri(other.getOpPolicyUri()); + opTosUri(other.getOpTosUri()); + registrationEndpoint(other.getRegistrationEndpoint()); + requestObjectEncryptionAlgValuesSupported(other.getRequestObjectEncryptionAlgValuesSupported()); + requestObjectEncryptionEncValuesSupported(other.getRequestObjectEncryptionEncValuesSupported()); + requestObjectSigningAlgValuesSupported(other.getRequestObjectSigningAlgValuesSupported()); + requestParameterSupported(other.getRequestParameterSupported()); + requestUriParameterSupported(other.getRequestUriParameterSupported()); + requireRequestUriRegistration(other.getRequireRequestUriRegistration()); + responseModesSupported(other.getResponseModesSupported()); + responseTypesSupported(other.getResponseTypesSupported()); + scopesSupported(other.getScopesSupported()); + serviceDocumentation(other.getServiceDocumentation()); + subjectTypesSupported(other.getSubjectTypesSupported()); + tokenEndpoint(other.getTokenEndpoint()); + tokenEndpointAuthMethodsSupported(other.getTokenEndpointAuthMethodsSupported()); + tokenEndpointAuthSigningAlgValuesSupported(other.getTokenEndpointAuthSigningAlgValuesSupported()); + uiLocalesSupported(other.getUiLocalesSupported()); + userinfoEncryptionAlgValuesSupported(other.getUserinfoEncryptionAlgValuesSupported()); + userinfoEncryptionEncValuesSupported(other.getUserinfoEncryptionEncValuesSupported()); + userinfoEndpoint(other.getUserinfoEndpoint()); + userinfoSigningAlgValuesSupported(other.getUserinfoSigningAlgValuesSupported()); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 authorization endpoint where users are redirected for authentication. Must be a valid HTTPS URL. This endpoint initiates the OAuth 2.0 authorization code flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("authorization_endpoint") + public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { + this.authorizationEndpoint = + Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); + return this; + } + + /** + *

                                                              The identity provider's unique issuer identifier URL (e.g., https://accounts.google.com). Must match the 'iss' claim in ID tokens from the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("issuer") + public JwksUriStage issuer(@NotNull String issuer) { + this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); + return this; + } + + /** + *

                                                              URL of the identity provider's JSON Web Key Set (JWKS) endpoint containing public keys for signature verification. Auth0 retrieves these keys to validate ID token signatures.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("jwks_uri") + public _FinalStage jwksUri(@NotNull String jwksUri) { + this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. The value none MAY be included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { + this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEndpoint(String userinfoEndpoint) { + this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); + return this; + } + + /** + *

                                                              Optional URL of the identity provider's UserInfo endpoint. When configured with attribute mapping, Auth0 calls this endpoint to retrieve additional user profile claims using the access token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) + public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { + this.userinfoEndpoint = userinfoEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionEncValuesSupported( + Optional> userinfoEncryptionEncValuesSupported) { + this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE [JWE] encryption algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage userinfoEncryptionAlgValuesSupported( + Optional> userinfoEncryptionAlgValuesSupported) { + this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage uiLocalesSupported(List uiLocalesSupported) { + this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) + public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { + this.uiLocalesSupported = uiLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + List tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = + Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( + Optional> tokenEndpointAuthSigningAlgValuesSupported) { + this.tokenEndpointAuthSigningAlgValuesSupported = tokenEndpointAuthSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0 [RFC6749].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) + public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { + this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) + public _FinalStage tokenEndpoint(Optional tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage subjectTypesSupported(List subjectTypesSupported) { + this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); + return this; + } + + /** + *

                                                              A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public

                                                              + */ + @java.lang.Override + @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) + public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { + this.subjectTypesSupported = subjectTypesSupported; + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage serviceDocumentation(String serviceDocumentation) { + this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); + return this; + } + + /** + *

                                                              URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) + public _FinalStage serviceDocumentation(Optional serviceDocumentation) { + this.serviceDocumentation = serviceDocumentation; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scopesSupported(List scopesSupported) { + this.scopesSupported = Optional.ofNullable(scopesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. RECOMMENDED but not REQUIRED

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) + public _FinalStage scopesSupported(Optional> scopesSupported) { + this.scopesSupported = scopesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseTypesSupported(List responseTypesSupported) { + this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) + public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { + this.responseTypesSupported = responseTypesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseModesSupported(List responseModesSupported) { + this.responseModesSupported = Optional.ofNullable(responseModesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) + public _FinalStage responseModesSupported(Optional> responseModesSupported) { + this.responseModesSupported = responseModesSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { + this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP requires use of the request_uri parameter. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) + public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { + this.requireRequestUriRegistration = requireRequestUriRegistration; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { + this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { + this.requestUriParameterSupported = requestUriParameterSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { + this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage requestParameterSupported(Optional requestParameterSupported) { + this.requestParameterSupported = requestParameterSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectSigningAlgValuesSupported( + Optional> requestObjectSigningAlgValuesSupported) { + this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionEncValuesSupported( + List requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = + Optional.ofNullable(requestObjectEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionEncValuesSupported( + Optional> requestObjectEncryptionEncValuesSupported) { + this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage requestObjectEncryptionAlgValuesSupported( + List requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = + Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage requestObjectEncryptionAlgValuesSupported( + Optional> requestObjectEncryptionAlgValuesSupported) { + this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage registrationEndpoint(String registrationEndpoint) { + this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); + return this; + } + + /** + *

                                                              URL of the OPs Dynamic Client Registration Endpoint. RECOMMENDED but not REQUIRED. https://openid.net/specs/openid-connect-discovery-1_0.html#OpenID.Registration

                                                              + */ + @java.lang.Override + @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) + public _FinalStage registrationEndpoint(Optional registrationEndpoint) { + this.registrationEndpoint = registrationEndpoint; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opTosUri(String opTosUri) { + this.opTosUri = Optional.ofNullable(opTosUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about OpenID Providers terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) + public _FinalStage opTosUri(Optional opTosUri) { + this.opTosUri = opTosUri; + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage opPolicyUri(String opPolicyUri) { + this.opPolicyUri = Optional.ofNullable(opPolicyUri); + return this; + } + + /** + *

                                                              URL that the OpenID Provider provides to the person registering the Client to read about the OPs requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) + public _FinalStage opPolicyUri(Optional opPolicyUri) { + this.opPolicyUri = opPolicyUri; + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              A list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). https://datatracker.ietf.org/doc/html/rfc7518

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { + this.idTokenSigningAlgValuesSupported.clear(); + if (idTokenSigningAlgValuesSupported != null) { + this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); + } + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionEncValuesSupported( + Optional> idTokenEncryptionEncValuesSupported) { + this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT

                                                              + */ + @java.lang.Override + @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage idTokenEncryptionAlgValuesSupported( + Optional> idTokenEncryptionAlgValuesSupported) { + this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage grantTypesSupported(List grantTypesSupported) { + this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); + return this; + } + + /** + *

                                                              A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

                                                              + */ + @java.lang.Override + @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) + public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { + this.grantTypesSupported = grantTypesSupported; + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage endSessionEndpoint(String endSessionEndpoint) { + this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); + return this; + } + + /** + *

                                                              URL of the identity provider's logout/end session endpoint. When configured as a static URL, users are redirected here after logging out from Auth0. Must use HTTPS scheme.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) + public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { + this.endSessionEndpoint = endSessionEndpoint; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage dpopSigningAlgValuesSupported(List dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = Optional.ofNullable(dpopSigningAlgValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported for DPoP proof JWT signing.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "dpop_signing_alg_values_supported", nulls = Nulls.SKIP) + public _FinalStage dpopSigningAlgValuesSupported(Optional> dpopSigningAlgValuesSupported) { + this.dpopSigningAlgValuesSupported = dpopSigningAlgValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayValuesSupported(List displayValuesSupported) { + this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) + public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { + this.displayValuesSupported = displayValuesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = Optional.ofNullable(codeChallengeMethodsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of Proof Key for Code Exchange (PKCE) code challenge methods supported by this OP (e.g., S256, plain), as defined in RFC 7636.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "code_challenge_methods_supported", nulls = Nulls.SKIP) + public _FinalStage codeChallengeMethodsSupported(Optional> codeChallengeMethodsSupported) { + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsSupported(List claimsSupported) { + this.claimsSupported = Optional.ofNullable(claimsSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) + public _FinalStage claimsSupported(Optional> claimsSupported) { + this.claimsSupported = claimsSupported; + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { + this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); + return this; + } + + /** + *

                                                              Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) + public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { + this.claimsParameterSupported = claimsParameterSupported; + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { + this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); + return this; + } + + /** + *

                                                              Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily supported for all Claim values.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) + public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { + this.claimsLocalesSupported = claimsLocalesSupported; + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage claimTypesSupported(List claimTypesSupported) { + this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); + return this; + } + + /** + *

                                                              JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) + public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { + this.claimTypesSupported = claimTypesSupported; + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage acrValuesSupported(List acrValuesSupported) { + this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); + return this; + } + + /** + *

                                                              A list of the Authentication Context Class References that this OP supports

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values_supported", nulls = Nulls.SKIP) + public _FinalStage acrValuesSupported(Optional> acrValuesSupported) { + this.acrValuesSupported = acrValuesSupported; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsOidcMetadata( + acrValuesSupported, + authorizationEndpoint, + claimTypesSupported, + claimsLocalesSupported, + claimsParameterSupported, + claimsSupported, + codeChallengeMethodsSupported, + displayValuesSupported, + dpopSigningAlgValuesSupported, + endSessionEndpoint, + grantTypesSupported, + idTokenEncryptionAlgValuesSupported, + idTokenEncryptionEncValuesSupported, + idTokenSigningAlgValuesSupported, + issuer, + jwksUri, + opPolicyUri, + opTosUri, + registrationEndpoint, + requestObjectEncryptionAlgValuesSupported, + requestObjectEncryptionEncValuesSupported, + requestObjectSigningAlgValuesSupported, + requestParameterSupported, + requestUriParameterSupported, + requireRequestUriRegistration, + responseModesSupported, + responseTypesSupported, + scopesSupported, + serviceDocumentation, + subjectTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported, + tokenEndpointAuthSigningAlgValuesSupported, + uiLocalesSupported, + userinfoEncryptionAlgValuesSupported, + userinfoEncryptionEncValuesSupported, + userinfoEndpoint, + userinfoSigningAlgValuesSupported, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..5824b1c5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum valueOf( + String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..86920ac3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..9fc3b458 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum valueOf( + String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject.java new file mode 100644 index 00000000..6f667229 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject.java @@ -0,0 +1,70 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject( + Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject2OptionsSubject(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/EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum.java new file mode 100644 index 00000000..75478126 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum SAMLP = + new EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum(Value.SAMLP, "samlp"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SAMLP: + return visitor.visitSamlp(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum valueOf(String value) { + switch (value) { + case "samlp": + return SAMLP; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject2StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SAMLP, + + UNKNOWN + } + + public interface Visitor { + T visitSamlp(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3.java new file mode 100644 index 00000000..af5f8b2f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject3.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject3) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject3 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject3 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject3Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject3Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject3 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication.java new file mode 100644 index 00000000..54ed47a1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts.java new file mode 100644 index 00000000..0ecf5994 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata.java new file mode 100644 index 00000000..09fbaa09 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject3Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3Options.java new file mode 100644 index 00000000..1052064a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3Options.java @@ -0,0 +1,993 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionUpdatedPreviousObject3Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3Options { + private final Optional + assertionDecryptionSettings; + + private final Optional cert; + + private final Optional certRolloverNotification; + + private final Optional + digestAlgorithm; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional expires; + + private final Optional iconUrl; + + private final Optional idpinitiated; + + private final Optional> nonPersistentAttrs; + + private final Optional + protocolBinding; + + private final Optional + setUserRootAttributes; + + private final Optional + signatureAlgorithm; + + private final Optional signInEndpoint; + + private final Optional signingCert; + + private final Optional signSamlRequest; + + private final Optional subject; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final String pingFederateBaseUrl; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3Options( + Optional + assertionDecryptionSettings, + Optional cert, + Optional certRolloverNotification, + Optional digestAlgorithm, + Optional> domainAliases, + Optional entityId, + Optional expires, + Optional iconUrl, + Optional idpinitiated, + Optional> nonPersistentAttrs, + Optional protocolBinding, + Optional + setUserRootAttributes, + Optional + signatureAlgorithm, + Optional signInEndpoint, + Optional signingCert, + Optional signSamlRequest, + Optional subject, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + String pingFederateBaseUrl, + Map additionalProperties) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + this.cert = cert; + this.certRolloverNotification = certRolloverNotification; + this.digestAlgorithm = digestAlgorithm; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.expires = expires; + this.iconUrl = iconUrl; + this.idpinitiated = idpinitiated; + this.nonPersistentAttrs = nonPersistentAttrs; + this.protocolBinding = protocolBinding; + this.setUserRootAttributes = setUserRootAttributes; + this.signatureAlgorithm = signatureAlgorithm; + this.signInEndpoint = signInEndpoint; + this.signingCert = signingCert; + this.signSamlRequest = signSamlRequest; + this.subject = subject; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.pingFederateBaseUrl = pingFederateBaseUrl; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("assertion_decryption_settings") + public Optional + getAssertionDecryptionSettings() { + return assertionDecryptionSettings; + } + + /** + * @return X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. + */ + @JsonProperty("cert") + public Optional getCert() { + return cert; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + @JsonProperty("digestAlgorithm") + public Optional + getDigestAlgorithm() { + return digestAlgorithm; + } + + /** + * @return Domain aliases for the connection + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires. + */ + @JsonProperty("expires") + public Optional getExpires() { + return expires; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("idpinitiated") + public Optional getIdpinitiated() { + return idpinitiated; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("protocolBinding") + public Optional + getProtocolBinding() { + return protocolBinding; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("signatureAlgorithm") + public Optional + getSignatureAlgorithm() { + return signatureAlgorithm; + } + + /** + * @return Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. + */ + @JsonProperty("signingCert") + public Optional getSigningCert() { + return signingCert; + } + + /** + * @return When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). + */ + @JsonProperty("signSAMLRequest") + public Optional getSignSamlRequest() { + return signSamlRequest; + } + + @JsonProperty("subject") + public Optional getSubject() { + return subject; + } + + /** + * @return For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return URL provided by PingFederate which returns information used for creating the connection + */ + @JsonProperty("pingFederateBaseUrl") + public String getPingFederateBaseUrl() { + return pingFederateBaseUrl; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject3Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject3Options other) { + return assertionDecryptionSettings.equals(other.assertionDecryptionSettings) + && cert.equals(other.cert) + && certRolloverNotification.equals(other.certRolloverNotification) + && digestAlgorithm.equals(other.digestAlgorithm) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && expires.equals(other.expires) + && iconUrl.equals(other.iconUrl) + && idpinitiated.equals(other.idpinitiated) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && protocolBinding.equals(other.protocolBinding) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signatureAlgorithm.equals(other.signatureAlgorithm) + && signInEndpoint.equals(other.signInEndpoint) + && signingCert.equals(other.signingCert) + && signSamlRequest.equals(other.signSamlRequest) + && subject.equals(other.subject) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && pingFederateBaseUrl.equals(other.pingFederateBaseUrl); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.assertionDecryptionSettings, + this.cert, + this.certRolloverNotification, + this.digestAlgorithm, + this.domainAliases, + this.entityId, + this.expires, + this.iconUrl, + this.idpinitiated, + this.nonPersistentAttrs, + this.protocolBinding, + this.setUserRootAttributes, + this.signatureAlgorithm, + this.signInEndpoint, + this.signingCert, + this.signSamlRequest, + this.subject, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.pingFederateBaseUrl); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static PingFederateBaseUrlStage builder() { + return new Builder(); + } + + public interface PingFederateBaseUrlStage { + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + */ + _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject3Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings); + + _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings); + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + _FinalStage cert(Optional cert); + + _FinalStage cert(String cert); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + _FinalStage digestAlgorithm( + Optional + digestAlgorithm); + + _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum digestAlgorithm); + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + _FinalStage entityId(Optional entityId); + + _FinalStage entityId(String entityId); + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + _FinalStage expires(Optional expires); + + _FinalStage expires(OffsetDateTime expires); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage idpinitiated( + Optional idpinitiated); + + _FinalStage idpinitiated(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated idpinitiated); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + _FinalStage protocolBinding( + Optional + protocolBinding); + + _FinalStage protocolBinding( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum protocolBinding); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm); + + _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum signatureAlgorithm); + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + _FinalStage signInEndpoint(Optional signInEndpoint); + + _FinalStage signInEndpoint(String signInEndpoint); + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + _FinalStage signingCert(Optional signingCert); + + _FinalStage signingCert(String signingCert); + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + _FinalStage signSamlRequest(Optional signSamlRequest); + + _FinalStage signSamlRequest(Boolean signSamlRequest); + + _FinalStage subject(Optional subject); + + _FinalStage subject(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject subject); + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { + private String pingFederateBaseUrl; + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional subject = + Optional.empty(); + + private Optional signSamlRequest = Optional.empty(); + + private Optional signingCert = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional + signatureAlgorithm = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional + protocolBinding = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional idpinitiated = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional expires = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional + digestAlgorithm = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional cert = Optional.empty(); + + private Optional + assertionDecryptionSettings = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3Options other) { + assertionDecryptionSettings(other.getAssertionDecryptionSettings()); + cert(other.getCert()); + certRolloverNotification(other.getCertRolloverNotification()); + digestAlgorithm(other.getDigestAlgorithm()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + expires(other.getExpires()); + iconUrl(other.getIconUrl()); + idpinitiated(other.getIdpinitiated()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + protocolBinding(other.getProtocolBinding()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signatureAlgorithm(other.getSignatureAlgorithm()); + signInEndpoint(other.getSignInEndpoint()); + signingCert(other.getSigningCert()); + signSamlRequest(other.getSignSamlRequest()); + subject(other.getSubject()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + pingFederateBaseUrl(other.getPingFederateBaseUrl()); + return this; + } + + /** + *

                                                              URL provided by PingFederate which returns information used for creating the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("pingFederateBaseUrl") + public _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl) { + this.pingFederateBaseUrl = + Objects.requireNonNull(pingFederateBaseUrl, "pingFederateBaseUrl must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              For SAML connections, the tenant domain used to construct the login endpoint URL. Can be a string for single-tenant or an array of strings for multi-tenant validation.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage subject(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject subject) { + this.subject = Optional.ofNullable(subject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "subject", nulls = Nulls.SKIP) + public _FinalStage subject( + Optional subject) { + this.subject = subject; + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signSamlRequest(Boolean signSamlRequest) { + this.signSamlRequest = Optional.ofNullable(signSamlRequest); + return this; + } + + /** + *

                                                              When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) + public _FinalStage signSamlRequest(Optional signSamlRequest) { + this.signSamlRequest = signSamlRequest; + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signingCert(String signingCert) { + this.signingCert = Optional.ofNullable(signingCert); + return this; + } + + /** + *

                                                              Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) + public _FinalStage signingCert(Optional signingCert) { + this.signingCert = signingCert; + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public _FinalStage signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + @java.lang.Override + public _FinalStage signatureAlgorithm( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum signatureAlgorithm) { + this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) + public _FinalStage signatureAlgorithm( + Optional + signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + @java.lang.Override + public _FinalStage protocolBinding( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum protocolBinding) { + this.protocolBinding = Optional.ofNullable(protocolBinding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) + public _FinalStage protocolBinding( + Optional + protocolBinding) { + this.protocolBinding = protocolBinding; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + @java.lang.Override + public _FinalStage idpinitiated( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated idpinitiated) { + this.idpinitiated = Optional.ofNullable(idpinitiated); + return this; + } + + @java.lang.Override + @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) + public _FinalStage idpinitiated( + Optional idpinitiated) { + this.idpinitiated = idpinitiated; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage expires(OffsetDateTime expires) { + this.expires = Optional.ofNullable(expires); + return this; + } + + /** + *

                                                              ISO 8601 formatted datetime indicating when the identity provider's signing certificate expires.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "expires", nulls = Nulls.SKIP) + public _FinalStage expires(Optional expires) { + this.expires = expires; + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the SAML Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. This value is included in SAML AuthnRequest messages sent to the identity provider.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public _FinalStage entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Domain aliases for the connection

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + @java.lang.Override + public _FinalStage digestAlgorithm( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum digestAlgorithm) { + this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); + return this; + } + + @java.lang.Override + @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) + public _FinalStage digestAlgorithm( + Optional + digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage cert(String cert) { + this.cert = Optional.ofNullable(cert); + return this; + } + + /** + *

                                                              X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert", nulls = Nulls.SKIP) + public _FinalStage cert(Optional cert) { + this.cert = cert; + return this; + } + + @java.lang.Override + public _FinalStage assertionDecryptionSettings( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings + assertionDecryptionSettings) { + this.assertionDecryptionSettings = Optional.ofNullable(assertionDecryptionSettings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "assertion_decryption_settings", nulls = Nulls.SKIP) + public _FinalStage assertionDecryptionSettings( + Optional + assertionDecryptionSettings) { + this.assertionDecryptionSettings = assertionDecryptionSettings; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject3Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3Options( + assertionDecryptionSettings, + cert, + certRolloverNotification, + digestAlgorithm, + domainAliases, + entityId, + expires, + iconUrl, + idpinitiated, + nonPersistentAttrs, + protocolBinding, + setUserRootAttributes, + signatureAlgorithm, + signInEndpoint, + signingCert, + signSamlRequest, + subject, + tenantDomain, + thumbprints, + upstreamParams, + pingFederateBaseUrl, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings.java new file mode 100644 index 00000000..40fed541 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings.java @@ -0,0 +1,183 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings { + private final Optional> algorithmExceptions; + + private final + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings( + Optional> algorithmExceptions, + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile, + Map additionalProperties) { + this.algorithmExceptions = algorithmExceptions; + this.algorithmProfile = algorithmProfile; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of insecure algorithms to allow for SAML assertion decryption. + */ + @JsonProperty("algorithm_exceptions") + public Optional> getAlgorithmExceptions() { + return algorithmExceptions; + } + + @JsonProperty("algorithm_profile") + public EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + getAlgorithmProfile() { + return algorithmProfile; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings other) { + return algorithmExceptions.equals(other.algorithmExceptions) && algorithmProfile.equals(other.algorithmProfile); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.algorithmExceptions, this.algorithmProfile); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AlgorithmProfileStage builder() { + return new Builder(); + } + + public interface AlgorithmProfileStage { + _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + _FinalStage algorithmExceptions(Optional> algorithmExceptions); + + _FinalStage algorithmExceptions(List algorithmExceptions); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AlgorithmProfileStage, _FinalStage { + private + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile; + + private Optional> algorithmExceptions = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings other) { + algorithmExceptions(other.getAlgorithmExceptions()); + algorithmProfile(other.getAlgorithmProfile()); + return this; + } + + @java.lang.Override + @JsonSetter("algorithm_profile") + public _FinalStage algorithmProfile( + @NotNull + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + algorithmProfile) { + this.algorithmProfile = Objects.requireNonNull(algorithmProfile, "algorithmProfile must not be null"); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage algorithmExceptions(List algorithmExceptions) { + this.algorithmExceptions = Optional.ofNullable(algorithmExceptions); + return this; + } + + /** + *

                                                              A list of insecure algorithms to allow for SAML assertion decryption.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "algorithm_exceptions", nulls = Nulls.SKIP) + public _FinalStage algorithmExceptions(Optional> algorithmExceptions) { + this.algorithmExceptions = algorithmExceptions; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettings( + algorithmExceptions, algorithmProfile, 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/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.java new file mode 100644 index 00000000..3a370bf5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum.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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum { + public static final + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum V20261 = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.V20261, "v2026-1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case V20261: + return visitor.visitV20261(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum valueOf( + String value) { + switch (value) { + case "v2026-1": + return V20261; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsAssertionDecryptionSettingsAlgorithmProfileEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + V20261, + + UNKNOWN + } + + public interface Visitor { + T visitV20261(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum.java new file mode 100644 index 00000000..6cf1dbce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum SHA256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum(Value.SHA256, "sha256"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum SHA1 = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum(Value.SHA1, "sha1"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SHA256: + return visitor.visitSha256(); + case SHA1: + return visitor.visitSha1(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum valueOf( + String value) { + switch (value) { + case "sha256": + return SHA256; + case "sha1": + return SHA1; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsDigestAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + SHA1, + + SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitSha1(); + + T visitSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated.java new file mode 100644 index 00000000..23dcf620 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated.java @@ -0,0 +1,207 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated { + private final Optional clientAuthorizequery; + + private final Optional clientId; + + private final Optional + clientProtocol; + + private final Optional enabled; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated( + Optional clientAuthorizequery, + Optional clientId, + Optional + clientProtocol, + Optional enabled, + Map additionalProperties) { + this.clientAuthorizequery = clientAuthorizequery; + this.clientId = clientId; + this.clientProtocol = clientProtocol; + this.enabled = enabled; + this.additionalProperties = additionalProperties; + } + + /** + * @return The query string sent to the default application + */ + @JsonProperty("client_authorizequery") + public Optional getClientAuthorizequery() { + return clientAuthorizequery; + } + + /** + * @return The client ID to use for IdP-initiated login requests. + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("client_protocol") + public Optional + getClientProtocol() { + return clientProtocol; + } + + /** + * @return When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. + */ + @JsonProperty("enabled") + public Optional getEnabled() { + return enabled; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated other) { + return clientAuthorizequery.equals(other.clientAuthorizequery) + && clientId.equals(other.clientId) + && clientProtocol.equals(other.clientProtocol) + && enabled.equals(other.enabled); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientAuthorizequery, this.clientId, this.clientProtocol, this.enabled); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientAuthorizequery = Optional.empty(); + + private Optional clientId = Optional.empty(); + + private Optional + clientProtocol = Optional.empty(); + + private Optional enabled = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated other) { + clientAuthorizequery(other.getClientAuthorizequery()); + clientId(other.getClientId()); + clientProtocol(other.getClientProtocol()); + enabled(other.getEnabled()); + return this; + } + + /** + *

                                                              The query string sent to the default application

                                                              + */ + @JsonSetter(value = "client_authorizequery", nulls = Nulls.SKIP) + public Builder clientAuthorizequery(Optional clientAuthorizequery) { + this.clientAuthorizequery = clientAuthorizequery; + return this; + } + + public Builder clientAuthorizequery(String clientAuthorizequery) { + this.clientAuthorizequery = Optional.ofNullable(clientAuthorizequery); + return this; + } + + /** + *

                                                              The client ID to use for IdP-initiated login requests.

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "client_protocol", nulls = Nulls.SKIP) + public Builder clientProtocol( + Optional + clientProtocol) { + this.clientProtocol = clientProtocol; + return this; + } + + public Builder clientProtocol( + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + clientProtocol) { + this.clientProtocol = Optional.ofNullable(clientProtocol); + return this; + } + + /** + *

                                                              When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.

                                                              + */ + @JsonSetter(value = "enabled", nulls = Nulls.SKIP) + public Builder enabled(Optional enabled) { + this.enabled = enabled; + return this; + } + + public Builder enabled(Boolean enabled) { + this.enabled = Optional.ofNullable(enabled); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiated( + clientAuthorizequery, clientId, clientProtocol, enabled, 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/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java new file mode 100644 index 00000000..9f4280ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum.java @@ -0,0 +1,108 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + WSFED = new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + SAMLP = new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + OIDC = new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.OIDC, "oidc"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WSFED: + return visitor.visitWsfed(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC: + return visitor.visitOidc(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum valueOf( + String value) { + switch (value) { + case "wsfed": + return WSFED; + case "samlp": + return SAMLP; + case "oidc": + return OIDC; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsIdpinitiatedClientProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC, + + SAMLP, + + WSFED, + + UNKNOWN + } + + public interface Visitor { + T visitOidc(); + + T visitSamlp(); + + T visitWsfed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum.java new file mode 100644 index 00000000..f197ab8a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum( + Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + case URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST: + return visitor.visitUrnOasisNamesTcSaml20BindingsHttpPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum valueOf( + String value) { + switch (value) { + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT; + case "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST": + return URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsProtocolBindingEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST, + + URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, + + UNKNOWN + } + + public interface Visitor { + T visitUrnOasisNamesTcSaml20BindingsHttpPost(); + + T visitUrnOasisNamesTcSaml20BindingsHttpRedirect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..7ae74031 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum.java new file mode 100644 index 00000000..1e962e3b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum RSA_SHA1 = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA1, "rsa-sha1"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum RSA_SHA256 = + new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.RSA_SHA256, "rsa-sha256"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case RSA_SHA1: + return visitor.visitRsaSha1(); + case RSA_SHA256: + return visitor.visitRsaSha256(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum valueOf( + String value) { + switch (value) { + case "rsa-sha1": + return RSA_SHA1; + case "rsa-sha256": + return RSA_SHA256; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSignatureAlgorithmEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + RSA_SHA1, + + RSA_SHA256, + + UNKNOWN + } + + public interface Visitor { + T visitRsaSha1(); + + T visitRsaSha256(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject.java new file mode 100644 index 00000000..5d6004af --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject.java @@ -0,0 +1,70 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject( + Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject3OptionsSubject(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/EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum.java new file mode 100644 index 00000000..6ce42cdc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum PINGFEDERATE = + new EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum(Value.PINGFEDERATE, "pingfederate"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case PINGFEDERATE: + return visitor.visitPingfederate(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum valueOf(String value) { + switch (value) { + case "pingfederate": + return PINGFEDERATE; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject3StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + PINGFEDERATE, + + UNKNOWN + } + + public interface Visitor { + T visitPingfederate(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4.java new file mode 100644 index 00000000..56c66dd2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject4.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject4 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject4( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject4 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject4) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject4 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject4 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject4Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject4Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject4 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject4( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication.java new file mode 100644 index 00000000..ee745a3f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject4Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts.java new file mode 100644 index 00000000..86bf12d7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject4ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata.java new file mode 100644 index 00000000..713194f4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject4Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject4Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4Options.java new file mode 100644 index 00000000..40da58d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4Options.java @@ -0,0 +1,568 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject4Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject4Options { + private final Optional adfsServer; + + private final Optional certRolloverNotification; + + private final Optional> domainAliases; + + private final Optional entityId; + + private final Optional fedMetadataXml; + + private final Optional iconUrl; + + private final Optional> nonPersistentAttrs; + + private final Optional> prevThumbprints; + + private final Optional + setUserRootAttributes; + + private final Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional userIdAttribute; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject4Options( + Optional adfsServer, + Optional certRolloverNotification, + Optional> domainAliases, + Optional entityId, + Optional fedMetadataXml, + Optional iconUrl, + Optional> nonPersistentAttrs, + Optional> prevThumbprints, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Optional userIdAttribute, + Map additionalProperties) { + this.adfsServer = adfsServer; + this.certRolloverNotification = certRolloverNotification; + this.domainAliases = domainAliases; + this.entityId = entityId; + this.fedMetadataXml = fedMetadataXml; + this.iconUrl = iconUrl; + this.nonPersistentAttrs = nonPersistentAttrs; + this.prevThumbprints = prevThumbprints; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.userIdAttribute = userIdAttribute; + this.additionalProperties = additionalProperties; + } + + /** + * @return ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. + */ + @JsonProperty("adfs_server") + public Optional getAdfsServer() { + return adfsServer; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. + */ + @JsonProperty("entityId") + public Optional getEntityId() { + return entityId; + } + + /** + * @return Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. + */ + @JsonProperty("fedMetadataXml") + public Optional getFedMetadataXml() { + return fedMetadataXml; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("prev_thumbprints") + public Optional> getPrevThumbprints() { + return prevThumbprints; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + /** + * @return Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Tenant domain + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). + */ + @JsonProperty("user_id_attribute") + public Optional getUserIdAttribute() { + return userIdAttribute; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject4Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject4Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject4Options other) { + return adfsServer.equals(other.adfsServer) + && certRolloverNotification.equals(other.certRolloverNotification) + && domainAliases.equals(other.domainAliases) + && entityId.equals(other.entityId) + && fedMetadataXml.equals(other.fedMetadataXml) + && iconUrl.equals(other.iconUrl) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && prevThumbprints.equals(other.prevThumbprints) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && userIdAttribute.equals(other.userIdAttribute); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adfsServer, + this.certRolloverNotification, + this.domainAliases, + this.entityId, + this.fedMetadataXml, + this.iconUrl, + this.nonPersistentAttrs, + this.prevThumbprints, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams, + this.userIdAttribute); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional adfsServer = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional entityId = Optional.empty(); + + private Optional fedMetadataXml = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional> prevThumbprints = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional userIdAttribute = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject4Options other) { + adfsServer(other.getAdfsServer()); + certRolloverNotification(other.getCertRolloverNotification()); + domainAliases(other.getDomainAliases()); + entityId(other.getEntityId()); + fedMetadataXml(other.getFedMetadataXml()); + iconUrl(other.getIconUrl()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + prevThumbprints(other.getPrevThumbprints()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + userIdAttribute(other.getUserIdAttribute()); + return this; + } + + /** + *

                                                              ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent.

                                                              + */ + @JsonSetter(value = "adfs_server", nulls = Nulls.SKIP) + public Builder adfsServer(Optional adfsServer) { + this.adfsServer = adfsServer; + return this; + } + + public Builder adfsServer(String adfsServer) { + this.adfsServer = Optional.ofNullable(adfsServer); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public Builder certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + public Builder certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'.

                                                              + */ + @JsonSetter(value = "entityId", nulls = Nulls.SKIP) + public Builder entityId(Optional entityId) { + this.entityId = entityId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = Optional.ofNullable(entityId); + return this; + } + + /** + *

                                                              Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'.

                                                              + */ + @JsonSetter(value = "fedMetadataXml", nulls = Nulls.SKIP) + public Builder fedMetadataXml(Optional fedMetadataXml) { + this.fedMetadataXml = fedMetadataXml; + return this; + } + + public Builder fedMetadataXml(String fedMetadataXml) { + this.fedMetadataXml = Optional.ofNullable(fedMetadataXml); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "prev_thumbprints", nulls = Nulls.SKIP) + public Builder prevThumbprints(Optional> prevThumbprints) { + this.prevThumbprints = prevThumbprints; + return this; + } + + public Builder prevThumbprints(List prevThumbprints) { + this.prevThumbprints = Optional.ofNullable(prevThumbprints); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public Builder shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + public Builder shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + /** + *

                                                              Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly.

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Tenant domain

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + /** + *

                                                              Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name).

                                                              + */ + @JsonSetter(value = "user_id_attribute", nulls = Nulls.SKIP) + public Builder userIdAttribute(Optional userIdAttribute) { + this.userIdAttribute = userIdAttribute; + return this; + } + + public Builder userIdAttribute(String userIdAttribute) { + this.userIdAttribute = Optional.ofNullable(userIdAttribute); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject4Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject4Options( + adfsServer, + certRolloverNotification, + domainAliases, + entityId, + fedMetadataXml, + iconUrl, + nonPersistentAttrs, + prevThumbprints, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + userIdAttribute, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..6ec8c5bb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..1fbfc8e0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,100 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum + valueOf(String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject4OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum.java new file mode 100644 index 00000000..ab58acb5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum ADFS = + new EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum(Value.ADFS, "adfs"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ADFS: + return visitor.visitAdfs(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum valueOf(String value) { + switch (value) { + case "adfs": + return ADFS; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject4StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ADFS, + + UNKNOWN + } + + public interface Visitor { + T visitAdfs(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5.java new file mode 100644 index 00000000..87391703 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5.java @@ -0,0 +1,517 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject5.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject5 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject5( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject5 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject5) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject5 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject5 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject5Options options); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum strategy; + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject5Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject5 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject5( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication.java new file mode 100644 index 00000000..b3ed5888 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject5Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts.java new file mode 100644 index 00000000..f113dbfc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject5ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata.java new file mode 100644 index 00000000..8ae0d47e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject5Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject5Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5Options.java new file mode 100644 index 00000000..12c169c1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5Options.java @@ -0,0 +1,690 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject5Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject5Options { + private final Optional agentIp; + + private final Optional agentMode; + + private final Optional agentVersion; + + private final Optional bruteForceProtection; + + private final Optional certAuth; + + private final Optional> certs; + + private final Optional disableCache; + + private final Optional disableSelfServiceChangePassword; + + private final Optional> domainAliases; + + private final Optional iconUrl; + + private final Optional> ips; + + private final Optional kerberos; + + private final Optional kerberosOnly; + + private final Optional> nonPersistentAttrs; + + private final Optional + setUserRootAttributes; + + private final Optional signInEndpoint; + + private final Optional tenantDomain; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject5Options( + Optional agentIp, + Optional agentMode, + Optional agentVersion, + Optional bruteForceProtection, + Optional certAuth, + Optional> certs, + Optional disableCache, + Optional disableSelfServiceChangePassword, + Optional> domainAliases, + Optional iconUrl, + Optional> ips, + Optional kerberos, + Optional kerberosOnly, + Optional> nonPersistentAttrs, + Optional + setUserRootAttributes, + Optional signInEndpoint, + Optional tenantDomain, + Optional> thumbprints, + Optional> upstreamParams, + Map additionalProperties) { + this.agentIp = agentIp; + this.agentMode = agentMode; + this.agentVersion = agentVersion; + this.bruteForceProtection = bruteForceProtection; + this.certAuth = certAuth; + this.certs = certs; + this.disableCache = disableCache; + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + this.domainAliases = domainAliases; + this.iconUrl = iconUrl; + this.ips = ips; + this.kerberos = kerberos; + this.kerberosOnly = kerberosOnly; + this.nonPersistentAttrs = nonPersistentAttrs; + this.setUserRootAttributes = setUserRootAttributes; + this.signInEndpoint = signInEndpoint; + this.tenantDomain = tenantDomain; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ + @JsonProperty("agentIP") + public Optional getAgentIp() { + return agentIp; + } + + /** + * @return When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ + @JsonProperty("agentMode") + public Optional getAgentMode() { + return agentMode; + } + + /** + * @return Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ + @JsonProperty("agentVersion") + public Optional getAgentVersion() { + return agentVersion; + } + + /** + * @return Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. + */ + @JsonProperty("brute_force_protection") + public Optional getBruteForceProtection() { + return bruteForceProtection; + } + + /** + * @return Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint + */ + @JsonProperty("certAuth") + public Optional getCertAuth() { + return certAuth; + } + + /** + * @return Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ + @JsonProperty("certs") + public Optional> getCerts() { + return certs; + } + + /** + * @return When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory + */ + @JsonProperty("disable_cache") + public Optional getDisableCache() { + return disableCache; + } + + /** + * @return When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets + */ + @JsonProperty("disable_self_service_change_password") + public Optional getDisableSelfServiceChangePassword() { + return disableSelfServiceChangePassword; + } + + /** + * @return List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return https url of the icon to be shown + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ + @JsonProperty("ips") + public Optional> getIps() { + return ips; + } + + /** + * @return Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges + */ + @JsonProperty("kerberos") + public Optional getKerberos() { + return kerberos; + } + + /** + * @return When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback. + */ + @JsonProperty("kerberos_only") + public Optional getKerberosOnly() { + return kerberosOnly; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ + @JsonProperty("signInEndpoint") + public Optional getSignInEndpoint() { + return signInEndpoint; + } + + /** + * @return Primary AD domain hint used for HRD and discovery. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject5Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject5Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject5Options other) { + return agentIp.equals(other.agentIp) + && agentMode.equals(other.agentMode) + && agentVersion.equals(other.agentVersion) + && bruteForceProtection.equals(other.bruteForceProtection) + && certAuth.equals(other.certAuth) + && certs.equals(other.certs) + && disableCache.equals(other.disableCache) + && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) + && domainAliases.equals(other.domainAliases) + && iconUrl.equals(other.iconUrl) + && ips.equals(other.ips) + && kerberos.equals(other.kerberos) + && kerberosOnly.equals(other.kerberosOnly) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && signInEndpoint.equals(other.signInEndpoint) + && tenantDomain.equals(other.tenantDomain) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.agentIp, + this.agentMode, + this.agentVersion, + this.bruteForceProtection, + this.certAuth, + this.certs, + this.disableCache, + this.disableSelfServiceChangePassword, + this.domainAliases, + this.iconUrl, + this.ips, + this.kerberos, + this.kerberosOnly, + this.nonPersistentAttrs, + this.setUserRootAttributes, + this.signInEndpoint, + this.tenantDomain, + this.thumbprints, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional agentIp = Optional.empty(); + + private Optional agentMode = Optional.empty(); + + private Optional agentVersion = Optional.empty(); + + private Optional bruteForceProtection = Optional.empty(); + + private Optional certAuth = Optional.empty(); + + private Optional> certs = Optional.empty(); + + private Optional disableCache = Optional.empty(); + + private Optional disableSelfServiceChangePassword = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional> ips = Optional.empty(); + + private Optional kerberos = Optional.empty(); + + private Optional kerberosOnly = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional signInEndpoint = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject5Options other) { + agentIp(other.getAgentIp()); + agentMode(other.getAgentMode()); + agentVersion(other.getAgentVersion()); + bruteForceProtection(other.getBruteForceProtection()); + certAuth(other.getCertAuth()); + certs(other.getCerts()); + disableCache(other.getDisableCache()); + disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); + domainAliases(other.getDomainAliases()); + iconUrl(other.getIconUrl()); + ips(other.getIps()); + kerberos(other.getKerberos()); + kerberosOnly(other.getKerberosOnly()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + setUserRootAttributes(other.getSetUserRootAttributes()); + signInEndpoint(other.getSignInEndpoint()); + tenantDomain(other.getTenantDomain()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentIP", nulls = Nulls.SKIP) + public Builder agentIp(Optional agentIp) { + this.agentIp = agentIp; + return this; + } + + public Builder agentIp(String agentIp) { + this.agentIp = Optional.ofNullable(agentIp); + return this; + } + + /** + *

                                                              When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentMode", nulls = Nulls.SKIP) + public Builder agentMode(Optional agentMode) { + this.agentMode = agentMode; + return this; + } + + public Builder agentMode(Boolean agentMode) { + this.agentMode = Optional.ofNullable(agentMode); + return this; + } + + /** + *

                                                              Version identifier of the installed AD connector agent software (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "agentVersion", nulls = Nulls.SKIP) + public Builder agentVersion(Optional agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + public Builder agentVersion(String agentVersion) { + this.agentVersion = Optional.ofNullable(agentVersion); + return this; + } + + /** + *

                                                              Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.

                                                              + */ + @JsonSetter(value = "brute_force_protection", nulls = Nulls.SKIP) + public Builder bruteForceProtection(Optional bruteForceProtection) { + this.bruteForceProtection = bruteForceProtection; + return this; + } + + public Builder bruteForceProtection(Boolean bruteForceProtection) { + this.bruteForceProtection = Optional.ofNullable(bruteForceProtection); + return this; + } + + /** + *

                                                              Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint

                                                              + */ + @JsonSetter(value = "certAuth", nulls = Nulls.SKIP) + public Builder certAuth(Optional certAuth) { + this.certAuth = certAuth; + return this; + } + + public Builder certAuth(Boolean certAuth) { + this.certAuth = Optional.ofNullable(certAuth); + return this; + } + + /** + *

                                                              Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "certs", nulls = Nulls.SKIP) + public Builder certs(Optional> certs) { + this.certs = certs; + return this; + } + + public Builder certs(List certs) { + this.certs = Optional.ofNullable(certs); + return this; + } + + /** + *

                                                              When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory

                                                              + */ + @JsonSetter(value = "disable_cache", nulls = Nulls.SKIP) + public Builder disableCache(Optional disableCache) { + this.disableCache = disableCache; + return this; + } + + public Builder disableCache(Boolean disableCache) { + this.disableCache = Optional.ofNullable(disableCache); + return this; + } + + /** + *

                                                              When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets

                                                              + */ + @JsonSetter(value = "disable_self_service_change_password", nulls = Nulls.SKIP) + public Builder disableSelfServiceChangePassword(Optional disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; + return this; + } + + public Builder disableSelfServiceChangePassword(Boolean disableSelfServiceChangePassword) { + this.disableSelfServiceChangePassword = Optional.ofNullable(disableSelfServiceChangePassword); + return this; + } + + /** + *

                                                              List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters

                                                              + */ + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public Builder domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + public Builder domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              https url of the icon to be shown

                                                              + */ + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public Builder iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + public Builder iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.

                                                              + */ + @JsonSetter(value = "ips", nulls = Nulls.SKIP) + public Builder ips(Optional> ips) { + this.ips = ips; + return this; + } + + public Builder ips(List ips) { + this.ips = Optional.ofNullable(ips); + return this; + } + + /** + *

                                                              Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges

                                                              + */ + @JsonSetter(value = "kerberos", nulls = Nulls.SKIP) + public Builder kerberos(Optional kerberos) { + this.kerberos = kerberos; + return this; + } + + public Builder kerberos(Boolean kerberos) { + this.kerberos = Optional.ofNullable(kerberos); + return this; + } + + /** + *

                                                              When true, restricts the connection to Kerberos-only authentication, disallowing username/password fallback.

                                                              + */ + @JsonSetter(value = "kerberos_only", nulls = Nulls.SKIP) + public Builder kerberosOnly(Optional kerberosOnly) { + this.kerberosOnly = kerberosOnly; + return this; + } + + public Builder kerberosOnly(Boolean kerberosOnly) { + this.kerberosOnly = Optional.ofNullable(kerberosOnly); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + public Builder nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public Builder setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + public Builder setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + /** + *

                                                              The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).

                                                              + */ + @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) + public Builder signInEndpoint(Optional signInEndpoint) { + this.signInEndpoint = signInEndpoint; + return this; + } + + public Builder signInEndpoint(String signInEndpoint) { + this.signInEndpoint = Optional.ofNullable(signInEndpoint); + return this; + } + + /** + *

                                                              Primary AD domain hint used for HRD and discovery.

                                                              + */ + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public Builder tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + public Builder tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.

                                                              + */ + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public Builder upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + public Builder upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject5Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject5Options( + agentIp, + agentMode, + agentVersion, + bruteForceProtection, + certAuth, + certs, + disableCache, + disableSelfServiceChangePassword, + domainAliases, + iconUrl, + ips, + kerberos, + kerberosOnly, + nonPersistentAttrs, + setUserRootAttributes, + signInEndpoint, + tenantDomain, + thumbprints, + upstreamParams, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..cefdf4a2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject5OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum.java new file mode 100644 index 00000000..0d117039 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum AD = + new EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum(Value.AD, "ad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum valueOf(String value) { + switch (value) { + case "ad": + return AD; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject5StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6.java new file mode 100644 index 00000000..049081b1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject6.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject6 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject6 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject6) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject6 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject6 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject6Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject6Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject6 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject6( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication.java new file mode 100644 index 00000000..db7a8b09 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject6Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts.java new file mode 100644 index 00000000..ce7b5b8e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject6ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata.java new file mode 100644 index 00000000..ff893bb0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject6Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject6Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6Options.java new file mode 100644 index 00000000..10cd4ee6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6Options.java @@ -0,0 +1,1113 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionUpdatedPreviousObject6Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject6Options { + private final Optional adminAccessTokenExpiresin; + + private final Optional allowSettingLoginScopes; + + private final Optional apiEnableGroups; + + private final Optional apiEnableUsers; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional email; + + private final Optional extAgreedTerms; + + private final Optional extGroups; + + private final Optional extGroupsExtended; + + private final Optional extIsAdmin; + + private final Optional extIsSuspended; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional handleLoginFromSocial; + + private final Optional iconUrl; + + private final Optional mapUserIdToId; + + private final Optional> nonPersistentAttrs; + + private final Optional profile; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional tenantDomain; + + private final Optional> upstreamParams; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6Options( + Optional adminAccessTokenExpiresin, + Optional allowSettingLoginScopes, + Optional apiEnableGroups, + Optional apiEnableUsers, + String clientId, + Optional domain, + Optional> domainAliases, + Optional email, + Optional extAgreedTerms, + Optional extGroups, + Optional extGroupsExtended, + Optional extIsAdmin, + Optional extIsSuspended, + Optional + federatedConnectionsAccessTokens, + Optional handleLoginFromSocial, + Optional iconUrl, + Optional mapUserIdToId, + Optional> nonPersistentAttrs, + Optional profile, + Optional> scope, + Optional + setUserRootAttributes, + Optional tenantDomain, + Optional> upstreamParams, + Map additionalProperties) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + this.allowSettingLoginScopes = allowSettingLoginScopes; + this.apiEnableGroups = apiEnableGroups; + this.apiEnableUsers = apiEnableUsers; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.email = email; + this.extAgreedTerms = extAgreedTerms; + this.extGroups = extGroups; + this.extGroupsExtended = extGroupsExtended; + this.extIsAdmin = extIsAdmin; + this.extIsSuspended = extIsSuspended; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.handleLoginFromSocial = handleLoginFromSocial; + this.iconUrl = iconUrl; + this.mapUserIdToId = mapUserIdToId; + this.nonPersistentAttrs = nonPersistentAttrs; + this.profile = profile; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.tenantDomain = tenantDomain; + this.upstreamParams = upstreamParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. + */ + @JsonProperty("admin_access_token_expiresin") + public Optional getAdminAccessTokenExpiresin() { + return adminAccessTokenExpiresin; + } + + /** + * @return When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. + */ + @JsonProperty("allow_setting_login_scopes") + public Optional getAllowSettingLoginScopes() { + return allowSettingLoginScopes; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false. + */ + @JsonProperty("api_enable_groups") + public Optional getApiEnableGroups() { + return apiEnableGroups; + } + + /** + * @return Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Primary Google Workspace domain name that users must belong to. + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return Whether the OAuth flow requests the email scope. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Fetches the agreedToTerms flag from the Google Directory profile. + */ + @JsonProperty("ext_agreed_terms") + public Optional getExtAgreedTerms() { + return extAgreedTerms; + } + + /** + * @return Enables enrichment with Google group memberships (required for ext_groups_extended). + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true. + */ + @JsonProperty("ext_groups_extended") + public Optional getExtGroupsExtended() { + return extGroupsExtended; + } + + /** + * @return Fetches the Google Directory admin flag for the signing-in user. + */ + @JsonProperty("ext_is_admin") + public Optional getExtIsAdmin() { + return extIsAdmin; + } + + /** + * @return Fetches the Google Directory suspended flag for the signing-in user. + */ + @JsonProperty("ext_is_suspended") + public Optional getExtIsSuspended() { + return extIsSuspended; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. + */ + @JsonProperty("handle_login_from_social") + public Optional getHandleLoginFromSocial() { + return handleLoginFromSocial; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + /** + * @return Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. + */ + @JsonProperty("map_user_id_to_id") + public Optional getMapUserIdToId() { + return mapUserIdToId; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return Whether the OAuth flow requests the profile scope. + */ + @JsonProperty("profile") + public Optional getProfile() { + return profile; + } + + /** + * @return Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + /** + * @return The Google Workspace primary domain used to identify the organization during authentication. + */ + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject6Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject6Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject6Options other) { + return adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) + && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) + && apiEnableGroups.equals(other.apiEnableGroups) + && apiEnableUsers.equals(other.apiEnableUsers) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && email.equals(other.email) + && extAgreedTerms.equals(other.extAgreedTerms) + && extGroups.equals(other.extGroups) + && extGroupsExtended.equals(other.extGroupsExtended) + && extIsAdmin.equals(other.extIsAdmin) + && extIsSuspended.equals(other.extIsSuspended) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && handleLoginFromSocial.equals(other.handleLoginFromSocial) + && iconUrl.equals(other.iconUrl) + && mapUserIdToId.equals(other.mapUserIdToId) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && profile.equals(other.profile) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && tenantDomain.equals(other.tenantDomain) + && upstreamParams.equals(other.upstreamParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.adminAccessTokenExpiresin, + this.allowSettingLoginScopes, + this.apiEnableGroups, + this.apiEnableUsers, + this.clientId, + this.domain, + this.domainAliases, + this.email, + this.extAgreedTerms, + this.extGroups, + this.extGroupsExtended, + this.extIsAdmin, + this.extIsSuspended, + this.federatedConnectionsAccessTokens, + this.handleLoginFromSocial, + this.iconUrl, + this.mapUserIdToId, + this.nonPersistentAttrs, + this.profile, + this.scope, + this.setUserRootAttributes, + this.tenantDomain, + this.upstreamParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject6Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); + + _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes); + + _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + _FinalStage apiEnableGroups(Optional apiEnableGroups); + + _FinalStage apiEnableGroups(Boolean apiEnableGroups); + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(Boolean email); + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + _FinalStage extAgreedTerms(Optional extAgreedTerms); + + _FinalStage extAgreedTerms(Boolean extAgreedTerms); + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + _FinalStage extGroupsExtended(Optional extGroupsExtended); + + _FinalStage extGroupsExtended(Boolean extGroupsExtended); + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + _FinalStage extIsAdmin(Optional extIsAdmin); + + _FinalStage extIsAdmin(Boolean extIsAdmin); + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + _FinalStage extIsSuspended(Optional extIsSuspended); + + _FinalStage extIsSuspended(Boolean extIsSuspended); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial); + + _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + _FinalStage mapUserIdToId(Optional mapUserIdToId); + + _FinalStage mapUserIdToId(Boolean mapUserIdToId); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + _FinalStage profile(Optional profile); + + _FinalStage profile(Boolean profile); + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional> upstreamParams = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional profile = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional mapUserIdToId = Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional handleLoginFromSocial = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extIsSuspended = Optional.empty(); + + private Optional extIsAdmin = Optional.empty(); + + private Optional extGroupsExtended = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional extAgreedTerms = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + private Optional apiEnableGroups = Optional.empty(); + + private Optional allowSettingLoginScopes = Optional.empty(); + + private Optional adminAccessTokenExpiresin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject6Options other) { + adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); + allowSettingLoginScopes(other.getAllowSettingLoginScopes()); + apiEnableGroups(other.getApiEnableGroups()); + apiEnableUsers(other.getApiEnableUsers()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + email(other.getEmail()); + extAgreedTerms(other.getExtAgreedTerms()); + extGroups(other.getExtGroups()); + extGroupsExtended(other.getExtGroupsExtended()); + extIsAdmin(other.getExtIsAdmin()); + extIsSuspended(other.getExtIsSuspended()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + handleLoginFromSocial(other.getHandleLoginFromSocial()); + iconUrl(other.getIconUrl()); + mapUserIdToId(other.getMapUserIdToId()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + profile(other.getProfile()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + tenantDomain(other.getTenantDomain()); + upstreamParams(other.getUpstreamParams()); + return this; + } + + /** + *

                                                              Your Google OAuth 2.0 client ID. You can find this in your Google Cloud Console under the OAuth 2.0 Client IDs section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + /** + *

                                                              The Google Workspace primary domain used to identify the organization during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              Additional OAuth scopes requested beyond the default email profile scopes; ignored unless allow_setting_login_scopes is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage profile(Boolean profile) { + this.profile = Optional.ofNullable(profile); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the profile scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "profile", nulls = Nulls.SKIP) + public _FinalStage profile(Optional profile) { + this.profile = profile; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage mapUserIdToId(Boolean mapUserIdToId) { + this.mapUserIdToId = Optional.ofNullable(mapUserIdToId); + return this; + } + + /** + *

                                                              Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "map_user_id_to_id", nulls = Nulls.SKIP) + public _FinalStage mapUserIdToId(Optional mapUserIdToId) { + this.mapUserIdToId = mapUserIdToId; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage handleLoginFromSocial(Boolean handleLoginFromSocial) { + this.handleLoginFromSocial = Optional.ofNullable(handleLoginFromSocial); + return this; + } + + /** + *

                                                              When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "handle_login_from_social", nulls = Nulls.SKIP) + public _FinalStage handleLoginFromSocial(Optional handleLoginFromSocial) { + this.handleLoginFromSocial = handleLoginFromSocial; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsSuspended(Boolean extIsSuspended) { + this.extIsSuspended = Optional.ofNullable(extIsSuspended); + return this; + } + + /** + *

                                                              Fetches the Google Directory suspended flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) + public _FinalStage extIsSuspended(Optional extIsSuspended) { + this.extIsSuspended = extIsSuspended; + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extIsAdmin(Boolean extIsAdmin) { + this.extIsAdmin = Optional.ofNullable(extIsAdmin); + return this; + } + + /** + *

                                                              Fetches the Google Directory admin flag for the signing-in user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_is_admin", nulls = Nulls.SKIP) + public _FinalStage extIsAdmin(Optional extIsAdmin) { + this.extIsAdmin = extIsAdmin; + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroupsExtended(Boolean extGroupsExtended) { + this.extGroupsExtended = Optional.ofNullable(extGroupsExtended); + return this; + } + + /** + *

                                                              Controls whether enriched group entries include id, email, name (true) or only the group name (false); can only be set when ext_groups is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups_extended", nulls = Nulls.SKIP) + public _FinalStage extGroupsExtended(Optional extGroupsExtended) { + this.extGroupsExtended = extGroupsExtended; + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              Enables enrichment with Google group memberships (required for ext_groups_extended).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extAgreedTerms(Boolean extAgreedTerms) { + this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); + return this; + } + + /** + *

                                                              Fetches the agreedToTerms flag from the Google Directory profile.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) + public _FinalStage extAgreedTerms(Optional extAgreedTerms) { + this.extAgreedTerms = extAgreedTerms; + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(Boolean email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether the OAuth flow requests the email scope.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              Primary Google Workspace domain name that users must belong to.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableGroups(Boolean apiEnableGroups) { + this.apiEnableGroups = Optional.ofNullable(apiEnableGroups); + return this; + } + + /** + *

                                                              Enables integration with the Google Workspace Admin SDK Directory API for groups. When true, Auth0 can synchronize groups & group memberships and supports inbound directory provisioning for groups. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_groups", nulls = Nulls.SKIP) + public _FinalStage apiEnableGroups(Optional apiEnableGroups) { + this.apiEnableGroups = apiEnableGroups; + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage allowSettingLoginScopes(Boolean allowSettingLoginScopes) { + this.allowSettingLoginScopes = Optional.ofNullable(allowSettingLoginScopes); + return this; + } + + /** + *

                                                              When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "allow_setting_login_scopes", nulls = Nulls.SKIP) + public _FinalStage allowSettingLoginScopes(Optional allowSettingLoginScopes) { + this.allowSettingLoginScopes = allowSettingLoginScopes; + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = Optional.ofNullable(adminAccessTokenExpiresin); + return this; + } + + /** + *

                                                              Expiration timestamp for the admin_access_token in ISO 8601 format. Auth0 uses this value to determine when to refresh the token.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "admin_access_token_expiresin", nulls = Nulls.SKIP) + public _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin) { + this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject6Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject6Options( + adminAccessTokenExpiresin, + allowSettingLoginScopes, + apiEnableGroups, + apiEnableUsers, + clientId, + domain, + domainAliases, + email, + extAgreedTerms, + extGroups, + extGroupsExtended, + extIsAdmin, + extIsSuspended, + federatedConnectionsAccessTokens, + handleLoginFromSocial, + iconUrl, + mapUserIdToId, + nonPersistentAttrs, + profile, + scope, + setUserRootAttributes, + tenantDomain, + upstreamParams, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..58315176 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..1414088e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject6OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum.java new file mode 100644 index 00000000..54aa5353 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum GOOGLE_APPS = + new EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum(Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum valueOf(String value) { + switch (value) { + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject6StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + GOOGLE_APPS, + + UNKNOWN + } + + public interface Visitor { + T visitGoogleApps(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7.java new file mode 100644 index 00000000..cb85616b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7.java @@ -0,0 +1,562 @@ +/** + * 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 = EventStreamCloudEventConnectionUpdatedPreviousObject7.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject7 { + private final Optional authentication; + + private final Optional connectedAccounts; + + private final Optional displayName; + + private final Optional> enabledClients; + + private final String id; + + private final Optional isDomainConnection; + + private final Optional metadata; + + private final String name; + + private final Optional> realms; + + private final Optional options; + + private final Optional showAsButton; + + private final EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum strategy; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7( + Optional authentication, + Optional connectedAccounts, + Optional displayName, + Optional> enabledClients, + String id, + Optional isDomainConnection, + Optional metadata, + String name, + Optional> realms, + Optional options, + Optional showAsButton, + EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum strategy, + Map additionalProperties) { + this.authentication = authentication; + this.connectedAccounts = connectedAccounts; + this.displayName = displayName; + this.enabledClients = enabledClients; + this.id = id; + this.isDomainConnection = isDomainConnection; + this.metadata = metadata; + this.name = name; + this.realms = realms; + this.options = options; + this.showAsButton = showAsButton; + this.strategy = strategy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authentication") + public Optional getAuthentication() { + return authentication; + } + + @JsonProperty("connected_accounts") + public Optional getConnectedAccounts() { + return connectedAccounts; + } + + /** + * @return Connection name used in the new universal login experience + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + /** + * @return Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ + @JsonProperty("enabled_clients") + public Optional> getEnabledClients() { + return enabledClients; + } + + /** + * @return The connection's identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ + @JsonProperty("is_domain_connection") + public Optional getIsDomainConnection() { + return isDomainConnection; + } + + @JsonProperty("metadata") + public Optional getMetadata() { + return metadata; + } + + /** + * @return The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. + */ + @JsonProperty("realms") + public Optional> getRealms() { + return realms; + } + + @JsonProperty("options") + public Optional getOptions() { + return options; + } + + /** + * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + @JsonProperty("strategy") + public EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum getStrategy() { + return strategy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject7 + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject7) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject7 other) { + return authentication.equals(other.authentication) + && connectedAccounts.equals(other.connectedAccounts) + && displayName.equals(other.displayName) + && enabledClients.equals(other.enabledClients) + && id.equals(other.id) + && isDomainConnection.equals(other.isDomainConnection) + && metadata.equals(other.metadata) + && name.equals(other.name) + && realms.equals(other.realms) + && options.equals(other.options) + && showAsButton.equals(other.showAsButton) + && strategy.equals(other.strategy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.authentication, + this.connectedAccounts, + this.displayName, + this.enabledClients, + this.id, + this.isDomainConnection, + this.metadata, + this.name, + this.realms, + this.options, + this.showAsButton, + this.strategy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The connection's identifier

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7 other); + } + + public interface NameStage { + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + */ + StrategyStage name(@NotNull String name); + } + + public interface StrategyStage { + _FinalStage strategy(@NotNull EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum strategy); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject7 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage authentication( + Optional authentication); + + _FinalStage authentication(EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication authentication); + + _FinalStage connectedAccounts( + Optional connectedAccounts); + + _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts connectedAccounts); + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + _FinalStage enabledClients(Optional> enabledClients); + + _FinalStage enabledClients(List enabledClients); + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + _FinalStage isDomainConnection(Optional isDomainConnection); + + _FinalStage isDomainConnection(Boolean isDomainConnection); + + _FinalStage metadata(Optional metadata); + + _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata metadata); + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + _FinalStage realms(Optional> realms); + + _FinalStage realms(List realms); + + _FinalStage options(Optional options); + + _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject7Options options); + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, StrategyStage, _FinalStage { + private String id; + + private String name; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum strategy; + + private Optional showAsButton = Optional.empty(); + + private Optional options = Optional.empty(); + + private Optional> realms = Optional.empty(); + + private Optional metadata = Optional.empty(); + + private Optional isDomainConnection = Optional.empty(); + + private Optional> enabledClients = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional connectedAccounts = + Optional.empty(); + + private Optional authentication = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7 other) { + authentication(other.getAuthentication()); + connectedAccounts(other.getConnectedAccounts()); + displayName(other.getDisplayName()); + enabledClients(other.getEnabledClients()); + id(other.getId()); + isDomainConnection(other.getIsDomainConnection()); + metadata(other.getMetadata()); + name(other.getName()); + realms(other.getRealms()); + options(other.getOptions()); + showAsButton(other.getShowAsButton()); + strategy(other.getStrategy()); + return this; + } + + /** + *

                                                              The connection's identifier

                                                              + * @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; + } + + /** + *

                                                              The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public StrategyStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("strategy") + public _FinalStage strategy( + @NotNull EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum strategy) { + this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + @java.lang.Override + public _FinalStage options(EventStreamCloudEventConnectionUpdatedPreviousObject7Options options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional options) { + this.options = options; + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage realms(List realms) { + this.realms = Optional.ofNullable(realms); + return this; + } + + /** + *

                                                              Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "realms", nulls = Nulls.SKIP) + public _FinalStage realms(Optional> realms) { + this.realms = realms; + return this; + } + + @java.lang.Override + public _FinalStage metadata(EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDomainConnection(Boolean isDomainConnection) { + this.isDomainConnection = Optional.ofNullable(isDomainConnection); + return this; + } + + /** + *

                                                              true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) + public _FinalStage isDomainConnection(Optional isDomainConnection) { + this.isDomainConnection = isDomainConnection; + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage enabledClients(List enabledClients) { + this.enabledClients = Optional.ofNullable(enabledClients); + return this; + } + + /** + *

                                                              Use of this property is NOT RECOMMENDED. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) + public _FinalStage enabledClients(Optional> enabledClients) { + this.enabledClients = enabledClients; + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              Connection name used in the new universal login experience

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + @java.lang.Override + public _FinalStage connectedAccounts( + EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts connectedAccounts) { + this.connectedAccounts = Optional.ofNullable(connectedAccounts); + return this; + } + + @java.lang.Override + @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) + public _FinalStage connectedAccounts( + Optional connectedAccounts) { + this.connectedAccounts = connectedAccounts; + return this; + } + + @java.lang.Override + public _FinalStage authentication( + EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication authentication) { + this.authentication = Optional.ofNullable(authentication); + return this; + } + + @java.lang.Override + @JsonSetter(value = "authentication", nulls = Nulls.SKIP) + public _FinalStage authentication( + Optional authentication) { + this.authentication = authentication; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject7 build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject7( + authentication, + connectedAccounts, + displayName, + enabledClients, + id, + isDomainConnection, + metadata, + name, + realms, + options, + showAsButton, + strategy, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication.java new file mode 100644 index 00000000..29c6c301 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject7Authentication( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts.java new file mode 100644 index 00000000..097eaa7b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + _FinalStage active(boolean active); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts other) { + active(other.getActive()); + return this; + } + + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject7ConnectedAccounts( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata.java new file mode 100644 index 00000000..a9119468 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata { + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata other) { + return this; + } + + public EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject7Metadata(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/EventStreamCloudEventConnectionUpdatedPreviousObject7Options.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7Options.java new file mode 100644 index 00000000..bd55c3cd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7Options.java @@ -0,0 +1,1308 @@ +/** + * 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.time.OffsetDateTime; +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 = EventStreamCloudEventConnectionUpdatedPreviousObject7Options.Builder.class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject7Options { + private final Optional apiEnableUsers; + + private final Optional appDomain; + + private final Optional appId; + + private final Optional basicProfile; + + private final Optional certRolloverNotification; + + private final String clientId; + + private final Optional domain; + + private final Optional> domainAliases; + + private final Optional extGroups; + + private final Optional extNestedGroups; + + private final Optional extProfile; + + private final Optional + federatedConnectionsAccessTokens; + + private final Optional granted; + + private final Optional iconUrl; + + private final Optional identityApi; + + private final Optional maxGroupsToRetrieve; + + private final Optional> nonPersistentAttrs; + + private final Optional> scope; + + private final Optional + setUserRootAttributes; + + private final Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection; + + private final Optional tenantDomain; + + private final Optional tenantId; + + private final Optional> thumbprints; + + private final Optional> upstreamParams; + + private final Optional useWsfed; + + private final Optional useCommonEndpoint; + + private final Optional + useridAttribute; + + private final Optional waadProtocol; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7Options( + Optional apiEnableUsers, + Optional appDomain, + Optional appId, + Optional basicProfile, + Optional certRolloverNotification, + String clientId, + Optional domain, + Optional> domainAliases, + Optional extGroups, + Optional extNestedGroups, + Optional extProfile, + Optional + federatedConnectionsAccessTokens, + Optional granted, + Optional iconUrl, + Optional identityApi, + Optional maxGroupsToRetrieve, + Optional> nonPersistentAttrs, + Optional> scope, + Optional + setUserRootAttributes, + Optional + shouldTrustEmailVerifiedConnection, + Optional tenantDomain, + Optional tenantId, + Optional> thumbprints, + Optional> upstreamParams, + Optional useWsfed, + Optional useCommonEndpoint, + Optional useridAttribute, + Optional waadProtocol, + Map additionalProperties) { + this.apiEnableUsers = apiEnableUsers; + this.appDomain = appDomain; + this.appId = appId; + this.basicProfile = basicProfile; + this.certRolloverNotification = certRolloverNotification; + this.clientId = clientId; + this.domain = domain; + this.domainAliases = domainAliases; + this.extGroups = extGroups; + this.extNestedGroups = extNestedGroups; + this.extProfile = extProfile; + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + this.granted = granted; + this.iconUrl = iconUrl; + this.identityApi = identityApi; + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + this.nonPersistentAttrs = nonPersistentAttrs; + this.scope = scope; + this.setUserRootAttributes = setUserRootAttributes; + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + this.tenantDomain = tenantDomain; + this.tenantId = tenantId; + this.thumbprints = thumbprints; + this.upstreamParams = upstreamParams; + this.useWsfed = useWsfed; + this.useCommonEndpoint = useCommonEndpoint; + this.useridAttribute = useridAttribute; + this.waadProtocol = waadProtocol; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enable users API + */ + @JsonProperty("api_enable_users") + public Optional getApiEnableUsers() { + return apiEnableUsers; + } + + /** + * @return The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. + */ + @JsonProperty("app_domain") + public Optional getAppDomain() { + return appDomain; + } + + /** + * @return The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests. + */ + @JsonProperty("app_id") + public Optional getAppId() { + return appId; + } + + /** + * @return Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication. + */ + @JsonProperty("basic_profile") + public Optional getBasicProfile() { + return basicProfile; + } + + /** + * @return Timestamp of the last certificate expiring soon notification. + */ + @JsonProperty("cert_rollover_notification") + public Optional getCertRolloverNotification() { + return certRolloverNotification; + } + + /** + * @return OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com'). + */ + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + /** + * @return Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. + */ + @JsonProperty("domain_aliases") + public Optional> getDomainAliases() { + return domainAliases; + } + + /** + * @return When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve. + */ + @JsonProperty("ext_groups") + public Optional getExtGroups() { + return extGroups; + } + + /** + * @return When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included. + */ + @JsonProperty("ext_nested_groups") + public Optional getExtNestedGroups() { + return extNestedGroups; + } + + /** + * @return When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2. + */ + @JsonProperty("ext_profile") + public Optional getExtProfile() { + return extProfile; + } + + @JsonProperty("federated_connections_access_tokens") + public Optional + getFederatedConnectionsAccessTokens() { + return federatedConnectionsAccessTokens; + } + + /** + * @return Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow. + */ + @JsonProperty("granted") + public Optional getGranted() { + return granted; + } + + /** + * @return URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ + @JsonProperty("icon_url") + public Optional getIconUrl() { + return iconUrl; + } + + @JsonProperty("identity_api") + public Optional getIdentityApi() { + return identityApi; + } + + /** + * @return Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default. + */ + @JsonProperty("max_groups_to_retrieve") + public Optional getMaxGroupsToRetrieve() { + return maxGroupsToRetrieve; + } + + /** + * @return An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) + */ + @JsonProperty("non_persistent_attrs") + public Optional> getNonPersistentAttrs() { + return nonPersistentAttrs; + } + + /** + * @return OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. + */ + @JsonProperty("scope") + public Optional> getScope() { + return scope; + } + + @JsonProperty("set_user_root_attributes") + public Optional + getSetUserRootAttributes() { + return setUserRootAttributes; + } + + @JsonProperty("should_trust_email_verified_connection") + public Optional + getShouldTrustEmailVerifiedConnection() { + return shouldTrustEmailVerifiedConnection; + } + + @JsonProperty("tenant_domain") + public Optional getTenantDomain() { + return tenantDomain; + } + + /** + * @return The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. + */ + @JsonProperty("tenantId") + public Optional getTenantId() { + return tenantId; + } + + /** + * @return Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string. + */ + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("upstream_params") + public Optional> getUpstreamParams() { + return upstreamParams; + } + + /** + * @return Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. + */ + @JsonProperty("use_wsfed") + public Optional getUseWsfed() { + return useWsfed; + } + + /** + * @return When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false. + */ + @JsonProperty("useCommonEndpoint") + public Optional getUseCommonEndpoint() { + return useCommonEndpoint; + } + + @JsonProperty("userid_attribute") + public Optional + getUseridAttribute() { + return useridAttribute; + } + + @JsonProperty("waad_protocol") + public Optional getWaadProtocol() { + return waadProtocol; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventConnectionUpdatedPreviousObject7Options + && equalTo((EventStreamCloudEventConnectionUpdatedPreviousObject7Options) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventConnectionUpdatedPreviousObject7Options other) { + return apiEnableUsers.equals(other.apiEnableUsers) + && appDomain.equals(other.appDomain) + && appId.equals(other.appId) + && basicProfile.equals(other.basicProfile) + && certRolloverNotification.equals(other.certRolloverNotification) + && clientId.equals(other.clientId) + && domain.equals(other.domain) + && domainAliases.equals(other.domainAliases) + && extGroups.equals(other.extGroups) + && extNestedGroups.equals(other.extNestedGroups) + && extProfile.equals(other.extProfile) + && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) + && granted.equals(other.granted) + && iconUrl.equals(other.iconUrl) + && identityApi.equals(other.identityApi) + && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) + && nonPersistentAttrs.equals(other.nonPersistentAttrs) + && scope.equals(other.scope) + && setUserRootAttributes.equals(other.setUserRootAttributes) + && shouldTrustEmailVerifiedConnection.equals(other.shouldTrustEmailVerifiedConnection) + && tenantDomain.equals(other.tenantDomain) + && tenantId.equals(other.tenantId) + && thumbprints.equals(other.thumbprints) + && upstreamParams.equals(other.upstreamParams) + && useWsfed.equals(other.useWsfed) + && useCommonEndpoint.equals(other.useCommonEndpoint) + && useridAttribute.equals(other.useridAttribute) + && waadProtocol.equals(other.waadProtocol); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.apiEnableUsers, + this.appDomain, + this.appId, + this.basicProfile, + this.certRolloverNotification, + this.clientId, + this.domain, + this.domainAliases, + this.extGroups, + this.extNestedGroups, + this.extProfile, + this.federatedConnectionsAccessTokens, + this.granted, + this.iconUrl, + this.identityApi, + this.maxGroupsToRetrieve, + this.nonPersistentAttrs, + this.scope, + this.setUserRootAttributes, + this.shouldTrustEmailVerifiedConnection, + this.tenantDomain, + this.tenantId, + this.thumbprints, + this.upstreamParams, + this.useWsfed, + this.useCommonEndpoint, + this.useridAttribute, + this.waadProtocol); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + */ + _FinalStage clientId(@NotNull String clientId); + + Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7Options other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject7Options build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Enable users API

                                                              + */ + _FinalStage apiEnableUsers(Optional apiEnableUsers); + + _FinalStage apiEnableUsers(Boolean apiEnableUsers); + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + _FinalStage appDomain(Optional appDomain); + + _FinalStage appDomain(String appDomain); + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + _FinalStage appId(Optional appId); + + _FinalStage appId(String appId); + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + _FinalStage basicProfile(Optional basicProfile); + + _FinalStage basicProfile(Boolean basicProfile); + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + _FinalStage certRolloverNotification(Optional certRolloverNotification); + + _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification); + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + _FinalStage domain(Optional domain); + + _FinalStage domain(String domain); + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + _FinalStage domainAliases(Optional> domainAliases); + + _FinalStage domainAliases(List domainAliases); + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + _FinalStage extGroups(Optional extGroups); + + _FinalStage extGroups(Boolean extGroups); + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + _FinalStage extNestedGroups(Optional extNestedGroups); + + _FinalStage extNestedGroups(Boolean extNestedGroups); + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + _FinalStage extProfile(Optional extProfile); + + _FinalStage extProfile(Boolean extProfile); + + _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens); + + _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens); + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + _FinalStage granted(Optional granted); + + _FinalStage granted(Boolean granted); + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + _FinalStage iconUrl(Optional iconUrl); + + _FinalStage iconUrl(String iconUrl); + + _FinalStage identityApi( + Optional identityApi); + + _FinalStage identityApi( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum identityApi); + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve); + + _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve); + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); + + _FinalStage nonPersistentAttrs(List nonPersistentAttrs); + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + _FinalStage scope(Optional> scope); + + _FinalStage scope(List scope); + + _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes); + + _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum + setUserRootAttributes); + + _FinalStage shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection); + + _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection); + + _FinalStage tenantDomain(Optional tenantDomain); + + _FinalStage tenantDomain(String tenantDomain); + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + _FinalStage tenantId(Optional tenantId); + + _FinalStage tenantId(String tenantId); + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + _FinalStage thumbprints(Optional> thumbprints); + + _FinalStage thumbprints(List thumbprints); + + _FinalStage upstreamParams(Optional> upstreamParams); + + _FinalStage upstreamParams(Map upstreamParams); + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + _FinalStage useWsfed(Optional useWsfed); + + _FinalStage useWsfed(Boolean useWsfed); + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + _FinalStage useCommonEndpoint(Optional useCommonEndpoint); + + _FinalStage useCommonEndpoint(Boolean useCommonEndpoint); + + _FinalStage useridAttribute( + Optional + useridAttribute); + + _FinalStage useridAttribute( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum useridAttribute); + + _FinalStage waadProtocol( + Optional waadProtocol); + + _FinalStage waadProtocol( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum waadProtocol); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, _FinalStage { + private String clientId; + + private Optional waadProtocol = + Optional.empty(); + + private Optional + useridAttribute = Optional.empty(); + + private Optional useCommonEndpoint = Optional.empty(); + + private Optional useWsfed = Optional.empty(); + + private Optional> upstreamParams = Optional.empty(); + + private Optional> thumbprints = Optional.empty(); + + private Optional tenantId = Optional.empty(); + + private Optional tenantDomain = Optional.empty(); + + private Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection = Optional.empty(); + + private Optional + setUserRootAttributes = Optional.empty(); + + private Optional> scope = Optional.empty(); + + private Optional> nonPersistentAttrs = Optional.empty(); + + private Optional maxGroupsToRetrieve = Optional.empty(); + + private Optional identityApi = + Optional.empty(); + + private Optional iconUrl = Optional.empty(); + + private Optional granted = Optional.empty(); + + private Optional + federatedConnectionsAccessTokens = Optional.empty(); + + private Optional extProfile = Optional.empty(); + + private Optional extNestedGroups = Optional.empty(); + + private Optional extGroups = Optional.empty(); + + private Optional> domainAliases = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional certRolloverNotification = Optional.empty(); + + private Optional basicProfile = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional appDomain = Optional.empty(); + + private Optional apiEnableUsers = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventConnectionUpdatedPreviousObject7Options other) { + apiEnableUsers(other.getApiEnableUsers()); + appDomain(other.getAppDomain()); + appId(other.getAppId()); + basicProfile(other.getBasicProfile()); + certRolloverNotification(other.getCertRolloverNotification()); + clientId(other.getClientId()); + domain(other.getDomain()); + domainAliases(other.getDomainAliases()); + extGroups(other.getExtGroups()); + extNestedGroups(other.getExtNestedGroups()); + extProfile(other.getExtProfile()); + federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); + granted(other.getGranted()); + iconUrl(other.getIconUrl()); + identityApi(other.getIdentityApi()); + maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); + nonPersistentAttrs(other.getNonPersistentAttrs()); + scope(other.getScope()); + setUserRootAttributes(other.getSetUserRootAttributes()); + shouldTrustEmailVerifiedConnection(other.getShouldTrustEmailVerifiedConnection()); + tenantDomain(other.getTenantDomain()); + tenantId(other.getTenantId()); + thumbprints(other.getThumbprints()); + upstreamParams(other.getUpstreamParams()); + useWsfed(other.getUseWsfed()); + useCommonEndpoint(other.getUseCommonEndpoint()); + useridAttribute(other.getUseridAttribute()); + waadProtocol(other.getWaadProtocol()); + return this; + } + + /** + *

                                                              OAuth 2.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage waadProtocol( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum waadProtocol) { + this.waadProtocol = Optional.ofNullable(waadProtocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) + public _FinalStage waadProtocol( + Optional waadProtocol) { + this.waadProtocol = waadProtocol; + return this; + } + + @java.lang.Override + public _FinalStage useridAttribute( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum useridAttribute) { + this.useridAttribute = Optional.ofNullable(useridAttribute); + return this; + } + + @java.lang.Override + @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) + public _FinalStage useridAttribute( + Optional + useridAttribute) { + this.useridAttribute = useridAttribute; + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useCommonEndpoint(Boolean useCommonEndpoint) { + this.useCommonEndpoint = Optional.ofNullable(useCommonEndpoint); + return this; + } + + /** + *

                                                              When enabled (true), uses the Azure AD common endpoint for multi-tenant authentication. Allows users from any Azure AD organization to sign in. Requires userid_attribute set to 'sub' (not 'oid'). Cannot be used with SCIM provisioning. Defaults to false.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "useCommonEndpoint", nulls = Nulls.SKIP) + public _FinalStage useCommonEndpoint(Optional useCommonEndpoint) { + this.useCommonEndpoint = useCommonEndpoint; + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage useWsfed(Boolean useWsfed) { + this.useWsfed = Optional.ofNullable(useWsfed); + return this; + } + + /** + *

                                                              Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) + public _FinalStage useWsfed(Optional useWsfed) { + this.useWsfed = useWsfed; + return this; + } + + @java.lang.Override + public _FinalStage upstreamParams(Map upstreamParams) { + this.upstreamParams = Optional.ofNullable(upstreamParams); + return this; + } + + @java.lang.Override + @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) + public _FinalStage upstreamParams(Optional> upstreamParams) { + this.upstreamParams = upstreamParams; + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + /** + *

                                                              Array of certificate thumbprints (SHA-128/SHA-256/SHA-512 hex hashes) for validating SAML signatures. Used with WS-Federation protocol. Maximum 20 thumbprints. Each thumbprint must be a hexadecimal string.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public _FinalStage thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantId(String tenantId) { + this.tenantId = Optional.ofNullable(tenantId); + return this; + } + + /** + *

                                                              The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) + public _FinalStage tenantId(Optional tenantId) { + this.tenantId = tenantId; + return this; + } + + @java.lang.Override + public _FinalStage tenantDomain(String tenantDomain) { + this.tenantDomain = Optional.ofNullable(tenantDomain); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tenant_domain", nulls = Nulls.SKIP) + public _FinalStage tenantDomain(Optional tenantDomain) { + this.tenantDomain = tenantDomain; + return this; + } + + @java.lang.Override + public _FinalStage shouldTrustEmailVerifiedConnection( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); + return this; + } + + @java.lang.Override + @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) + public _FinalStage shouldTrustEmailVerifiedConnection( + Optional< + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum> + shouldTrustEmailVerifiedConnection) { + this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; + return this; + } + + @java.lang.Override + public _FinalStage setUserRootAttributes( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum + setUserRootAttributes) { + this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) + public _FinalStage setUserRootAttributes( + Optional + setUserRootAttributes) { + this.setUserRootAttributes = setUserRootAttributes; + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage scope(List scope) { + this.scope = Optional.ofNullable(scope); + return this; + } + + /** + *

                                                              OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "scope", nulls = Nulls.SKIP) + public _FinalStage scope(Optional> scope) { + this.scope = scope; + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { + this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); + return this; + } + + /** + *

                                                              An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)

                                                              + */ + @java.lang.Override + @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) + public _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs) { + this.nonPersistentAttrs = nonPersistentAttrs; + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage maxGroupsToRetrieve(String maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = Optional.ofNullable(maxGroupsToRetrieve); + return this; + } + + /** + *

                                                              Maximum number of Azure AD groups to retrieve per user during authentication. Helps prevent performance issues for users in many groups. Only applies when ext_groups is enabled. Leave empty to use platform default.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) + public _FinalStage maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { + this.maxGroupsToRetrieve = maxGroupsToRetrieve; + return this; + } + + @java.lang.Override + public _FinalStage identityApi( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum identityApi) { + this.identityApi = Optional.ofNullable(identityApi); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identity_api", nulls = Nulls.SKIP) + public _FinalStage identityApi( + Optional identityApi) { + this.identityApi = identityApi; + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage iconUrl(String iconUrl) { + this.iconUrl = Optional.ofNullable(iconUrl); + return this; + } + + /** + *

                                                              URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) + public _FinalStage iconUrl(Optional iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage granted(Boolean granted) { + this.granted = Optional.ofNullable(granted); + return this; + } + + /** + *

                                                              Indicates whether admin consent has been granted for the required Azure AD permissions. Read-only status field managed by Auth0 during the OAuth authorization flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "granted", nulls = Nulls.SKIP) + public _FinalStage granted(Optional granted) { + this.granted = granted; + return this; + } + + @java.lang.Override + public _FinalStage federatedConnectionsAccessTokens( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = Optional.ofNullable(federatedConnectionsAccessTokens); + return this; + } + + @java.lang.Override + @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) + public _FinalStage federatedConnectionsAccessTokens( + Optional + federatedConnectionsAccessTokens) { + this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extProfile(Boolean extProfile) { + this.extProfile = Optional.ofNullable(extProfile); + return this; + } + + /** + *

                                                              When enabled (true), retrieves extended profile attributes from Azure AD via Microsoft Graph API (job title, department, office location, etc.). Requires Graph API permissions. Only available with Azure AD v1 or when explicitly enabled for v2.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) + public _FinalStage extProfile(Optional extProfile) { + this.extProfile = extProfile; + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extNestedGroups(Boolean extNestedGroups) { + this.extNestedGroups = Optional.ofNullable(extNestedGroups); + return this; + } + + /** + *

                                                              When true, stores all groups the user is member of, including transitive group memberships (groups within groups). When false (default), only direct group memberships are included.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_nested_groups", nulls = Nulls.SKIP) + public _FinalStage extNestedGroups(Optional extNestedGroups) { + this.extNestedGroups = extNestedGroups; + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage extGroups(Boolean extGroups) { + this.extGroups = Optional.ofNullable(extGroups); + return this; + } + + /** + *

                                                              When enabled (true), retrieves and stores Azure AD security group memberships for the user. Requires Microsoft Graph API permissions (Directory.Read.All). Allows configuring max_groups_to_retrieve.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) + public _FinalStage extGroups(Optional extGroups) { + this.extGroups = extGroups; + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domainAliases(List domainAliases) { + this.domainAliases = Optional.ofNullable(domainAliases); + return this; + } + + /** + *

                                                              Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain_aliases", nulls = Nulls.SKIP) + public _FinalStage domainAliases(Optional> domainAliases) { + this.domainAliases = domainAliases; + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage domain(String domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + /** + *

                                                              The primary Azure AD tenant domain (e.g., 'contoso.onmicrosoft.com' or 'contoso.com').

                                                              + */ + @java.lang.Override + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public _FinalStage domain(Optional domain) { + this.domain = domain; + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage certRolloverNotification(OffsetDateTime certRolloverNotification) { + this.certRolloverNotification = Optional.ofNullable(certRolloverNotification); + return this; + } + + /** + *

                                                              Timestamp of the last certificate expiring soon notification.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "cert_rollover_notification", nulls = Nulls.SKIP) + public _FinalStage certRolloverNotification(Optional certRolloverNotification) { + this.certRolloverNotification = certRolloverNotification; + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage basicProfile(Boolean basicProfile) { + this.basicProfile = Optional.ofNullable(basicProfile); + return this; + } + + /** + *

                                                              Includes basic user profile information from Azure AD (name, email, given_name, family_name). Always enabled and required - represents the minimum profile data retrieved during authentication.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) + public _FinalStage basicProfile(Optional basicProfile) { + this.basicProfile = basicProfile; + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appId(String appId) { + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + *

                                                              The Application ID URI (App ID URI) for the Azure AD application. Required when using Azure AD v1 with the Resource Owner Password flow. Used to identify the resource being requested in OAuth token requests.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_id", nulls = Nulls.SKIP) + public _FinalStage appId(Optional appId) { + this.appId = appId; + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage appDomain(String appDomain) { + this.appDomain = Optional.ofNullable(appDomain); + return this; + } + + /** + *

                                                              The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "app_domain", nulls = Nulls.SKIP) + public _FinalStage appDomain(Optional appDomain) { + this.appDomain = appDomain; + return this; + } + + /** + *

                                                              Enable users API

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { + this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); + return this; + } + + /** + *

                                                              Enable users API

                                                              + */ + @java.lang.Override + @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) + public _FinalStage apiEnableUsers(Optional apiEnableUsers) { + this.apiEnableUsers = apiEnableUsers; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject7Options build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject7Options( + apiEnableUsers, + appDomain, + appId, + basicProfile, + certRolloverNotification, + clientId, + domain, + domainAliases, + extGroups, + extNestedGroups, + extProfile, + federatedConnectionsAccessTokens, + granted, + iconUrl, + identityApi, + maxGroupsToRetrieve, + nonPersistentAttrs, + scope, + setUserRootAttributes, + shouldTrustEmailVerifiedConnection, + tenantDomain, + tenantId, + thumbprints, + upstreamParams, + useWsfed, + useCommonEndpoint, + useridAttribute, + waadProtocol, + 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/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens.java new file mode 100644 index 00000000..66aff042 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens.java @@ -0,0 +1,140 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens.Builder + .class) +public final class EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens { + private final boolean active; + + private final Map additionalProperties; + + private EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens( + boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables refresh tokens and access tokens collection for federated connections + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other + instanceof + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens + && equalTo( + (EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens) + other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + */ + _FinalStage active(boolean active); + + Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens other); + } + + public interface _FinalStage { + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from( + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens build() { + return new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsFederatedConnectionsAccessTokens( + active, 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/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum.java new file mode 100644 index 00000000..861c091e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum.java @@ -0,0 +1,93 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum + AZURE_ACTIVE_DIRECTORY_V10 = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum( + Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum + MICROSOFT_IDENTITY_PLATFORM_V20 = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum( + Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AZURE_ACTIVE_DIRECTORY_V10: + return visitor.visitAzureActiveDirectoryV10(); + case MICROSOFT_IDENTITY_PLATFORM_V20: + return visitor.visitMicrosoftIdentityPlatformV20(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum valueOf(String value) { + switch (value) { + case "azure-active-directory-v1.0": + return AZURE_ACTIVE_DIRECTORY_V10; + case "microsoft-identity-platform-v2.0": + return MICROSOFT_IDENTITY_PLATFORM_V20; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsIdentityApiEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + MICROSOFT_IDENTITY_PLATFORM_V20, + + AZURE_ACTIVE_DIRECTORY_V10, + + UNKNOWN + } + + public interface Visitor { + T visitMicrosoftIdentityPlatformV20(); + + T visitAzureActiveDirectoryV10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum.java new file mode 100644 index 00000000..6e7ed08c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum.java @@ -0,0 +1,107 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum + NEVER_ON_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.NEVER_ON_LOGIN, "never_on_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum + ON_EACH_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.ON_EACH_LOGIN, "on_each_login"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum + ON_FIRST_LOGIN = new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.ON_FIRST_LOGIN, "on_first_login"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum(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 + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_ON_LOGIN: + return visitor.visitNeverOnLogin(); + case ON_EACH_LOGIN: + return visitor.visitOnEachLogin(); + case ON_FIRST_LOGIN: + return visitor.visitOnFirstLogin(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum valueOf( + String value) { + switch (value) { + case "never_on_login": + return NEVER_ON_LOGIN; + case "on_each_login": + return ON_EACH_LOGIN; + case "on_first_login": + return ON_FIRST_LOGIN; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsSetUserRootAttributesEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + ON_EACH_LOGIN, + + ON_FIRST_LOGIN, + + NEVER_ON_LOGIN, + + UNKNOWN + } + + public interface Visitor { + T visitOnEachLogin(); + + T visitOnFirstLogin(); + + T visitNeverOnLogin(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java new file mode 100644 index 00000000..972af6d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum.java @@ -0,0 +1,100 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum { + public static final + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + NEVER_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); + + public static final + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + ALWAYS_SET_EMAILS_AS_VERIFIED = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + 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 + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NEVER_SET_EMAILS_AS_VERIFIED: + return visitor.visitNeverSetEmailsAsVerified(); + case ALWAYS_SET_EMAILS_AS_VERIFIED: + return visitor.visitAlwaysSetEmailsAsVerified(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum + valueOf(String value) { + switch (value) { + case "never_set_emails_as_verified": + return NEVER_SET_EMAILS_AS_VERIFIED; + case "always_set_emails_as_verified": + return ALWAYS_SET_EMAILS_AS_VERIFIED; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsShouldTrustEmailVerifiedConnectionEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NEVER_SET_EMAILS_AS_VERIFIED, + + ALWAYS_SET_EMAILS_AS_VERIFIED, + + UNKNOWN + } + + public interface Visitor { + T visitNeverSetEmailsAsVerified(); + + T visitAlwaysSetEmailsAsVerified(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum.java new file mode 100644 index 00000000..0ac7b214 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum SUB = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum(Value.SUB, "sub"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum OID = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum(Value.OID, "oid"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUB: + return visitor.visitSub(); + case OID: + return visitor.visitOid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum valueOf( + String value) { + switch (value) { + case "sub": + return SUB; + case "oid": + return OID; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsUseridAttributeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + OID, + + SUB, + + UNKNOWN + } + + public interface Visitor { + T visitOid(); + + T visitSub(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum.java new file mode 100644 index 00000000..fb32e785 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum.java @@ -0,0 +1,91 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum OPENID_CONNECT = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum( + Value.OPENID_CONNECT, "openid-connect"); + + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum WS_FEDERATION = + new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum( + Value.WS_FEDERATION, "ws-federation"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OPENID_CONNECT: + return visitor.visitOpenidConnect(); + case WS_FEDERATION: + return visitor.visitWsFederation(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum valueOf(String value) { + switch (value) { + case "openid-connect": + return OPENID_CONNECT; + case "ws-federation": + return WS_FEDERATION; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject7OptionsWaadProtocolEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + WS_FEDERATION, + + OPENID_CONNECT, + + UNKNOWN + } + + public interface Visitor { + T visitWsFederation(); + + T visitOpenidConnect(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum.java new file mode 100644 index 00000000..59f2599d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum { + public static final EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum WAAD = + new EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum(Value.WAAD, "waad"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum(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 EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum + && this.string.equals( + ((EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WAAD: + return visitor.visitWaad(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum valueOf(String value) { + switch (value) { + case "waad": + return WAAD; + default: + return new EventStreamCloudEventConnectionUpdatedPreviousObject7StrategyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedTypeEnum.java new file mode 100644 index 00000000..3fd9a030 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventConnectionUpdatedTypeEnum.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 EventStreamCloudEventConnectionUpdatedTypeEnum { + public static final EventStreamCloudEventConnectionUpdatedTypeEnum CONNECTION_UPDATED = + new EventStreamCloudEventConnectionUpdatedTypeEnum(Value.CONNECTION_UPDATED, "connection.updated"); + + private final Value value; + + private final String string; + + EventStreamCloudEventConnectionUpdatedTypeEnum(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 EventStreamCloudEventConnectionUpdatedTypeEnum + && this.string.equals(((EventStreamCloudEventConnectionUpdatedTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION_UPDATED: + return visitor.visitConnectionUpdated(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventConnectionUpdatedTypeEnum valueOf(String value) { + switch (value) { + case "connection.updated": + return CONNECTION_UPDATED; + default: + return new EventStreamCloudEventConnectionUpdatedTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION_UPDATED, + + UNKNOWN + } + + public interface Visitor { + T visitConnectionUpdated(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java index b064e9a9..e8e905c0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContext.java @@ -29,6 +29,8 @@ public final class EventStreamCloudEventContext { private final EventStreamCloudEventContextTenant tenant; + private final Optional transaction; + private final Map additionalProperties; private EventStreamCloudEventContext( @@ -36,11 +38,13 @@ private EventStreamCloudEventContext( Optional connection, Optional request, EventStreamCloudEventContextTenant tenant, + Optional transaction, Map additionalProperties) { this.client = client; this.connection = connection; this.request = request; this.tenant = tenant; + this.transaction = transaction; this.additionalProperties = additionalProperties; } @@ -64,6 +68,11 @@ public EventStreamCloudEventContextTenant getTenant() { return tenant; } + @JsonProperty("transaction") + public Optional getTransaction() { + return transaction; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -79,12 +88,13 @@ private boolean equalTo(EventStreamCloudEventContext other) { return client.equals(other.client) && connection.equals(other.connection) && request.equals(other.request) - && tenant.equals(other.tenant); + && tenant.equals(other.tenant) + && transaction.equals(other.transaction); } @java.lang.Override public int hashCode() { - return Objects.hash(this.client, this.connection, this.request, this.tenant); + return Objects.hash(this.client, this.connection, this.request, this.tenant, this.transaction); } @java.lang.Override @@ -120,12 +130,18 @@ public interface _FinalStage { _FinalStage request(Optional request); _FinalStage request(EventStreamCloudEventContextRequest request); + + _FinalStage transaction(Optional transaction); + + _FinalStage transaction(EventStreamCloudEventContextTransaction transaction); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements TenantStage, _FinalStage { private EventStreamCloudEventContextTenant tenant; + private Optional transaction = Optional.empty(); + private Optional request = Optional.empty(); private Optional connection = Optional.empty(); @@ -143,6 +159,7 @@ public Builder from(EventStreamCloudEventContext other) { connection(other.getConnection()); request(other.getRequest()); tenant(other.getTenant()); + transaction(other.getTransaction()); return this; } @@ -153,6 +170,19 @@ public _FinalStage tenant(@NotNull EventStreamCloudEventContextTenant tenant) { return this; } + @java.lang.Override + public _FinalStage transaction(EventStreamCloudEventContextTransaction transaction) { + this.transaction = Optional.ofNullable(transaction); + return this; + } + + @java.lang.Override + @JsonSetter(value = "transaction", nulls = Nulls.SKIP) + public _FinalStage transaction(Optional transaction) { + this.transaction = transaction; + return this; + } + @java.lang.Override public _FinalStage request(EventStreamCloudEventContextRequest request) { this.request = Optional.ofNullable(request); @@ -194,7 +224,8 @@ public _FinalStage client(Optional client) { @java.lang.Override public EventStreamCloudEventContext build() { - return new EventStreamCloudEventContext(client, connection, request, tenant, additionalProperties); + return new EventStreamCloudEventContext( + client, connection, request, tenant, transaction, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java index 40d48673..d87e7782 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextClient.java @@ -140,7 +140,6 @@ public Builder from(EventStreamCloudEventContextClient other) { } /** - *

                                                              The client identifier.

                                                              *

                                                              The client identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -152,7 +151,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The client name.

                                                              *

                                                              The client name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java index a1c9040e..05b492f5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextConnection.java @@ -142,7 +142,6 @@ public Builder from(EventStreamCloudEventContextConnection other) { } /** - *

                                                              The ID of the connection.

                                                              *

                                                              The ID of the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -154,7 +153,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the connection.

                                                              *

                                                              The name of the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -166,7 +164,6 @@ public StrategyStage name(@NotNull String name) { } /** - *

                                                              The auth strategy implemented by the connection.

                                                              *

                                                              The auth strategy implemented by the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java index 8698c70b..9b39a01e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextRequest.java @@ -220,7 +220,6 @@ public HostnameStage geo(@NotNull EventStreamCloudEventContextRequestGeo geo) { } /** - *

                                                              The hostname the request is for.

                                                              *

                                                              The hostname the request is for.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -232,7 +231,6 @@ public IpStage hostname(@NotNull String hostname) { } /** - *

                                                              The originating IP address of the request.

                                                              *

                                                              The originating IP address of the request.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -244,7 +242,6 @@ public MethodStage ip(@NotNull String ip) { } /** - *

                                                              The HTTP method used for the request.

                                                              *

                                                              The HTTP method used for the request.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -256,7 +253,6 @@ public UserAgentStage method(@NotNull String method) { } /** - *

                                                              The value of the User-Agent header.

                                                              *

                                                              The value of the User-Agent header.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java index 277036b8..2438ba9f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTenant.java @@ -19,21 +19,21 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventContextTenant.Builder.class) public final class EventStreamCloudEventContextTenant { - private final String tenantId; + private final String id; private final Map additionalProperties; - private EventStreamCloudEventContextTenant(String tenantId, Map additionalProperties) { - this.tenantId = tenantId; + private EventStreamCloudEventContextTenant(String id, Map additionalProperties) { + this.id = id; this.additionalProperties = additionalProperties; } /** - * @return Machine-generated unique tenant identifier. + * @return User-provided tenant identifier. */ - @JsonProperty("tenant_id") - public String getTenantId() { - return tenantId; + @JsonProperty("id") + public String getId() { + return id; } @java.lang.Override @@ -49,12 +49,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventContextTenant other) { - return tenantId.equals(other.tenantId); + return id.equals(other.id); } @java.lang.Override public int hashCode() { - return Objects.hash(this.tenantId); + return Objects.hash(this.id); } @java.lang.Override @@ -62,15 +62,15 @@ public String toString() { return ObjectMappers.stringify(this); } - public static TenantIdStage builder() { + public static IdStage builder() { return new Builder(); } - public interface TenantIdStage { + public interface IdStage { /** - *

                                                              Machine-generated unique tenant identifier.

                                                              + *

                                                              User-provided tenant identifier.

                                                              */ - _FinalStage tenantId(@NotNull String tenantId); + _FinalStage id(@NotNull String id); Builder from(EventStreamCloudEventContextTenant other); } @@ -84,8 +84,8 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TenantIdStage, _FinalStage { - private String tenantId; + public static final class Builder implements IdStage, _FinalStage { + private String id; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -94,25 +94,24 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventContextTenant other) { - tenantId(other.getTenantId()); + id(other.getId()); return this; } /** - *

                                                              Machine-generated unique tenant identifier.

                                                              - *

                                                              Machine-generated unique tenant identifier.

                                                              + *

                                                              User-provided tenant identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - @JsonSetter("tenant_id") - public _FinalStage tenantId(@NotNull String tenantId) { - this.tenantId = Objects.requireNonNull(tenantId, "tenantId must not be null"); + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); return this; } @java.lang.Override public EventStreamCloudEventContextTenant build() { - return new EventStreamCloudEventContextTenant(tenantId, additionalProperties); + return new EventStreamCloudEventContextTenant(id, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransaction.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransaction.java new file mode 100644 index 00000000..195b0227 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransaction.java @@ -0,0 +1,618 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventContextTransaction.Builder.class) +public final class EventStreamCloudEventContextTransaction { + private final List acrValues; + + private final String locale; + + private final Optional loginHint; + + private final Optional> prompt; + + private final Optional protocol; + + private final Optional redirectUri; + + private final List requestedScopes; + + private final Optional responseMode; + + private final Optional> responseType; + + private final Optional state; + + private final List uiLocales; + + private final Map additionalProperties; + + private EventStreamCloudEventContextTransaction( + List acrValues, + String locale, + Optional loginHint, + Optional> prompt, + Optional protocol, + Optional redirectUri, + List requestedScopes, + Optional responseMode, + Optional> responseType, + Optional state, + List uiLocales, + Map additionalProperties) { + this.acrValues = acrValues; + this.locale = locale; + this.loginHint = loginHint; + this.prompt = prompt; + this.protocol = protocol; + this.redirectUri = redirectUri; + this.requestedScopes = requestedScopes; + this.responseMode = responseMode; + this.responseType = responseType; + this.state = state; + this.uiLocales = uiLocales; + this.additionalProperties = additionalProperties; + } + + /** + * @return acr_values in the request. + */ + @JsonProperty("acr_values") + public List getAcrValues() { + return acrValues; + } + + /** + * @return The locale used for this transaction. + */ + @JsonProperty("locale") + public String getLocale() { + return locale; + } + + /** + * @return Hint about the login identifier the user might use in this transaction. + */ + @JsonProperty("login_hint") + public Optional getLoginHint() { + return loginHint; + } + + /** + * @return Instructions indicating whether the user may be prompted for re-authentication and consent. + */ + @JsonProperty("prompt") + public Optional> getPrompt() { + return prompt; + } + + @JsonProperty("protocol") + public Optional getProtocol() { + return protocol; + } + + /** + * @return The URL to which the client will be redirected when the transaction completes. + */ + @JsonProperty("redirect_uri") + public Optional getRedirectUri() { + return redirectUri; + } + + /** + * @return The scopes requested. + */ + @JsonProperty("requested_scopes") + public List getRequestedScopes() { + return requestedScopes; + } + + @JsonProperty("response_mode") + public Optional getResponseMode() { + return responseMode; + } + + /** + * @return The kind of credential issued by this transaction. + */ + @JsonProperty("response_type") + public Optional> getResponseType() { + return responseType; + } + + /** + * @return The OAuth state parameter for this transaction. + */ + @JsonProperty("state") + public Optional getState() { + return state; + } + + /** + * @return The ui_locales requested for this transaction. + */ + @JsonProperty("ui_locales") + public List getUiLocales() { + return uiLocales; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventContextTransaction + && equalTo((EventStreamCloudEventContextTransaction) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventContextTransaction other) { + return acrValues.equals(other.acrValues) + && locale.equals(other.locale) + && loginHint.equals(other.loginHint) + && prompt.equals(other.prompt) + && protocol.equals(other.protocol) + && redirectUri.equals(other.redirectUri) + && requestedScopes.equals(other.requestedScopes) + && responseMode.equals(other.responseMode) + && responseType.equals(other.responseType) + && state.equals(other.state) + && uiLocales.equals(other.uiLocales); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.acrValues, + this.locale, + this.loginHint, + this.prompt, + this.protocol, + this.redirectUri, + this.requestedScopes, + this.responseMode, + this.responseType, + this.state, + this.uiLocales); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LocaleStage builder() { + return new Builder(); + } + + public interface LocaleStage { + /** + *

                                                              The locale used for this transaction.

                                                              + */ + _FinalStage locale(@NotNull String locale); + + Builder from(EventStreamCloudEventContextTransaction other); + } + + public interface _FinalStage { + EventStreamCloudEventContextTransaction build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              acr_values in the request.

                                                              + */ + _FinalStage acrValues(List acrValues); + + _FinalStage addAcrValues(String acrValues); + + _FinalStage addAllAcrValues(List acrValues); + + /** + *

                                                              Hint about the login identifier the user might use in this transaction.

                                                              + */ + _FinalStage loginHint(Optional loginHint); + + _FinalStage loginHint(String loginHint); + + /** + *

                                                              Instructions indicating whether the user may be prompted for re-authentication and consent.

                                                              + */ + _FinalStage prompt(Optional> prompt); + + _FinalStage prompt(List prompt); + + _FinalStage protocol(Optional protocol); + + _FinalStage protocol(EventStreamCloudEventContextTransactionProtocolEnum protocol); + + /** + *

                                                              The URL to which the client will be redirected when the transaction completes.

                                                              + */ + _FinalStage redirectUri(Optional redirectUri); + + _FinalStage redirectUri(String redirectUri); + + /** + *

                                                              The scopes requested.

                                                              + */ + _FinalStage requestedScopes(List requestedScopes); + + _FinalStage addRequestedScopes(String requestedScopes); + + _FinalStage addAllRequestedScopes(List requestedScopes); + + _FinalStage responseMode(Optional responseMode); + + _FinalStage responseMode(EventStreamCloudEventContextTransactionResponseModeEnum responseMode); + + /** + *

                                                              The kind of credential issued by this transaction.

                                                              + */ + _FinalStage responseType( + Optional> responseType); + + _FinalStage responseType(List responseType); + + /** + *

                                                              The OAuth state parameter for this transaction.

                                                              + */ + _FinalStage state(Optional state); + + _FinalStage state(String state); + + /** + *

                                                              The ui_locales requested for this transaction.

                                                              + */ + _FinalStage uiLocales(List uiLocales); + + _FinalStage addUiLocales(String uiLocales); + + _FinalStage addAllUiLocales(List uiLocales); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LocaleStage, _FinalStage { + private String locale; + + private List uiLocales = new ArrayList<>(); + + private Optional state = Optional.empty(); + + private Optional> responseType = + Optional.empty(); + + private Optional responseMode = Optional.empty(); + + private List requestedScopes = new ArrayList<>(); + + private Optional redirectUri = Optional.empty(); + + private Optional protocol = Optional.empty(); + + private Optional> prompt = Optional.empty(); + + private Optional loginHint = Optional.empty(); + + private List acrValues = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventContextTransaction other) { + acrValues(other.getAcrValues()); + locale(other.getLocale()); + loginHint(other.getLoginHint()); + prompt(other.getPrompt()); + protocol(other.getProtocol()); + redirectUri(other.getRedirectUri()); + requestedScopes(other.getRequestedScopes()); + responseMode(other.getResponseMode()); + responseType(other.getResponseType()); + state(other.getState()); + uiLocales(other.getUiLocales()); + return this; + } + + /** + *

                                                              The locale used for this transaction.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("locale") + public _FinalStage locale(@NotNull String locale) { + this.locale = Objects.requireNonNull(locale, "locale must not be null"); + return this; + } + + /** + *

                                                              The ui_locales requested for this transaction.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllUiLocales(List uiLocales) { + if (uiLocales != null) { + this.uiLocales.addAll(uiLocales); + } + return this; + } + + /** + *

                                                              The ui_locales requested for this transaction.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addUiLocales(String uiLocales) { + this.uiLocales.add(uiLocales); + return this; + } + + /** + *

                                                              The ui_locales requested for this transaction.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "ui_locales", nulls = Nulls.SKIP) + public _FinalStage uiLocales(List uiLocales) { + this.uiLocales.clear(); + if (uiLocales != null) { + this.uiLocales.addAll(uiLocales); + } + return this; + } + + /** + *

                                                              The OAuth state parameter for this transaction.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage state(String state) { + this.state = Optional.ofNullable(state); + return this; + } + + /** + *

                                                              The OAuth state parameter for this transaction.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "state", nulls = Nulls.SKIP) + public _FinalStage state(Optional state) { + this.state = state; + return this; + } + + /** + *

                                                              The kind of credential issued by this transaction.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage responseType( + List responseType) { + this.responseType = Optional.ofNullable(responseType); + return this; + } + + /** + *

                                                              The kind of credential issued by this transaction.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "response_type", nulls = Nulls.SKIP) + public _FinalStage responseType( + Optional> responseType) { + this.responseType = responseType; + return this; + } + + @java.lang.Override + public _FinalStage responseMode(EventStreamCloudEventContextTransactionResponseModeEnum responseMode) { + this.responseMode = Optional.ofNullable(responseMode); + return this; + } + + @java.lang.Override + @JsonSetter(value = "response_mode", nulls = Nulls.SKIP) + public _FinalStage responseMode( + Optional responseMode) { + this.responseMode = responseMode; + return this; + } + + /** + *

                                                              The scopes requested.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllRequestedScopes(List requestedScopes) { + if (requestedScopes != null) { + this.requestedScopes.addAll(requestedScopes); + } + return this; + } + + /** + *

                                                              The scopes requested.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addRequestedScopes(String requestedScopes) { + this.requestedScopes.add(requestedScopes); + return this; + } + + /** + *

                                                              The scopes requested.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "requested_scopes", nulls = Nulls.SKIP) + public _FinalStage requestedScopes(List requestedScopes) { + this.requestedScopes.clear(); + if (requestedScopes != null) { + this.requestedScopes.addAll(requestedScopes); + } + return this; + } + + /** + *

                                                              The URL to which the client will be redirected when the transaction completes.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage redirectUri(String redirectUri) { + this.redirectUri = Optional.ofNullable(redirectUri); + return this; + } + + /** + *

                                                              The URL to which the client will be redirected when the transaction completes.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "redirect_uri", nulls = Nulls.SKIP) + public _FinalStage redirectUri(Optional redirectUri) { + this.redirectUri = redirectUri; + return this; + } + + @java.lang.Override + public _FinalStage protocol(EventStreamCloudEventContextTransactionProtocolEnum protocol) { + this.protocol = Optional.ofNullable(protocol); + return this; + } + + @java.lang.Override + @JsonSetter(value = "protocol", nulls = Nulls.SKIP) + public _FinalStage protocol(Optional protocol) { + this.protocol = protocol; + return this; + } + + /** + *

                                                              Instructions indicating whether the user may be prompted for re-authentication and consent.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage prompt(List prompt) { + this.prompt = Optional.ofNullable(prompt); + return this; + } + + /** + *

                                                              Instructions indicating whether the user may be prompted for re-authentication and consent.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "prompt", nulls = Nulls.SKIP) + public _FinalStage prompt(Optional> prompt) { + this.prompt = prompt; + return this; + } + + /** + *

                                                              Hint about the login identifier the user might use in this transaction.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginHint(String loginHint) { + this.loginHint = Optional.ofNullable(loginHint); + return this; + } + + /** + *

                                                              Hint about the login identifier the user might use in this transaction.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "login_hint", nulls = Nulls.SKIP) + public _FinalStage loginHint(Optional loginHint) { + this.loginHint = loginHint; + return this; + } + + /** + *

                                                              acr_values in the request.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllAcrValues(List acrValues) { + if (acrValues != null) { + this.acrValues.addAll(acrValues); + } + return this; + } + + /** + *

                                                              acr_values in the request.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAcrValues(String acrValues) { + this.acrValues.add(acrValues); + return this; + } + + /** + *

                                                              acr_values in the request.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "acr_values", nulls = Nulls.SKIP) + public _FinalStage acrValues(List acrValues) { + this.acrValues.clear(); + if (acrValues != null) { + this.acrValues.addAll(acrValues); + } + return this; + } + + @java.lang.Override + public EventStreamCloudEventContextTransaction build() { + return new EventStreamCloudEventContextTransaction( + acrValues, + locale, + loginHint, + prompt, + protocol, + redirectUri, + requestedScopes, + responseMode, + responseType, + state, + uiLocales, + 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/EventStreamCloudEventContextTransactionProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionProtocolEnum.java new file mode 100644 index 00000000..0d77b120 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionProtocolEnum.java @@ -0,0 +1,223 @@ +/** + * 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 EventStreamCloudEventContextTransactionProtocolEnum { + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2RESOURCE_OWNER_JWT_BEARER = + new EventStreamCloudEventContextTransactionProtocolEnum( + Value.OAUTH2RESOURCE_OWNER_JWT_BEARER, "oauth2-resource-owner-jwt-bearer"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OIDC_HYBRID_PROFILE = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OIDC_HYBRID_PROFILE, "oidc-hybrid-profile"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2ACCESS_TOKEN = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OAUTH2ACCESS_TOKEN, "oauth2-access-token"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2WEBAUTHN = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OAUTH2WEBAUTHN, "oauth2-webauthn"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2TOKEN_EXCHANGE = + new EventStreamCloudEventContextTransactionProtocolEnum( + Value.OAUTH2TOKEN_EXCHANGE, "oauth2-token-exchange"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2REFRESH_TOKEN = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OAUTH2REFRESH_TOKEN, "oauth2-refresh-token"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum SAMLP = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OIDC_BASIC_PROFILE = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OIDC_BASIC_PROFILE, "oidc-basic-profile"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum WSTRUST_USERNAMEMIXED = + new EventStreamCloudEventContextTransactionProtocolEnum( + Value.WSTRUST_USERNAMEMIXED, "wstrust-usernamemixed"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum WSFED = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.WSFED, "wsfed"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OIDC_IMPLICIT_PROFILE = + new EventStreamCloudEventContextTransactionProtocolEnum( + Value.OIDC_IMPLICIT_PROFILE, "oidc-implicit-profile"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2RESOURCE_OWNER = + new EventStreamCloudEventContextTransactionProtocolEnum( + Value.OAUTH2RESOURCE_OWNER, "oauth2-resource-owner"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2DEVICE_CODE = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OAUTH2DEVICE_CODE, "oauth2-device-code"); + + public static final EventStreamCloudEventContextTransactionProtocolEnum OAUTH2PASSWORD = + new EventStreamCloudEventContextTransactionProtocolEnum(Value.OAUTH2PASSWORD, "oauth2-password"); + + private final Value value; + + private final String string; + + EventStreamCloudEventContextTransactionProtocolEnum(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 EventStreamCloudEventContextTransactionProtocolEnum + && this.string.equals(((EventStreamCloudEventContextTransactionProtocolEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case OAUTH2RESOURCE_OWNER_JWT_BEARER: + return visitor.visitOauth2ResourceOwnerJwtBearer(); + case OIDC_HYBRID_PROFILE: + return visitor.visitOidcHybridProfile(); + case OAUTH2ACCESS_TOKEN: + return visitor.visitOauth2AccessToken(); + case OAUTH2WEBAUTHN: + return visitor.visitOauth2Webauthn(); + case OAUTH2TOKEN_EXCHANGE: + return visitor.visitOauth2TokenExchange(); + case OAUTH2REFRESH_TOKEN: + return visitor.visitOauth2RefreshToken(); + case SAMLP: + return visitor.visitSamlp(); + case OIDC_BASIC_PROFILE: + return visitor.visitOidcBasicProfile(); + case WSTRUST_USERNAMEMIXED: + return visitor.visitWstrustUsernamemixed(); + case WSFED: + return visitor.visitWsfed(); + case OIDC_IMPLICIT_PROFILE: + return visitor.visitOidcImplicitProfile(); + case OAUTH2RESOURCE_OWNER: + return visitor.visitOauth2ResourceOwner(); + case OAUTH2DEVICE_CODE: + return visitor.visitOauth2DeviceCode(); + case OAUTH2PASSWORD: + return visitor.visitOauth2Password(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventContextTransactionProtocolEnum valueOf(String value) { + switch (value) { + case "oauth2-resource-owner-jwt-bearer": + return OAUTH2RESOURCE_OWNER_JWT_BEARER; + case "oidc-hybrid-profile": + return OIDC_HYBRID_PROFILE; + case "oauth2-access-token": + return OAUTH2ACCESS_TOKEN; + case "oauth2-webauthn": + return OAUTH2WEBAUTHN; + case "oauth2-token-exchange": + return OAUTH2TOKEN_EXCHANGE; + case "oauth2-refresh-token": + return OAUTH2REFRESH_TOKEN; + case "samlp": + return SAMLP; + case "oidc-basic-profile": + return OIDC_BASIC_PROFILE; + case "wstrust-usernamemixed": + return WSTRUST_USERNAMEMIXED; + case "wsfed": + return WSFED; + case "oidc-implicit-profile": + return OIDC_IMPLICIT_PROFILE; + case "oauth2-resource-owner": + return OAUTH2RESOURCE_OWNER; + case "oauth2-device-code": + return OAUTH2DEVICE_CODE; + case "oauth2-password": + return OAUTH2PASSWORD; + default: + return new EventStreamCloudEventContextTransactionProtocolEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OIDC_BASIC_PROFILE, + + OIDC_IMPLICIT_PROFILE, + + OAUTH2DEVICE_CODE, + + OAUTH2RESOURCE_OWNER, + + OAUTH2RESOURCE_OWNER_JWT_BEARER, + + OAUTH2PASSWORD, + + OAUTH2WEBAUTHN, + + OAUTH2ACCESS_TOKEN, + + OAUTH2REFRESH_TOKEN, + + OAUTH2TOKEN_EXCHANGE, + + OIDC_HYBRID_PROFILE, + + SAMLP, + + WSFED, + + WSTRUST_USERNAMEMIXED, + + UNKNOWN + } + + public interface Visitor { + T visitOidcBasicProfile(); + + T visitOidcImplicitProfile(); + + T visitOauth2DeviceCode(); + + T visitOauth2ResourceOwner(); + + T visitOauth2ResourceOwnerJwtBearer(); + + T visitOauth2Password(); + + T visitOauth2Webauthn(); + + T visitOauth2AccessToken(); + + T visitOauth2RefreshToken(); + + T visitOauth2TokenExchange(); + + T visitOidcHybridProfile(); + + T visitSamlp(); + + T visitWsfed(); + + T visitWstrustUsernamemixed(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionResponseModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionResponseModeEnum.java new file mode 100644 index 00000000..17477668 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionResponseModeEnum.java @@ -0,0 +1,109 @@ +/** + * 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 EventStreamCloudEventContextTransactionResponseModeEnum { + public static final EventStreamCloudEventContextTransactionResponseModeEnum WEB_MESSAGE = + new EventStreamCloudEventContextTransactionResponseModeEnum(Value.WEB_MESSAGE, "web_message"); + + public static final EventStreamCloudEventContextTransactionResponseModeEnum QUERY = + new EventStreamCloudEventContextTransactionResponseModeEnum(Value.QUERY, "query"); + + public static final EventStreamCloudEventContextTransactionResponseModeEnum FRAGMENT = + new EventStreamCloudEventContextTransactionResponseModeEnum(Value.FRAGMENT, "fragment"); + + public static final EventStreamCloudEventContextTransactionResponseModeEnum FORM_POST = + new EventStreamCloudEventContextTransactionResponseModeEnum(Value.FORM_POST, "form_post"); + + private final Value value; + + private final String string; + + EventStreamCloudEventContextTransactionResponseModeEnum(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 EventStreamCloudEventContextTransactionResponseModeEnum + && this.string.equals( + ((EventStreamCloudEventContextTransactionResponseModeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case WEB_MESSAGE: + return visitor.visitWebMessage(); + case QUERY: + return visitor.visitQuery(); + case FRAGMENT: + return visitor.visitFragment(); + case FORM_POST: + return visitor.visitFormPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventContextTransactionResponseModeEnum valueOf(String value) { + switch (value) { + case "web_message": + return WEB_MESSAGE; + case "query": + return QUERY; + case "fragment": + return FRAGMENT; + case "form_post": + return FORM_POST; + default: + return new EventStreamCloudEventContextTransactionResponseModeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + QUERY, + + FRAGMENT, + + FORM_POST, + + WEB_MESSAGE, + + UNKNOWN + } + + public interface Visitor { + T visitQuery(); + + T visitFragment(); + + T visitFormPost(); + + T visitWebMessage(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionResponseTypeItemEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionResponseTypeItemEnum.java new file mode 100644 index 00000000..cae74688 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventContextTransactionResponseTypeItemEnum.java @@ -0,0 +1,98 @@ +/** + * 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 EventStreamCloudEventContextTransactionResponseTypeItemEnum { + public static final EventStreamCloudEventContextTransactionResponseTypeItemEnum ID_TOKEN = + new EventStreamCloudEventContextTransactionResponseTypeItemEnum(Value.ID_TOKEN, "id_token"); + + public static final EventStreamCloudEventContextTransactionResponseTypeItemEnum TOKEN = + new EventStreamCloudEventContextTransactionResponseTypeItemEnum(Value.TOKEN, "token"); + + public static final EventStreamCloudEventContextTransactionResponseTypeItemEnum CODE = + new EventStreamCloudEventContextTransactionResponseTypeItemEnum(Value.CODE, "code"); + + private final Value value; + + private final String string; + + EventStreamCloudEventContextTransactionResponseTypeItemEnum(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 EventStreamCloudEventContextTransactionResponseTypeItemEnum + && this.string.equals( + ((EventStreamCloudEventContextTransactionResponseTypeItemEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ID_TOKEN: + return visitor.visitIdToken(); + case TOKEN: + return visitor.visitToken(); + case CODE: + return visitor.visitCode(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventContextTransactionResponseTypeItemEnum valueOf(String value) { + switch (value) { + case "id_token": + return ID_TOKEN; + case "token": + return TOKEN; + case "code": + return CODE; + default: + return new EventStreamCloudEventContextTransactionResponseTypeItemEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CODE, + + TOKEN, + + ID_TOKEN, + + UNKNOWN + } + + public interface Visitor { + T visitCode(); + + T visitToken(); + + T visitIdToken(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java index 83f28b30..ceb58c98 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventErrorDetail.java @@ -147,7 +147,6 @@ public MessageStage code(@NotNull EventStreamCloudEventErrorCodeEnum code) { } /** - *

                                                              Human-readable error message.

                                                              *

                                                              Human-readable error message.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java index 14f8faa0..70bc062e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreated.java @@ -116,7 +116,6 @@ public Builder from(EventStreamCloudEventGroupCreated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java index 2074d415..94a63180 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupCreatedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupCreatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupCreatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupCreatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupCreatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupCreatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupCreatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupCreatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupCreatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupCreatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupCreatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupCreatedCloudEventType } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupCreatedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupCreatedCloudEvent build() { return new EventStreamCloudEventGroupCreatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java index 166413eb..37445c0b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupCreatedData { private final EventStreamCloudEventGroupCreatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupCreatedData( EventStreamCloudEventGroupCreatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupCreatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupCreatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupCreatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupCreatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupCreatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupCreatedData build() { - return new EventStreamCloudEventGroupCreatedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupCreatedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java index bdf7ff22..87b2edaf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject0.java @@ -214,7 +214,6 @@ public Builder from(EventStreamCloudEventGroupCreatedObject0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -226,7 +225,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -238,7 +236,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -257,7 +254,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupCreatedObject0T } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java index a62b38b4..f800eaa1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject1.java @@ -214,7 +214,6 @@ public Builder from(EventStreamCloudEventGroupCreatedObject1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -226,7 +225,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -238,7 +236,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -257,7 +254,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupCreatedObject } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java index e4ba9cce..e6ee8d6d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedObject2.java @@ -190,7 +190,6 @@ public Builder from(EventStreamCloudEventGroupCreatedObject2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -202,7 +201,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -214,7 +212,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject.java new file mode 100644 index 00000000..bd1a0ec9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject.java @@ -0,0 +1,136 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupCreatedPreviousObject.Deserializer.class) +public final class EventStreamCloudEventGroupCreatedPreviousObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupCreatedPreviousObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupCreatedPreviousObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupCreatedPreviousObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupCreatedPreviousObject2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedPreviousObject + && equalTo((EventStreamCloudEventGroupCreatedPreviousObject) other); + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedPreviousObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupCreatedPreviousObject of( + EventStreamCloudEventGroupCreatedPreviousObject0 value) { + return new EventStreamCloudEventGroupCreatedPreviousObject(value, 0); + } + + public static EventStreamCloudEventGroupCreatedPreviousObject of( + EventStreamCloudEventGroupCreatedPreviousObject1 value) { + return new EventStreamCloudEventGroupCreatedPreviousObject(value, 1); + } + + public static EventStreamCloudEventGroupCreatedPreviousObject of( + EventStreamCloudEventGroupCreatedPreviousObject2 value) { + return new EventStreamCloudEventGroupCreatedPreviousObject(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupCreatedPreviousObject0 value); + + T visit(EventStreamCloudEventGroupCreatedPreviousObject1 value); + + T visit(EventStreamCloudEventGroupCreatedPreviousObject2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupCreatedPreviousObject.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedPreviousObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupCreatedPreviousObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupCreatedPreviousObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupCreatedPreviousObject2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject0.java new file mode 100644 index 00000000..e7259dd8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject0.java @@ -0,0 +1,305 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedPreviousObject0.Builder.class) +public final class EventStreamCloudEventGroupCreatedPreviousObject0 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedPreviousObject0( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedPreviousObject0 + && equalTo((EventStreamCloudEventGroupCreatedPreviousObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedPreviousObject0 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupCreatedPreviousObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedPreviousObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedPreviousObject0 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedPreviousObject0 build() { + return new EventStreamCloudEventGroupCreatedPreviousObject0( + id, name, externalId, createdAt, type, connectionId, 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/EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum.java new file mode 100644 index 00000000..741a6fb5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum { + public static final EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum CONNECTION = + new EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum(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 EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupCreatedPreviousObject0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject1.java new file mode 100644 index 00000000..34e4e313 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject1.java @@ -0,0 +1,305 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedPreviousObject1.Builder.class) +public final class EventStreamCloudEventGroupCreatedPreviousObject1 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedPreviousObject1( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedPreviousObject1 + && equalTo((EventStreamCloudEventGroupCreatedPreviousObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedPreviousObject1 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupCreatedPreviousObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedPreviousObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedPreviousObject1 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedPreviousObject1 build() { + return new EventStreamCloudEventGroupCreatedPreviousObject1( + id, name, externalId, createdAt, type, organizationId, 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/EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum.java new file mode 100644 index 00000000..dc09c8b0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum { + public static final EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum(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 EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupCreatedPreviousObject1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject2.java new file mode 100644 index 00000000..735c21b3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject2.java @@ -0,0 +1,270 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupCreatedPreviousObject2.Builder.class) +public final class EventStreamCloudEventGroupCreatedPreviousObject2 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupCreatedPreviousObject2( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupCreatedPreviousObject2 + && equalTo((EventStreamCloudEventGroupCreatedPreviousObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupCreatedPreviousObject2 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupCreatedPreviousObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupCreatedPreviousObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, CreatedAtStage, TypeStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupCreatedPreviousObject2 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupCreatedPreviousObject2 build() { + return new EventStreamCloudEventGroupCreatedPreviousObject2( + id, name, externalId, createdAt, type, 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/EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum.java new file mode 100644 index 00000000..ceb5ebea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum { + public static final EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum TENANT = + new EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum(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 EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupCreatedPreviousObject2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java index a73906a6..764aa631 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeleted.java @@ -116,7 +116,6 @@ public Builder from(EventStreamCloudEventGroupDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java index f82090ff..b0ec594d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupDeletedCloudEventType } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupDeletedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupDeletedCloudEvent build() { return new EventStreamCloudEventGroupDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java index 22efcaaf..24040ee6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupDeletedData { private final EventStreamCloudEventGroupDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupDeletedData( EventStreamCloudEventGroupDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupDeletedData build() { - return new EventStreamCloudEventGroupDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupDeletedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java index 8dff4b98..c3d6f6ab 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject0.java @@ -238,7 +238,6 @@ public Builder from(EventStreamCloudEventGroupDeletedObject0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +249,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +260,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -281,7 +278,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupDeletedObject0T } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -293,7 +289,6 @@ public UpdatedAtStage connectionId(@NotNull String connectionId) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java index dc8d0009..757518c3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject1.java @@ -238,7 +238,6 @@ public Builder from(EventStreamCloudEventGroupDeletedObject1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +249,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +260,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -281,7 +278,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupDeletedObject } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -293,7 +289,6 @@ public UpdatedAtStage organizationId(@NotNull String organizationId) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java index e482dc4d..dfeb83ba 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedObject2.java @@ -214,7 +214,6 @@ public Builder from(EventStreamCloudEventGroupDeletedObject2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -226,7 +225,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -238,7 +236,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -257,7 +254,6 @@ public UpdatedAtStage type(@NotNull EventStreamCloudEventGroupDeletedObject2Type } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject.java new file mode 100644 index 00000000..6a54c828 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupDeletedPreviousObject.Deserializer.class) +public final class EventStreamCloudEventGroupDeletedPreviousObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupDeletedPreviousObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupDeletedPreviousObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupDeletedPreviousObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupDeletedPreviousObject2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedPreviousObject + && equalTo((EventStreamCloudEventGroupDeletedPreviousObject) other); + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedPreviousObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupDeletedPreviousObject of( + EventStreamCloudEventGroupDeletedPreviousObject0 value) { + return new EventStreamCloudEventGroupDeletedPreviousObject(value, 0); + } + + public static EventStreamCloudEventGroupDeletedPreviousObject of( + EventStreamCloudEventGroupDeletedPreviousObject1 value) { + return new EventStreamCloudEventGroupDeletedPreviousObject(value, 1); + } + + public static EventStreamCloudEventGroupDeletedPreviousObject of( + EventStreamCloudEventGroupDeletedPreviousObject2 value) { + return new EventStreamCloudEventGroupDeletedPreviousObject(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupDeletedPreviousObject0 value); + + T visit(EventStreamCloudEventGroupDeletedPreviousObject1 value); + + T visit(EventStreamCloudEventGroupDeletedPreviousObject2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupDeletedPreviousObject.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedPreviousObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupDeletedPreviousObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupDeletedPreviousObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupDeletedPreviousObject2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject0.java new file mode 100644 index 00000000..cb3b41a4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject0.java @@ -0,0 +1,340 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedPreviousObject0.Builder.class) +public final class EventStreamCloudEventGroupDeletedPreviousObject0 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum type; + + private final String connectionId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedPreviousObject0( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum type, + String connectionId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.connectionId = connectionId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedPreviousObject0 + && equalTo((EventStreamCloudEventGroupDeletedPreviousObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedPreviousObject0 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && connectionId.equals(other.connectionId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.connectionId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupDeletedPreviousObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + UpdatedAtStage connectionId(@NotNull String connectionId); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedPreviousObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, ConnectionIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum type; + + private String connectionId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedPreviousObject0 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + connectionId(other.getConnectionId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public UpdatedAtStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedPreviousObject0 build() { + return new EventStreamCloudEventGroupDeletedPreviousObject0( + id, name, externalId, createdAt, type, connectionId, 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/EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum.java new file mode 100644 index 00000000..a77fac18 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum { + public static final EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum CONNECTION = + new EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum(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 EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupDeletedPreviousObject0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject1.java new file mode 100644 index 00000000..48536aed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject1.java @@ -0,0 +1,340 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedPreviousObject1.Builder.class) +public final class EventStreamCloudEventGroupDeletedPreviousObject1 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum type; + + private final String organizationId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedPreviousObject1( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum type, + String organizationId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.organizationId = organizationId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedPreviousObject1 + && equalTo((EventStreamCloudEventGroupDeletedPreviousObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedPreviousObject1 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && organizationId.equals(other.organizationId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.organizationId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupDeletedPreviousObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + UpdatedAtStage organizationId(@NotNull String organizationId); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedPreviousObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, OrganizationIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum type; + + private String organizationId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedPreviousObject1 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + organizationId(other.getOrganizationId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public UpdatedAtStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedPreviousObject1 build() { + return new EventStreamCloudEventGroupDeletedPreviousObject1( + id, name, externalId, createdAt, type, organizationId, 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/EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum.java new file mode 100644 index 00000000..990ef4ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum { + public static final EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum(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 EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupDeletedPreviousObject1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject2.java new file mode 100644 index 00000000..41d5d1df --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject2.java @@ -0,0 +1,305 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupDeletedPreviousObject2.Builder.class) +public final class EventStreamCloudEventGroupDeletedPreviousObject2 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum type; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupDeletedPreviousObject2( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum type, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum getType() { + return type; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupDeletedPreviousObject2 + && equalTo((EventStreamCloudEventGroupDeletedPreviousObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupDeletedPreviousObject2 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupDeletedPreviousObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + UpdatedAtStage type(@NotNull EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum type); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupDeletedPreviousObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum type; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupDeletedPreviousObject2 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public UpdatedAtStage type(@NotNull EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupDeletedPreviousObject2 build() { + return new EventStreamCloudEventGroupDeletedPreviousObject2( + id, name, externalId, createdAt, type, 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/EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum.java new file mode 100644 index 00000000..409291f5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum { + public static final EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum TENANT = + new EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum(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 EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupDeletedPreviousObject2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java index b9a09c15..794df3cc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAdded.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventGroupMemberAdded other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java index c0489f42..3d77e576 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupMemberAddedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupMemberAddedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupMemberAddedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupMemberAddedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupMemberAddedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupMemberAddedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupMemberAddedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupMemberAddedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupMemberAddedCloudEvent } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupMemberAddedData dat } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupMemberAddedCloudEvent build() { return new EventStreamCloudEventGroupMemberAddedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java index 30580b80..f60f96b0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupMemberAddedData { private final EventStreamCloudEventGroupMemberAddedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupMemberAddedData( EventStreamCloudEventGroupMemberAddedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupMemberAddedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupMemberAddedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupMemberAddedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupMemberAddedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,23 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupMemberAddedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupMemberAddedData build() { - return new EventStreamCloudEventGroupMemberAddedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupMemberAddedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java index 1fccd52f..aaf0440a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup0.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedObje } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java index fc088710..6281ee7b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup1.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedOb } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java index 19e26153..b3c985db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectGroup2.java @@ -141,7 +141,6 @@ public Builder from(EventStreamCloudEventGroupMemberAddedObjectGroup2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java index 7433827f..ebe073ec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember0.java @@ -125,7 +125,6 @@ public IdStage memberType( } /** - *

                                                              The user's unique identifier

                                                              *

                                                              The user's unique identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java index e660fce3..4a6f2a96 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedObjectMember1.java @@ -172,7 +172,6 @@ public IdStage memberType( } /** - *

                                                              The connection member's unique identifier

                                                              *

                                                              The connection member's unique identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -184,7 +183,6 @@ public TypeStage id(@NotNull String id) { } /** - *

                                                              The type of the connection

                                                              *

                                                              The type of the connection

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -196,7 +194,6 @@ public ConnectionIdStage type(@NotNull String type) { } /** - *

                                                              Connection ID associated with the member

                                                              *

                                                              Connection ID associated with the member

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObject.java new file mode 100644 index 00000000..978b8a20 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObject.java @@ -0,0 +1,144 @@ +/** + * 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 = EventStreamCloudEventGroupMemberAddedPreviousObject.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObject { + private final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup group; + + private final EventStreamCloudEventGroupMemberAddedPreviousObjectMember member; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedPreviousObject( + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup group, + EventStreamCloudEventGroupMemberAddedPreviousObjectMember member, + Map additionalProperties) { + this.group = group; + this.member = member; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup getGroup() { + return group; + } + + @JsonProperty("member") + public EventStreamCloudEventGroupMemberAddedPreviousObjectMember getMember() { + return member; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObject + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObject other) { + return group.equals(other.group) && member.equals(other.member); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.member); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + MemberStage group(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup group); + + Builder from(EventStreamCloudEventGroupMemberAddedPreviousObject other); + } + + public interface MemberStage { + _FinalStage member(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectMember member); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, MemberStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup group; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectMember member; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedPreviousObject other) { + group(other.getGroup()); + member(other.getMember()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public MemberStage group(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("member") + public _FinalStage member(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectMember member) { + this.member = Objects.requireNonNull(member, "member must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObject build() { + return new EventStreamCloudEventGroupMemberAddedPreviousObject(group, member, 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/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup.java new file mode 100644 index 00000000..967a2c97 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberAddedPreviousObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectGroup + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberAddedPreviousObjectGroup of( + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 value) { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupMemberAddedPreviousObjectGroup of( + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 value) { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupMemberAddedPreviousObjectGroup of( + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 value) { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 value); + + T visit(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 value); + + T visit(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0.java new file mode 100644 index 00000000..45c7364a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0.java @@ -0,0 +1,235 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0 build() { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0( + id, externalId, type, connectionId, 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/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum.java new file mode 100644 index 00000000..0774f345 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum(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 EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1.java new file mode 100644 index 00000000..d8c56942 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type( + @NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1 build() { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1( + id, externalId, type, organizationId, 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/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum.java new file mode 100644 index 00000000..aa8c9b61 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum(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 EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2.java new file mode 100644 index 00000000..93ab5a19 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2 build() { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2( + id, externalId, type, 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/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum.java new file mode 100644 index 00000000..b04a340c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum(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 EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupMemberAddedPreviousObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember.java new file mode 100644 index 00000000..3689342b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember.java @@ -0,0 +1,112 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberAddedPreviousObjectMember.Deserializer.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectMember { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectMember(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedPreviousObjectMember0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberAddedPreviousObjectMember1) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectMember + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectMember) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectMember other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberAddedPreviousObjectMember of( + EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 value) { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectMember(value, 0); + } + + public static EventStreamCloudEventGroupMemberAddedPreviousObjectMember of( + EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 value) { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectMember(value, 1); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 value); + + T visit(EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberAddedPreviousObjectMember.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectMember deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedPreviousObjectMember0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberAddedPreviousObjectMember1.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember0.java new file mode 100644 index 00000000..5e6d0c6a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember0.java @@ -0,0 +1,156 @@ +/** + * 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 = EventStreamCloudEventGroupMemberAddedPreviousObjectMember0.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 { + private final EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum memberType; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectMember0( + EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum memberType, + String id, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The user's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectMember0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 other) { + return memberType.equals(other.memberType) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 other); + } + + public interface IdStage { + /** + *

                                                              The user's unique identifier

                                                              + */ + _FinalStage id(@NotNull String id); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum memberType; + + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 other) { + memberType(other.getMemberType()); + id(other.getId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

                                                              The user's unique identifier

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectMember0 build() { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectMember0(memberType, id, 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/EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum.java new file mode 100644 index 00000000..52bbd0a0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum.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 EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum USER = + new EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum(Value.USER, "user"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum(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 EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER: + return visitor.visitUser(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum valueOf(String value) { + switch (value) { + case "user": + return USER; + default: + return new EventStreamCloudEventGroupMemberAddedPreviousObjectMember0MemberTypeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + USER, + + UNKNOWN + } + + public interface Visitor { + T visitUser(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember1.java new file mode 100644 index 00000000..0ffd634f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember1.java @@ -0,0 +1,226 @@ +/** + * 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 = EventStreamCloudEventGroupMemberAddedPreviousObjectMember1.Builder.class) +public final class EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 { + private final EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum memberType; + + private final String id; + + private final String type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberAddedPreviousObjectMember1( + EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum memberType, + String id, + String type, + String connectionId, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The connection member's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The type of the connection + */ + @JsonProperty("type") + public String getType() { + return type; + } + + /** + * @return Connection ID associated with the member + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 + && equalTo((EventStreamCloudEventGroupMemberAddedPreviousObjectMember1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 other) { + return memberType.equals(other.memberType) + && id.equals(other.id) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 other); + } + + public interface IdStage { + /** + *

                                                              The connection member's unique identifier

                                                              + */ + TypeStage id(@NotNull String id); + } + + public interface TypeStage { + /** + *

                                                              The type of the connection

                                                              + */ + ConnectionIdStage type(@NotNull String type); + } + + public interface ConnectionIdStage { + /** + *

                                                              Connection ID associated with the member

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum memberType; + + private String id; + + private String type; + + private String connectionId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 other) { + memberType(other.getMemberType()); + id(other.getId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

                                                              The connection member's unique identifier

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The type of the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull String type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              Connection ID associated with the member

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberAddedPreviousObjectMember1 build() { + return new EventStreamCloudEventGroupMemberAddedPreviousObjectMember1( + memberType, id, type, connectionId, 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/EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum.java new file mode 100644 index 00000000..b3df5b01 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum.java @@ -0,0 +1,79 @@ +/** + * 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 EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum( + Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum(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 EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberAddedPreviousObjectMember1MemberTypeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java index 90c510ef..a35f59e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeleted.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventGroupMemberDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java index 0df4b6ed..7fa2b343 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupMemberDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupMemberDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupMemberDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupMemberDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupMemberDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupMemberDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupMemberDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupMemberDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupMemberDeletedCloudEve } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupMemberDeletedData d } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupMemberDeletedCloudEvent build() { return new EventStreamCloudEventGroupMemberDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java index 98e743bb..78da18ba 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupMemberDeletedData { private final EventStreamCloudEventGroupMemberDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupMemberDeletedData( EventStreamCloudEventGroupMemberDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupMemberDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupMemberDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupMemberDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupMemberDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupMemberDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupMemberDeletedData build() { - return new EventStreamCloudEventGroupMemberDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupMemberDeletedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java index fa1b9252..221d83c3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup0.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedOb } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java index 0dae6da8..27223e03 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup1.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberDeleted } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java index 6a62c78c..d15b639c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectGroup2.java @@ -141,7 +141,6 @@ public Builder from(EventStreamCloudEventGroupMemberDeletedObjectGroup2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java index e0f9f6e4..d6bb04d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember0.java @@ -125,7 +125,6 @@ public IdStage memberType( } /** - *

                                                              The user's unique identifier

                                                              *

                                                              The user's unique identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java index 9258b796..e7b3e6c0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedObjectMember1.java @@ -172,7 +172,6 @@ public IdStage memberType( } /** - *

                                                              The connection member's unique identifier

                                                              *

                                                              The connection member's unique identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -184,7 +183,6 @@ public TypeStage id(@NotNull String id) { } /** - *

                                                              The type of the connection

                                                              *

                                                              The type of the connection

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -196,7 +194,6 @@ public ConnectionIdStage type(@NotNull String type) { } /** - *

                                                              Connection ID associated with the member

                                                              *

                                                              Connection ID associated with the member

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObject.java new file mode 100644 index 00000000..4ab7c0b8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObject.java @@ -0,0 +1,144 @@ +/** + * 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 = EventStreamCloudEventGroupMemberDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObject { + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup group; + + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectMember member; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedPreviousObject( + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup group, + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember member, + Map additionalProperties) { + this.group = group; + this.member = member; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup getGroup() { + return group; + } + + @JsonProperty("member") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectMember getMember() { + return member; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObject + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObject other) { + return group.equals(other.group) && member.equals(other.member); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.member); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + MemberStage group(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup group); + + Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObject other); + } + + public interface MemberStage { + _FinalStage member(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectMember member); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, MemberStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup group; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectMember member; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObject other) { + group(other.getGroup()); + member(other.getMember()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public MemberStage group(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("member") + public _FinalStage member(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectMember member) { + this.member = Objects.requireNonNull(member, "member must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObject build() { + return new EventStreamCloudEventGroupMemberDeletedPreviousObject(group, member, 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/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup.java new file mode 100644 index 00000000..45b63e67 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup of( + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 value) { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup of( + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 value) { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup of( + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 value) { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 value); + + T visit(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 value); + + T visit(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0.java new file mode 100644 index 00000000..621b7535 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type( + @NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0 build() { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0( + id, externalId, type, connectionId, 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/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum.java new file mode 100644 index 00000000..77b7efb6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum(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 EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1.java new file mode 100644 index 00000000..577035c7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type( + @NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1 build() { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1( + id, externalId, type, organizationId, 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/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum.java new file mode 100644 index 00000000..7a335699 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum(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 EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2.java new file mode 100644 index 00000000..b40c5a4a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2 build() { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2( + id, externalId, type, 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/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum.java new file mode 100644 index 00000000..ccd0e84b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum(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 EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember.java new file mode 100644 index 00000000..0242313a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember.java @@ -0,0 +1,113 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupMemberDeletedPreviousObjectMember.Deserializer.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectMember { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectMember(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectMember + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember) other); + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectMember of( + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 value) { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember(value, 0); + } + + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectMember of( + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 value) { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember(value, 1); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 value); + + T visit(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectMember deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("member_type") + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0.java new file mode 100644 index 00000000..fa0dabf4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0.java @@ -0,0 +1,157 @@ +/** + * 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 = EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 { + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum memberType; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0( + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum memberType, + String id, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The user's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 other) { + return memberType.equals(other.memberType) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 other); + } + + public interface IdStage { + /** + *

                                                              The user's unique identifier

                                                              + */ + _FinalStage id(@NotNull String id); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum memberType; + + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 other) { + memberType(other.getMemberType()); + id(other.getId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

                                                              The user's unique identifier

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0 build() { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0( + memberType, id, 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/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum.java new file mode 100644 index 00000000..b6649007 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum.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 EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum USER = + new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum(Value.USER, "user"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum(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 EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case USER: + return visitor.visitUser(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum valueOf(String value) { + switch (value) { + case "user": + return USER; + default: + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember0MemberTypeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + USER, + + UNKNOWN + } + + public interface Visitor { + T visitUser(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1.java new file mode 100644 index 00000000..035ad840 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1.java @@ -0,0 +1,226 @@ +/** + * 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 = EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1.Builder.class) +public final class EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 { + private final EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum memberType; + + private final String id; + + private final String type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1( + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum memberType, + String id, + String type, + String connectionId, + Map additionalProperties) { + this.memberType = memberType; + this.id = id; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("member_type") + public EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum getMemberType() { + return memberType; + } + + /** + * @return The connection member's unique identifier + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The type of the connection + */ + @JsonProperty("type") + public String getType() { + return type; + } + + /** + * @return Connection ID associated with the member + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 + && equalTo((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 other) { + return memberType.equals(other.memberType) + && id.equals(other.id) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.memberType, this.id, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MemberTypeStage builder() { + return new Builder(); + } + + public interface MemberTypeStage { + IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum memberType); + + Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 other); + } + + public interface IdStage { + /** + *

                                                              The connection member's unique identifier

                                                              + */ + TypeStage id(@NotNull String id); + } + + public interface TypeStage { + /** + *

                                                              The type of the connection

                                                              + */ + ConnectionIdStage type(@NotNull String type); + } + + public interface ConnectionIdStage { + /** + *

                                                              Connection ID associated with the member

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MemberTypeStage, IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum memberType; + + private String id; + + private String type; + + private String connectionId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 other) { + memberType(other.getMemberType()); + id(other.getId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + @java.lang.Override + @JsonSetter("member_type") + public IdStage memberType( + @NotNull EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum memberType) { + this.memberType = Objects.requireNonNull(memberType, "memberType must not be null"); + return this; + } + + /** + *

                                                              The connection member's unique identifier

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The type of the connection

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull String type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              Connection ID associated with the member

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1 build() { + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1( + memberType, id, type, connectionId, 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/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum.java new file mode 100644 index 00000000..97eb8cb2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum.java @@ -0,0 +1,79 @@ +/** + * 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 EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum { + public static final EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum CONNECTION = + new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum( + Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum(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 EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupMemberDeletedPreviousObjectMember1MemberTypeEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java index ef74a3fb..60fe4198 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssigned.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventGroupRoleAssigned other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java index 15157990..130a19ed 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupRoleAssignedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupRoleAssignedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupRoleAssignedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupRoleAssignedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupRoleAssignedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupRoleAssignedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupRoleAssignedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupRoleAssignedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupRoleAssignedCloudEven } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupRoleAssignedData da } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupRoleAssignedCloudEvent build() { return new EventStreamCloudEventGroupRoleAssignedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java index f5996e55..04586653 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupRoleAssignedData { private final EventStreamCloudEventGroupRoleAssignedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupRoleAssignedData( EventStreamCloudEventGroupRoleAssignedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupRoleAssignedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupRoleAssignedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupRoleAssignedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupRoleAssignedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupRoleAssignedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupRoleAssignedData build() { - return new EventStreamCloudEventGroupRoleAssignedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupRoleAssignedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java index 8ad51d5f..6f5c21f1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObject.java @@ -148,7 +148,6 @@ public CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleAssignedObject } /** - *

                                                              The time at which the role was assigned to the group.

                                                              *

                                                              The time at which the role was assigned to the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java index 57512718..36a022ed 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup0.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedObj } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java index 94584d80..b7a708ab 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup1.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedO } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java index c6df4222..e98492b7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectGroup2.java @@ -141,7 +141,6 @@ public Builder from(EventStreamCloudEventGroupRoleAssignedObjectGroup2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java index b28d6d65..5ec55910 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedObjectRole.java @@ -121,7 +121,6 @@ public Builder from(EventStreamCloudEventGroupRoleAssignedObjectRole other) { } /** - *

                                                              The ID of the role.

                                                              *

                                                              The ID of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the role.

                                                              *

                                                              The name of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObject.java new file mode 100644 index 00000000..ba747dfe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObject.java @@ -0,0 +1,179 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedPreviousObject.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedPreviousObject { + private final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup group; + + private final EventStreamCloudEventGroupRoleAssignedPreviousObjectRole role; + + private final OffsetDateTime createdAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedPreviousObject( + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup group, + EventStreamCloudEventGroupRoleAssignedPreviousObjectRole role, + OffsetDateTime createdAt, + Map additionalProperties) { + this.group = group; + this.role = role; + this.createdAt = createdAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup getGroup() { + return group; + } + + @JsonProperty("role") + public EventStreamCloudEventGroupRoleAssignedPreviousObjectRole getRole() { + return role; + } + + /** + * @return The time at which the role was assigned to the group. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedPreviousObject + && equalTo((EventStreamCloudEventGroupRoleAssignedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedPreviousObject other) { + return group.equals(other.group) && role.equals(other.role) && createdAt.equals(other.createdAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.role, this.createdAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + RoleStage group(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup group); + + Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObject other); + } + + public interface RoleStage { + CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectRole role); + } + + public interface CreatedAtStage { + /** + *

                                                              The time at which the role was assigned to the group.

                                                              + */ + _FinalStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, RoleStage, CreatedAtStage, _FinalStage { + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup group; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectRole role; + + private OffsetDateTime createdAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObject other) { + group(other.getGroup()); + role(other.getRole()); + createdAt(other.getCreatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public RoleStage group(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + /** + *

                                                              The time at which the role was assigned to the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedPreviousObject build() { + return new EventStreamCloudEventGroupRoleAssignedPreviousObject( + group, role, createdAt, 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/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup.java new file mode 100644 index 00000000..fa5c65ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup + && equalTo((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup of( + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 value) { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup of( + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 value) { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup of( + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 value) { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 value); + + T visit(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 value); + + T visit(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0.java new file mode 100644 index 00000000..000e7e02 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 + && equalTo((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type( + @NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0 build() { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0( + id, externalId, type, connectionId, 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/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum.java new file mode 100644 index 00000000..7031474d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum(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 EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1.java new file mode 100644 index 00000000..24626d25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 + && equalTo((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type( + @NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1 build() { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1( + id, externalId, type, organizationId, 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/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum.java new file mode 100644 index 00000000..44027458 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum(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 EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2.java new file mode 100644 index 00000000..a5d7733e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 + && equalTo((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2 build() { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2( + id, externalId, type, 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/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum.java new file mode 100644 index 00000000..011079f1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum(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 EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectRole.java new file mode 100644 index 00000000..2fd068b3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleAssignedPreviousObjectRole.java @@ -0,0 +1,162 @@ +/** + * 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 = EventStreamCloudEventGroupRoleAssignedPreviousObjectRole.Builder.class) +public final class EventStreamCloudEventGroupRoleAssignedPreviousObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleAssignedPreviousObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleAssignedPreviousObjectRole + && equalTo((EventStreamCloudEventGroupRoleAssignedPreviousObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleAssignedPreviousObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the role.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectRole other); + } + + public interface NameStage { + /** + *

                                                              The name of the role.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleAssignedPreviousObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleAssignedPreviousObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

                                                              The ID of the role.

                                                              + * @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; + } + + /** + *

                                                              The name of the role.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleAssignedPreviousObjectRole build() { + return new EventStreamCloudEventGroupRoleAssignedPreviousObjectRole(id, name, 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/EventStreamCloudEventGroupRoleDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java index d54b1110..547020fa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeleted.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventGroupRoleDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java index 8d2d1068..33c74131 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupRoleDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupRoleDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupRoleDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupRoleDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupRoleDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupRoleDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupRoleDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupRoleDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupRoleDeletedCloudEvent } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupRoleDeletedData dat } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupRoleDeletedCloudEvent build() { return new EventStreamCloudEventGroupRoleDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java index 71069b3a..3001d841 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupRoleDeletedData { private final EventStreamCloudEventGroupRoleDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupRoleDeletedData( EventStreamCloudEventGroupRoleDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupRoleDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupRoleDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupRoleDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupRoleDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,23 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupRoleDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupRoleDeletedData build() { - return new EventStreamCloudEventGroupRoleDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupRoleDeletedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java index 45d18c05..49fe8e51 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObject.java @@ -148,7 +148,6 @@ public DeletedAtStage role(@NotNull EventStreamCloudEventGroupRoleDeletedObjectR } /** - *

                                                              The time at which the role was removed from the group.

                                                              *

                                                              The time at which the role was removed from the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java index 045bdaf4..491dbe49 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup0.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedObje } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java index ff9f9c45..269e2d76 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup1.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedOb } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java index a778d6d4..06b8bc34 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectGroup2.java @@ -141,7 +141,6 @@ public Builder from(EventStreamCloudEventGroupRoleDeletedObjectGroup2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java index 47abba57..ceecf1b5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedObjectRole.java @@ -99,7 +99,6 @@ public Builder from(EventStreamCloudEventGroupRoleDeletedObjectRole other) { } /** - *

                                                              The ID of the role.

                                                              *

                                                              The ID of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObject.java new file mode 100644 index 00000000..3eeffb25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObject.java @@ -0,0 +1,179 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedPreviousObject { + private final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup group; + + private final EventStreamCloudEventGroupRoleDeletedPreviousObjectRole role; + + private final OffsetDateTime createdAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedPreviousObject( + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup group, + EventStreamCloudEventGroupRoleDeletedPreviousObjectRole role, + OffsetDateTime createdAt, + Map additionalProperties) { + this.group = group; + this.role = role; + this.createdAt = createdAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("group") + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup getGroup() { + return group; + } + + @JsonProperty("role") + public EventStreamCloudEventGroupRoleDeletedPreviousObjectRole getRole() { + return role; + } + + /** + * @return The time at which the role was assigned to the group. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedPreviousObject + && equalTo((EventStreamCloudEventGroupRoleDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedPreviousObject other) { + return group.equals(other.group) && role.equals(other.role) && createdAt.equals(other.createdAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.group, this.role, this.createdAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static GroupStage builder() { + return new Builder(); + } + + public interface GroupStage { + RoleStage group(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup group); + + Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObject other); + } + + public interface RoleStage { + CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectRole role); + } + + public interface CreatedAtStage { + /** + *

                                                              The time at which the role was assigned to the group.

                                                              + */ + _FinalStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements GroupStage, RoleStage, CreatedAtStage, _FinalStage { + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup group; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectRole role; + + private OffsetDateTime createdAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObject other) { + group(other.getGroup()); + role(other.getRole()); + createdAt(other.getCreatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public RoleStage group(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public CreatedAtStage role(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + /** + *

                                                              The time at which the role was assigned to the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedPreviousObject build() { + return new EventStreamCloudEventGroupRoleDeletedPreviousObject( + group, role, createdAt, 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/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup.java new file mode 100644 index 00000000..a70ff4a9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup.Deserializer.class) +public final class EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup + && equalTo((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup of( + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 value) { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup(value, 0); + } + + public static EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup of( + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 value) { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup(value, 1); + } + + public static EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup of( + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 value) { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 value); + + T visit(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 value); + + T visit(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0.java new file mode 100644 index 00000000..5fd55ac4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0.java @@ -0,0 +1,235 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 + && equalTo((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0 build() { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0( + id, externalId, type, connectionId, 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/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum.java new file mode 100644 index 00000000..e1a8bc1b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum(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 EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1.java new file mode 100644 index 00000000..7fc33709 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 + && equalTo((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type( + @NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1 build() { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1( + id, externalId, type, organizationId, 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/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum.java new file mode 100644 index 00000000..f33f26e6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum(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 EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2.java new file mode 100644 index 00000000..9eed73ce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 + && equalTo((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2 build() { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2( + id, externalId, type, 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/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum.java new file mode 100644 index 00000000..50579796 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum { + public static final EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum(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 EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectRole.java new file mode 100644 index 00000000..56a4f417 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupRoleDeletedPreviousObjectRole.java @@ -0,0 +1,162 @@ +/** + * 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 = EventStreamCloudEventGroupRoleDeletedPreviousObjectRole.Builder.class) +public final class EventStreamCloudEventGroupRoleDeletedPreviousObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupRoleDeletedPreviousObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupRoleDeletedPreviousObjectRole + && equalTo((EventStreamCloudEventGroupRoleDeletedPreviousObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupRoleDeletedPreviousObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the role.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectRole other); + } + + public interface NameStage { + /** + *

                                                              The name of the role.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventGroupRoleDeletedPreviousObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupRoleDeletedPreviousObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

                                                              The ID of the role.

                                                              + * @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; + } + + /** + *

                                                              The name of the role.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupRoleDeletedPreviousObjectRole build() { + return new EventStreamCloudEventGroupRoleDeletedPreviousObjectRole(id, name, 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/EventStreamCloudEventGroupUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java index fca339cb..4dc98558 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdated.java @@ -116,7 +116,6 @@ public Builder from(EventStreamCloudEventGroupUpdated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java index 0b5944f4..ecadbbf3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedCloudEvent.Builder.class) public final class EventStreamCloudEventGroupUpdatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventGroupUpdatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventGroupUpdatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventGroupUpdatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventGroupUpdatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventGroupUpdatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventGroupUpdatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventGroupUpdatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventGroupUpdatedCloudEventType } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventGroupUpdatedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupUpdatedCloudEvent build() { return new EventStreamCloudEventGroupUpdatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java index 5dd71c0a..b271a9ed 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventGroupUpdatedData { private final EventStreamCloudEventGroupUpdatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventGroupUpdatedData( EventStreamCloudEventGroupUpdatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventGroupUpdatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventGroupUpdatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventGroupUpdatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventGroupUpdatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventGroupUpdatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventGroupUpdatedData build() { - return new EventStreamCloudEventGroupUpdatedData(object, context, additionalProperties); + return new EventStreamCloudEventGroupUpdatedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java index 7b5731c0..8e886553 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject0.java @@ -238,7 +238,6 @@ public Builder from(EventStreamCloudEventGroupUpdatedObject0 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +249,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +260,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -281,7 +278,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupUpdatedObject0T } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -293,7 +289,6 @@ public UpdatedAtStage connectionId(@NotNull String connectionId) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java index f62fd956..b6fdf005 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject1.java @@ -238,7 +238,6 @@ public Builder from(EventStreamCloudEventGroupUpdatedObject1 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +249,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +260,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -281,7 +278,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupUpdatedObject } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -293,7 +289,6 @@ public UpdatedAtStage organizationId(@NotNull String organizationId) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java index e22e201e..505fa11c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedObject2.java @@ -214,7 +214,6 @@ public Builder from(EventStreamCloudEventGroupUpdatedObject2 other) { } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -226,7 +225,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the group.

                                                              *

                                                              The name of the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -238,7 +236,6 @@ public CreatedAtStage name(@NotNull String name) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -257,7 +254,6 @@ public UpdatedAtStage type(@NotNull EventStreamCloudEventGroupUpdatedObject2Type } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject.java new file mode 100644 index 00000000..0f859f46 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventGroupUpdatedPreviousObject.Deserializer.class) +public final class EventStreamCloudEventGroupUpdatedPreviousObject { + private final Object value; + + private final int type; + + private EventStreamCloudEventGroupUpdatedPreviousObject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventGroupUpdatedPreviousObject0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventGroupUpdatedPreviousObject1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventGroupUpdatedPreviousObject2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedPreviousObject + && equalTo((EventStreamCloudEventGroupUpdatedPreviousObject) other); + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedPreviousObject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventGroupUpdatedPreviousObject of( + EventStreamCloudEventGroupUpdatedPreviousObject0 value) { + return new EventStreamCloudEventGroupUpdatedPreviousObject(value, 0); + } + + public static EventStreamCloudEventGroupUpdatedPreviousObject of( + EventStreamCloudEventGroupUpdatedPreviousObject1 value) { + return new EventStreamCloudEventGroupUpdatedPreviousObject(value, 1); + } + + public static EventStreamCloudEventGroupUpdatedPreviousObject of( + EventStreamCloudEventGroupUpdatedPreviousObject2 value) { + return new EventStreamCloudEventGroupUpdatedPreviousObject(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventGroupUpdatedPreviousObject0 value); + + T visit(EventStreamCloudEventGroupUpdatedPreviousObject1 value); + + T visit(EventStreamCloudEventGroupUpdatedPreviousObject2 value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventGroupUpdatedPreviousObject.class); + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedPreviousObject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupUpdatedPreviousObject0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupUpdatedPreviousObject1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("name") + && ((Map) value).containsKey("created_at") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("updated_at")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventGroupUpdatedPreviousObject2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject0.java new file mode 100644 index 00000000..0070574a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject0.java @@ -0,0 +1,340 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedPreviousObject0.Builder.class) +public final class EventStreamCloudEventGroupUpdatedPreviousObject0 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum type; + + private final String connectionId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedPreviousObject0( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum type, + String connectionId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.connectionId = connectionId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedPreviousObject0 + && equalTo((EventStreamCloudEventGroupUpdatedPreviousObject0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedPreviousObject0 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && connectionId.equals(other.connectionId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.connectionId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupUpdatedPreviousObject0 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + UpdatedAtStage connectionId(@NotNull String connectionId); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedPreviousObject0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, ConnectionIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum type; + + private String connectionId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedPreviousObject0 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + connectionId(other.getConnectionId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type(@NotNull EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public UpdatedAtStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedPreviousObject0 build() { + return new EventStreamCloudEventGroupUpdatedPreviousObject0( + id, name, externalId, createdAt, type, connectionId, 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/EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum.java new file mode 100644 index 00000000..b3303859 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum { + public static final EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum CONNECTION = + new EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum(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 EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventGroupUpdatedPreviousObject0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject1.java new file mode 100644 index 00000000..67f30376 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject1.java @@ -0,0 +1,340 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedPreviousObject1.Builder.class) +public final class EventStreamCloudEventGroupUpdatedPreviousObject1 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum type; + + private final String organizationId; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedPreviousObject1( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum type, + String organizationId, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.organizationId = organizationId; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedPreviousObject1 + && equalTo((EventStreamCloudEventGroupUpdatedPreviousObject1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedPreviousObject1 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && organizationId.equals(other.organizationId) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, this.name, this.externalId, this.createdAt, this.type, this.organizationId, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupUpdatedPreviousObject1 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + UpdatedAtStage organizationId(@NotNull String organizationId); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedPreviousObject1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, OrganizationIdStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum type; + + private String organizationId; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedPreviousObject1 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + organizationId(other.getOrganizationId()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type(@NotNull EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public UpdatedAtStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedPreviousObject1 build() { + return new EventStreamCloudEventGroupUpdatedPreviousObject1( + id, name, externalId, createdAt, type, organizationId, 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/EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum.java new file mode 100644 index 00000000..09079ac2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum { + public static final EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum ORGANIZATION = + new EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum(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 EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventGroupUpdatedPreviousObject1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject2.java new file mode 100644 index 00000000..62119c5c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject2.java @@ -0,0 +1,305 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventGroupUpdatedPreviousObject2.Builder.class) +public final class EventStreamCloudEventGroupUpdatedPreviousObject2 { + private final String id; + + private final String name; + + private final Optional externalId; + + private final OffsetDateTime createdAt; + + private final EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum type; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private EventStreamCloudEventGroupUpdatedPreviousObject2( + String id, + String name, + Optional externalId, + OffsetDateTime createdAt, + EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum type, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.createdAt = createdAt; + this.type = type; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the group. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("type") + public EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum getType() { + return type; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventGroupUpdatedPreviousObject2 + && equalTo((EventStreamCloudEventGroupUpdatedPreviousObject2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventGroupUpdatedPreviousObject2 other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && createdAt.equals(other.createdAt) + && type.equals(other.type) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.externalId, this.createdAt, this.type, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventGroupUpdatedPreviousObject2 other); + } + + public interface NameStage { + /** + *

                                                              The name of the group.

                                                              + */ + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + TypeStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface TypeStage { + UpdatedAtStage type(@NotNull EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum type); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventGroupUpdatedPreviousObject2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, CreatedAtStage, TypeStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private OffsetDateTime createdAt; + + private EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum type; + + private OffsetDateTime updatedAt; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventGroupUpdatedPreviousObject2 other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + createdAt(other.getCreatedAt()); + type(other.getType()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @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; + } + + /** + *

                                                              The name of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public TypeStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public UpdatedAtStage type(@NotNull EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventGroupUpdatedPreviousObject2 build() { + return new EventStreamCloudEventGroupUpdatedPreviousObject2( + id, name, externalId, createdAt, type, 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/EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum.java new file mode 100644 index 00000000..490bde6f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum { + public static final EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum TENANT = + new EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum(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 EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum + && this.string.equals( + ((EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventGroupUpdatedPreviousObject2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java index 2e1f1515..b9aea778 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOffsetOnlyMessage.java @@ -99,7 +99,6 @@ public Builder from(EventStreamCloudEventOffsetOnlyMessage other) { } /** - *

                                                              Opaque cursor representing the latest position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing the latest position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java index ba9bbf01..a23203d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAdded.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgConnectionAdded other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java index 315e2d04..87d05a61 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgConnectionAddedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgConnectionAddedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgConnectionAddedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgConnectionAddedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgConnectionAddedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgConnectionAddedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgConnectionAddedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgConnectionAddedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgConnectionAddedCloudEve } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionAddedData d } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgConnectionAddedCloudEvent build() { return new EventStreamCloudEventOrgConnectionAddedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java index 3f2f44c9..965821bc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgConnectionAddedData { private final EventStreamCloudEventOrgConnectionAddedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgConnectionAddedData( EventStreamCloudEventOrgConnectionAddedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgConnectionAddedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgConnectionAddedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgConnectionAddedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgConnectionAddedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgConnectionAddedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgConnectionAddedData build() { - return new EventStreamCloudEventOrgConnectionAddedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgConnectionAddedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java index 385a467e..4dc6534b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObject.java @@ -31,6 +31,14 @@ public final class EventStreamCloudEventOrgConnectionAddedObject { private final Optional isSignupEnabled; + private final Optional isEnabled; + + private final Optional + organizationAccessLevel; + + private final Optional + organizationMemberAccessLevel; + private final Map additionalProperties; private EventStreamCloudEventOrgConnectionAddedObject( @@ -39,12 +47,19 @@ private EventStreamCloudEventOrgConnectionAddedObject( Optional assignMembershipOnLogin, Optional showAsButton, Optional isSignupEnabled, + Optional isEnabled, + Optional organizationAccessLevel, + Optional + organizationMemberAccessLevel, Map additionalProperties) { this.organization = organization; this.connection = connection; this.assignMembershipOnLogin = assignMembershipOnLogin; this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; + this.isEnabled = isEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.additionalProperties = additionalProperties; } @@ -86,6 +101,25 @@ public Optional getIsSignupEnabled() { return isSignupEnabled; } + /** + * @return Determines whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + @JsonProperty("organization_access_level") + public Optional getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + @JsonProperty("organization_member_access_level") + public Optional + getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,7 +137,10 @@ private boolean equalTo(EventStreamCloudEventOrgConnectionAddedObject other) { && connection.equals(other.connection) && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled); + && isSignupEnabled.equals(other.isSignupEnabled) + && isEnabled.equals(other.isEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel); } @java.lang.Override @@ -113,7 +150,10 @@ public int hashCode() { this.connection, this.assignMembershipOnLogin, this.showAsButton, - this.isSignupEnabled); + this.isSignupEnabled, + this.isEnabled, + this.organizationAccessLevel, + this.organizationMemberAccessLevel); } @java.lang.Override @@ -166,6 +206,27 @@ public interface _FinalStage { _FinalStage isSignupEnabled(Optional isSignupEnabled); _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage organizationAccessLevel( + Optional organizationAccessLevel); + + _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel organizationAccessLevel); + + _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -174,6 +235,14 @@ public static final class Builder implements OrganizationStage, ConnectionStage, private EventStreamCloudEventOrgConnectionAddedObjectConnection connection; + private Optional + organizationMemberAccessLevel = Optional.empty(); + + private Optional organizationAccessLevel = + Optional.empty(); + + private Optional isEnabled = Optional.empty(); + private Optional isSignupEnabled = Optional.empty(); private Optional showAsButton = Optional.empty(); @@ -192,6 +261,9 @@ public Builder from(EventStreamCloudEventOrgConnectionAddedObject other) { assignMembershipOnLogin(other.getAssignMembershipOnLogin()); showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); + isEnabled(other.getIsEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); return this; } @@ -210,6 +282,59 @@ public _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionAddedOb return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isEnabled(Boolean isEnabled) { + this.isEnabled = Optional.ofNullable(isEnabled); + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + /** *

                                                              Determines whether organization signup should be enabled for this organization connection. * Only applicable for database connections.

                                                              @@ -286,6 +411,9 @@ public EventStreamCloudEventOrgConnectionAddedObject build() { assignMembershipOnLogin, showAsButton, isSignupEnabled, + isEnabled, + organizationAccessLevel, + organizationMemberAccessLevel, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java index e9d4a164..0cfcf7bd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectConnection.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgConnectionAddedObjectConnection othe } /** - *

                                                              The ID of the connection.

                                                              *

                                                              The ID of the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java index 6dbc5e0d..988068cb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganization.java @@ -123,7 +123,6 @@ public Builder from(EventStreamCloudEventOrgConnectionAddedObjectOrganization ot } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel.java new file mode 100644 index 00000000..f0f6f9fe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel.java @@ -0,0 +1,134 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum) this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum) this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum) this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum.java new file mode 100644 index 00000000..366cfca8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum.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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum valueOf(String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum.java new file mode 100644 index 00000000..904a1f27 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum.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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum READONLY = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum(Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum valueOf(String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum.java new file mode 100644 index 00000000..fdbb2940 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum.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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum LIMITED = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum(Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum valueOf(String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum.java new file mode 100644 index 00000000..049c482b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum.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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum(Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum valueOf(String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel.java new file mode 100644 index 00000000..9655644f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel.java @@ -0,0 +1,134 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum) this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum) this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum) this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum.java new file mode 100644 index 00000000..b40a3b60 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum valueOf( + String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum.java new file mode 100644 index 00000000..a3332ea0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum READONLY = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum( + Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum valueOf( + String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum.java new file mode 100644 index 00000000..7d11ae09 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum LIMITED = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum( + Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum valueOf( + String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum.java new file mode 100644 index 00000000..1de8770b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum(Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum(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 EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum valueOf( + String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionAddedObjectOrganizationMemberAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObject.java new file mode 100644 index 00000000..ff3796d7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObject.java @@ -0,0 +1,437 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedPreviousObject { + private final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection connection; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional isEnabled; + + private final Optional + organizationAccessLevel; + + private final Optional + organizationMemberAccessLevel; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedPreviousObject( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization organization, + EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection connection, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional isEnabled, + Optional + organizationAccessLevel, + Optional + organizationMemberAccessLevel, + Map additionalProperties) { + this.organization = organization; + this.connection = connection; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.isEnabled = isEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("connection") + public EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection getConnection() { + return connection; + } + + /** + * @return When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection. + */ + @JsonProperty("assign_membership_on_login") + public Optional getAssignMembershipOnLogin() { + return assignMembershipOnLogin; + } + + /** + * @return Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + /** + * @return Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + /** + * @return Determines whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + @JsonProperty("organization_access_level") + public Optional + getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + @JsonProperty("organization_member_access_level") + public Optional + getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedPreviousObject + && equalTo((EventStreamCloudEventOrgConnectionAddedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedPreviousObject other) { + return organization.equals(other.organization) + && connection.equals(other.connection) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && isEnabled.equals(other.isEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organization, + this.connection, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.isEnabled, + this.organizationAccessLevel, + this.organizationMemberAccessLevel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgConnectionAddedPreviousObject other); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection connection); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

                                                              + */ + _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin); + + _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin); + + /** + *

                                                              Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

                                                              Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

                                                              + */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel); + + _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel organizationAccessLevel); + + _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, ConnectionStage, _FinalStage { + private EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection connection; + + private Optional + organizationMemberAccessLevel = Optional.empty(); + + private Optional + organizationAccessLevel = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedPreviousObject other) { + organization(other.getOrganization()); + connection(other.getConnection()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + isEnabled(other.getIsEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection( + @NotNull EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isEnabled(Boolean isEnabled) { + this.isEnabled = Optional.ofNullable(isEnabled); + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + *

                                                              Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isSignupEnabled(Boolean isSignupEnabled) { + this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); + return this; + } + + /** + *

                                                              Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) + public _FinalStage isSignupEnabled(Optional isSignupEnabled) { + this.isSignupEnabled = isSignupEnabled; + return this; + } + + /** + *

                                                              Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + /** + *

                                                              When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin) { + this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); + return this; + } + + /** + *

                                                              When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) + public _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin) { + this.assignMembershipOnLogin = assignMembershipOnLogin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedPreviousObject build() { + return new EventStreamCloudEventOrgConnectionAddedPreviousObject( + organization, + connection, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + isEnabled, + organizationAccessLevel, + organizationMemberAccessLevel, + 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/EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection.java new file mode 100644 index 00000000..0b7c8844 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection + && equalTo((EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the connection.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection other) { + id(other.getId()); + return this; + } + + /** + *

                                                              The ID of the connection.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection build() { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectConnection(id, 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/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization.java new file mode 100644 index 00000000..bde1df81 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganization( + name, id, 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/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel.java new file mode 100644 index 00000000..d4cf8173 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum) this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum) this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum) this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum.java new file mode 100644 index 00000000..dbd347eb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum(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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum valueOf( + String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum.java new file mode 100644 index 00000000..ed574b7d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum READONLY = + new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum( + Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum(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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum valueOf( + String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum.java new file mode 100644 index 00000000..27ad0e46 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum LIMITED = + new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum( + Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum(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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum valueOf( + String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum.java new file mode 100644 index 00000000..0c73eb04 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum(Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum(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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum valueOf( + String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel.java new file mode 100644 index 00000000..9ad08be3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum) + this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum) + this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum) + this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum) + this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer< + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel> { + Deserializer() { + super(EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum.java new file mode 100644 index 00000000..616a7024 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum( + Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum( + 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 + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum valueOf( + String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum.java new file mode 100644 index 00000000..3b3d7e88 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum + READONLY = new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum( + Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum( + 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 + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum valueOf( + String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum.java new file mode 100644 index 00000000..e5e3b706 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum + LIMITED = new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum( + Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum( + 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 + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum valueOf( + String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum.java new file mode 100644 index 00000000..9fcfc8df --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum( + Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum( + 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 + EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum valueOf( + String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionAddedPreviousObjectOrganizationMemberAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java index 8c0be8d1..ffec2396 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemoved.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgConnectionRemoved other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java index c0d77abe..63968f5f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgConnectionRemovedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgConnectionRemovedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgConnectionRemovedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgConnectionRemovedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgConnectionRemovedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgConnectionRemovedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgConnectionRemovedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgConnectionRemovedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgConnectionRemovedCloudE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionRemovedData } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgConnectionRemovedCloudEvent build() { return new EventStreamCloudEventOrgConnectionRemovedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java index e733915b..d8ce1cee 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgConnectionRemovedData { private final EventStreamCloudEventOrgConnectionRemovedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgConnectionRemovedData( EventStreamCloudEventOrgConnectionRemovedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgConnectionRemovedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgConnectionRemovedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgConnectionRemovedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgConnectionRemovedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgConnectionRemovedData build() { - return new EventStreamCloudEventOrgConnectionRemovedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgConnectionRemovedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java index d2774af3..a8adbeef 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectConnection.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgConnectionRemovedObjectConnection ot } /** - *

                                                              The ID of the connection.

                                                              *

                                                              The ID of the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java index 3523d774..3df84ad7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedObjectOrganization.java @@ -123,7 +123,6 @@ public Builder from(EventStreamCloudEventOrgConnectionRemovedObjectOrganization } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObject.java new file mode 100644 index 00000000..7e4695bb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObject.java @@ -0,0 +1,148 @@ +/** + * 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 = EventStreamCloudEventOrgConnectionRemovedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedPreviousObject { + private final EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection connection; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedPreviousObject( + EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization organization, + EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection connection, + Map additionalProperties) { + this.organization = organization; + this.connection = connection; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("connection") + public EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection getConnection() { + return connection; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedPreviousObject + && equalTo((EventStreamCloudEventOrgConnectionRemovedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedPreviousObject other) { + return organization.equals(other.organization) && connection.equals(other.connection); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.connection); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgConnectionRemovedPreviousObject other); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection connection); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, ConnectionStage, _FinalStage { + private EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection connection; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedPreviousObject other) { + organization(other.getOrganization()); + connection(other.getConnection()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection( + @NotNull EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedPreviousObject build() { + return new EventStreamCloudEventOrgConnectionRemovedPreviousObject( + organization, connection, 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/EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection.java new file mode 100644 index 00000000..270cd2d8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection + && equalTo((EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the connection.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection other) { + id(other.getId()); + return this; + } + + /** + *

                                                              The ID of the connection.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection build() { + return new EventStreamCloudEventOrgConnectionRemovedPreviousObjectConnection(id, 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/EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization.java new file mode 100644 index 00000000..51fbc63d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgConnectionRemovedPreviousObjectOrganization( + name, id, 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/EventStreamCloudEventOrgConnectionUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java index 7b7ecbe6..141aaad8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdated.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgConnectionUpdated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java index 65604425..fe5d6fc5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgConnectionUpdatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgConnectionUpdatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgConnectionUpdatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgConnectionUpdatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgConnectionUpdatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgConnectionUpdatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgConnectionUpdatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgConnectionUpdatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgConnectionUpdatedCloudE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgConnectionUpdatedData } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgConnectionUpdatedCloudEvent build() { return new EventStreamCloudEventOrgConnectionUpdatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java index 66d34213..eecfabca 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgConnectionUpdatedData { private final EventStreamCloudEventOrgConnectionUpdatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgConnectionUpdatedData( EventStreamCloudEventOrgConnectionUpdatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgConnectionUpdatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgConnectionUpdatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgConnectionUpdatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgConnectionUpdatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgConnectionUpdatedData build() { - return new EventStreamCloudEventOrgConnectionUpdatedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgConnectionUpdatedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java index 15c1d971..90ae508a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObject.java @@ -31,6 +31,14 @@ public final class EventStreamCloudEventOrgConnectionUpdatedObject { private final Optional isSignupEnabled; + private final Optional isEnabled; + + private final Optional + organizationAccessLevel; + + private final Optional + organizationMemberAccessLevel; + private final Map additionalProperties; private EventStreamCloudEventOrgConnectionUpdatedObject( @@ -39,12 +47,19 @@ private EventStreamCloudEventOrgConnectionUpdatedObject( Optional assignMembershipOnLogin, Optional showAsButton, Optional isSignupEnabled, + Optional isEnabled, + Optional organizationAccessLevel, + Optional + organizationMemberAccessLevel, Map additionalProperties) { this.organization = organization; this.connection = connection; this.assignMembershipOnLogin = assignMembershipOnLogin; this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; + this.isEnabled = isEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.additionalProperties = additionalProperties; } @@ -86,6 +101,26 @@ public Optional getIsSignupEnabled() { return isSignupEnabled; } + /** + * @return Determines whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + @JsonProperty("organization_access_level") + public Optional + getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + @JsonProperty("organization_member_access_level") + public Optional + getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,7 +138,10 @@ private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedObject other) { && connection.equals(other.connection) && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled); + && isSignupEnabled.equals(other.isSignupEnabled) + && isEnabled.equals(other.isEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel); } @java.lang.Override @@ -113,7 +151,10 @@ public int hashCode() { this.connection, this.assignMembershipOnLogin, this.showAsButton, - this.isSignupEnabled); + this.isSignupEnabled, + this.isEnabled, + this.organizationAccessLevel, + this.organizationMemberAccessLevel); } @java.lang.Override @@ -166,6 +207,28 @@ public interface _FinalStage { _FinalStage isSignupEnabled(Optional isSignupEnabled); _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel); + + _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel organizationAccessLevel); + + _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -174,6 +237,14 @@ public static final class Builder implements OrganizationStage, ConnectionStage, private EventStreamCloudEventOrgConnectionUpdatedObjectConnection connection; + private Optional + organizationMemberAccessLevel = Optional.empty(); + + private Optional + organizationAccessLevel = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + private Optional isSignupEnabled = Optional.empty(); private Optional showAsButton = Optional.empty(); @@ -192,6 +263,9 @@ public Builder from(EventStreamCloudEventOrgConnectionUpdatedObject other) { assignMembershipOnLogin(other.getAssignMembershipOnLogin()); showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); + isEnabled(other.getIsEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); return this; } @@ -210,6 +284,59 @@ public _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionUpdated return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isEnabled(Boolean isEnabled) { + this.isEnabled = Optional.ofNullable(isEnabled); + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + /** *

                                                              Determines whether organization signup should be enabled for this organization connection. * Only applicable for database connections.

                                                              @@ -286,6 +413,9 @@ public EventStreamCloudEventOrgConnectionUpdatedObject build() { assignMembershipOnLogin, showAsButton, isSignupEnabled, + isEnabled, + organizationAccessLevel, + organizationMemberAccessLevel, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java index 41eaa70f..3324be44 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectConnection.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgConnectionUpdatedObjectConnection ot } /** - *

                                                              The ID of the connection.

                                                              *

                                                              The ID of the connection.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java index a1c16162..804d93a9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganization.java @@ -123,7 +123,6 @@ public Builder from(EventStreamCloudEventOrgConnectionUpdatedObjectOrganization } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel.java new file mode 100644 index 00000000..986e9e76 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel.java @@ -0,0 +1,134 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum) this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum) this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum) this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum.java new file mode 100644 index 00000000..769f5dea --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum.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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum valueOf(String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum.java new file mode 100644 index 00000000..b5424255 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum.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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum READONLY = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum(Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum valueOf(String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum.java new file mode 100644 index 00000000..a543aaf0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum.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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum LIMITED = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum(Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum valueOf(String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum.java new file mode 100644 index 00000000..a11bf16d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum.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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum(Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum valueOf(String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel.java new file mode 100644 index 00000000..80bb0b77 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum) this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum) this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum) this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum.java new file mode 100644 index 00000000..9f9cad12 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum valueOf( + String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum.java new file mode 100644 index 00000000..1e3168e9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum READONLY = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum( + Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum valueOf( + String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum.java new file mode 100644 index 00000000..306178d8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum LIMITED = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum( + Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum valueOf( + String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum.java new file mode 100644 index 00000000..c214b8a3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum(Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum(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 EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum valueOf( + String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionUpdatedObjectOrganizationMemberAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObject.java new file mode 100644 index 00000000..3092a3ec --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObject.java @@ -0,0 +1,438 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedPreviousObject { + private final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection connection; + + private final Optional assignMembershipOnLogin; + + private final Optional showAsButton; + + private final Optional isSignupEnabled; + + private final Optional isEnabled; + + private final Optional + organizationAccessLevel; + + private final Optional + organizationMemberAccessLevel; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedPreviousObject( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization organization, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection connection, + Optional assignMembershipOnLogin, + Optional showAsButton, + Optional isSignupEnabled, + Optional isEnabled, + Optional + organizationAccessLevel, + Optional + organizationMemberAccessLevel, + Map additionalProperties) { + this.organization = organization; + this.connection = connection; + this.assignMembershipOnLogin = assignMembershipOnLogin; + this.showAsButton = showAsButton; + this.isSignupEnabled = isSignupEnabled; + this.isEnabled = isEnabled; + this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("connection") + public EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection getConnection() { + return connection; + } + + /** + * @return When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection. + */ + @JsonProperty("assign_membership_on_login") + public Optional getAssignMembershipOnLogin() { + return assignMembershipOnLogin; + } + + /** + * @return Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections. + */ + @JsonProperty("show_as_button") + public Optional getShowAsButton() { + return showAsButton; + } + + /** + * @return Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections. + */ + @JsonProperty("is_signup_enabled") + public Optional getIsSignupEnabled() { + return isSignupEnabled; + } + + /** + * @return Determines whether the connection is enabled for the organization. + */ + @JsonProperty("is_enabled") + public Optional getIsEnabled() { + return isEnabled; + } + + @JsonProperty("organization_access_level") + public Optional + getOrganizationAccessLevel() { + return organizationAccessLevel; + } + + @JsonProperty("organization_member_access_level") + public Optional + getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedPreviousObject + && equalTo((EventStreamCloudEventOrgConnectionUpdatedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedPreviousObject other) { + return organization.equals(other.organization) + && connection.equals(other.connection) + && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) + && showAsButton.equals(other.showAsButton) + && isSignupEnabled.equals(other.isSignupEnabled) + && isEnabled.equals(other.isEnabled) + && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.organization, + this.connection, + this.assignMembershipOnLogin, + this.showAsButton, + this.isSignupEnabled, + this.isEnabled, + this.organizationAccessLevel, + this.organizationMemberAccessLevel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedPreviousObject other); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection connection); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

                                                              + */ + _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin); + + _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin); + + /** + *

                                                              Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

                                                              + */ + _FinalStage showAsButton(Optional showAsButton); + + _FinalStage showAsButton(Boolean showAsButton); + + /** + *

                                                              Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

                                                              + */ + _FinalStage isSignupEnabled(Optional isSignupEnabled); + + _FinalStage isSignupEnabled(Boolean isSignupEnabled); + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + _FinalStage isEnabled(Optional isEnabled); + + _FinalStage isEnabled(Boolean isEnabled); + + _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel); + + _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel organizationAccessLevel); + + _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, ConnectionStage, _FinalStage { + private EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection connection; + + private Optional + organizationMemberAccessLevel = Optional.empty(); + + private Optional + organizationAccessLevel = Optional.empty(); + + private Optional isEnabled = Optional.empty(); + + private Optional isSignupEnabled = Optional.empty(); + + private Optional showAsButton = Optional.empty(); + + private Optional assignMembershipOnLogin = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedPreviousObject other) { + organization(other.getOrganization()); + connection(other.getConnection()); + assignMembershipOnLogin(other.getAssignMembershipOnLogin()); + showAsButton(other.getShowAsButton()); + isSignupEnabled(other.getIsSignupEnabled()); + isEnabled(other.getIsEnabled()); + organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public ConnectionStage organization( + @NotNull EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection( + @NotNull EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional + organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + + @java.lang.Override + public _FinalStage organizationAccessLevel( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel + organizationAccessLevel) { + this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationAccessLevel( + Optional + organizationAccessLevel) { + this.organizationAccessLevel = organizationAccessLevel; + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isEnabled(Boolean isEnabled) { + this.isEnabled = Optional.ofNullable(isEnabled); + return this; + } + + /** + *

                                                              Determines whether the connection is enabled for the organization.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_enabled", nulls = Nulls.SKIP) + public _FinalStage isEnabled(Optional isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + *

                                                              Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isSignupEnabled(Boolean isSignupEnabled) { + this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); + return this; + } + + /** + *

                                                              Determines whether organization signup should be enabled for this organization connection. + * Only applicable for database connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) + public _FinalStage isSignupEnabled(Optional isSignupEnabled) { + this.isSignupEnabled = isSignupEnabled; + return this; + } + + /** + *

                                                              Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage showAsButton(Boolean showAsButton) { + this.showAsButton = Optional.ofNullable(showAsButton); + return this; + } + + /** + *

                                                              Determines whether a connection should be displayed on this organization’s login prompt. + * Only applicable for enterprise connections.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) + public _FinalStage showAsButton(Optional showAsButton) { + this.showAsButton = showAsButton; + return this; + } + + /** + *

                                                              When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage assignMembershipOnLogin(Boolean assignMembershipOnLogin) { + this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); + return this; + } + + /** + *

                                                              When true, all users that log in with this connection will be automatically granted membership + * in the organization. When false, users must be granted membership in the organization before + * logging in with this connection.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) + public _FinalStage assignMembershipOnLogin(Optional assignMembershipOnLogin) { + this.assignMembershipOnLogin = assignMembershipOnLogin; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedPreviousObject build() { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObject( + organization, + connection, + assignMembershipOnLogin, + showAsButton, + isSignupEnabled, + isEnabled, + organizationAccessLevel, + organizationMemberAccessLevel, + 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/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection.java new file mode 100644 index 00000000..f84f7906 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the connection. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection + && equalTo((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the connection.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection other) { + id(other.getId()); + return this; + } + + /** + *

                                                              The ID of the connection.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection build() { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectConnection(id, 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/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization.java new file mode 100644 index 00000000..beee6e19 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization.java @@ -0,0 +1,174 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganization( + name, id, 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/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel.java new file mode 100644 index 00000000..371dde69 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel.java @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum) this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum) this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum) this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel + && equalTo((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel) other); + } + + private boolean equalTo(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum.java new file mode 100644 index 00000000..ee9ffcd9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum(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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum valueOf( + String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum.java new file mode 100644 index 00000000..647be8d9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum READONLY = + new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum( + Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum(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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum valueOf( + String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum.java new file mode 100644 index 00000000..a980ed02 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum.java @@ -0,0 +1,81 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum LIMITED = + new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum( + Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum(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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum valueOf( + String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum.java new file mode 100644 index 00000000..153b8f78 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum(Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum(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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum valueOf( + String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel.java new file mode 100644 index 00000000..7822e9a4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel.java @@ -0,0 +1,151 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel.Deserializer.class) +public final class EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel( + Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum) + this.value); + } else if (this.type == 1) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum) + this.value); + } else if (this.type == 2) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum) + this.value); + } else if (this.type == 3) { + return visitor.visit( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum) + this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel + && equalTo( + (EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel) other); + } + + private boolean equalTo( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel(value, 0); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel(value, 1); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel(value, 2); + } + + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel of( + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum value) { + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel(value, 3); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum value); + + T visit(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum value); + } + + static final class Deserializer + extends StdDeserializer< + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel> { + Deserializer() { + super(EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum + .class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum + .class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum + .class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum + .class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum.java new file mode 100644 index 00000000..04568268 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum NONE = + new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum( + Value.NONE, "none"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum( + 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 + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum valueOf( + String value) { + switch (value) { + case "none": + return NONE; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel0Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum.java new file mode 100644 index 00000000..d69f96af --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum + READONLY = new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum( + Value.READONLY, "readonly"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum( + 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 + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum valueOf( + String value) { + switch (value) { + case "readonly": + return READONLY; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel1Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + READONLY, + + UNKNOWN + } + + public interface Visitor { + T visitReadonly(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum.java new file mode 100644 index 00000000..ce2f3b3a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum + LIMITED = new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum( + Value.LIMITED, "limited"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum( + 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 + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LIMITED: + return visitor.visitLimited(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum valueOf( + String value) { + switch (value) { + case "limited": + return LIMITED; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel2Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + LIMITED, + + UNKNOWN + } + + public interface Visitor { + T visitLimited(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum.java new file mode 100644 index 00000000..fcdd3fae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum.java @@ -0,0 +1,84 @@ +/** + * 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 EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum { + public static final EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum FULL = + new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum( + Value.FULL, "full"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum( + 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 + EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum + && this.string.equals( + ((EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FULL: + return visitor.visitFull(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum valueOf( + String value) { + switch (value) { + case "full": + return FULL; + default: + return new EventStreamCloudEventOrgConnectionUpdatedPreviousObjectOrganizationMemberAccessLevel3Enum( + Value.UNKNOWN, value); + } + } + + public enum Value { + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java index e168f633..4216ea84 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreated.java @@ -114,7 +114,6 @@ public Builder from(EventStreamCloudEventOrgCreated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java index a593ff35..4a07237e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgCreatedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgCreatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgCreatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgCreatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgCreatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgCreatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgCreatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgCreatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgCreatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgCreatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgCreatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgCreatedCloudEventTypeEn } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgCreatedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgCreatedCloudEvent build() { return new EventStreamCloudEventOrgCreatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java index c9020f10..b542a914 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgCreatedData { private final EventStreamCloudEventOrgCreatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgCreatedData( EventStreamCloudEventOrgCreatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgCreatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgCreatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgCreatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgCreatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgCreatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgCreatedData build() { - return new EventStreamCloudEventOrgCreatedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgCreatedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java index 5e1d4223..b543596d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedObject.java @@ -183,7 +183,6 @@ public Builder from(EventStreamCloudEventOrgCreatedObject other) { } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObject.java new file mode 100644 index 00000000..070efd3d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObject.java @@ -0,0 +1,280 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgCreatedPreviousObject { + private final Optional name; + + private final String id; + + private final Optional displayName; + + private final Optional> metadata; + + private final Optional branding; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedPreviousObject( + Optional name, + String id, + Optional displayName, + Optional> metadata, + Optional branding, + Map additionalProperties) { + this.name = name; + this.id = id; + this.displayName = displayName; + this.metadata = metadata; + this.branding = branding; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return If set, the name that will be displayed to end-users for this organization in any interaction with them. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @JsonProperty("branding") + public Optional getBranding() { + return branding; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedPreviousObject + && equalTo((EventStreamCloudEventOrgCreatedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedPreviousObject other) { + return name.equals(other.name) + && id.equals(other.id) + && displayName.equals(other.displayName) + && metadata.equals(other.metadata) + && branding.equals(other.branding); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id, this.displayName, this.metadata, this.branding); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgCreatedPreviousObject other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgCreatedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + + _FinalStage branding(Optional branding); + + _FinalStage branding(EventStreamCloudEventOrgCreatedPreviousObjectBranding branding); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional branding = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgCreatedPreviousObject other) { + name(other.getName()); + id(other.getId()); + displayName(other.getDisplayName()); + metadata(other.getMetadata()); + branding(other.getBranding()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage branding(EventStreamCloudEventOrgCreatedPreviousObjectBranding branding) { + this.branding = Optional.ofNullable(branding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "branding", nulls = Nulls.SKIP) + public _FinalStage branding(Optional branding) { + this.branding = branding; + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgCreatedPreviousObject build() { + return new EventStreamCloudEventOrgCreatedPreviousObject( + name, id, displayName, metadata, branding, 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/EventStreamCloudEventOrgCreatedPreviousObjectBranding.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObjectBranding.java new file mode 100644 index 00000000..0952f3be --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObjectBranding.java @@ -0,0 +1,137 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedPreviousObjectBranding.Builder.class) +public final class EventStreamCloudEventOrgCreatedPreviousObjectBranding { + private final Optional logoUrl; + + private final Optional colors; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedPreviousObjectBranding( + Optional logoUrl, + Optional colors, + Map additionalProperties) { + this.logoUrl = logoUrl; + this.colors = colors; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of logo to display on login page. + */ + @JsonProperty("logo_url") + public Optional getLogoUrl() { + return logoUrl; + } + + @JsonProperty("colors") + public Optional getColors() { + return colors; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedPreviousObjectBranding + && equalTo((EventStreamCloudEventOrgCreatedPreviousObjectBranding) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedPreviousObjectBranding other) { + return logoUrl.equals(other.logoUrl) && colors.equals(other.colors); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.logoUrl, this.colors); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional logoUrl = Optional.empty(); + + private Optional colors = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgCreatedPreviousObjectBranding other) { + logoUrl(other.getLogoUrl()); + colors(other.getColors()); + return this; + } + + /** + *

                                                              URL of logo to display on login page.

                                                              + */ + @JsonSetter(value = "logo_url", nulls = Nulls.SKIP) + public Builder logoUrl(Optional logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + public Builder logoUrl(String logoUrl) { + this.logoUrl = Optional.ofNullable(logoUrl); + return this; + } + + @JsonSetter(value = "colors", nulls = Nulls.SKIP) + public Builder colors(Optional colors) { + this.colors = colors; + return this; + } + + public Builder colors(EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors colors) { + this.colors = Optional.ofNullable(colors); + return this; + } + + public EventStreamCloudEventOrgCreatedPreviousObjectBranding build() { + return new EventStreamCloudEventOrgCreatedPreviousObjectBranding(logoUrl, colors, 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/EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors.java new file mode 100644 index 00000000..38ad9052 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors.java @@ -0,0 +1,142 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors.Builder.class) +public final class EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors { + private final Optional primary; + + private final Optional pageBackground; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors( + Optional primary, Optional pageBackground, Map additionalProperties) { + this.primary = primary; + this.pageBackground = pageBackground; + this.additionalProperties = additionalProperties; + } + + /** + * @return HEX Color for primary elements. + */ + @JsonProperty("primary") + public Optional getPrimary() { + return primary; + } + + /** + * @return HEX Color for background. + */ + @JsonProperty("page_background") + public Optional getPageBackground() { + return pageBackground; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors + && equalTo((EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors other) { + return primary.equals(other.primary) && pageBackground.equals(other.pageBackground); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.primary, this.pageBackground); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional primary = Optional.empty(); + + private Optional pageBackground = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors other) { + primary(other.getPrimary()); + pageBackground(other.getPageBackground()); + return this; + } + + /** + *

                                                              HEX Color for primary elements.

                                                              + */ + @JsonSetter(value = "primary", nulls = Nulls.SKIP) + public Builder primary(Optional primary) { + this.primary = primary; + return this; + } + + public Builder primary(String primary) { + this.primary = Optional.ofNullable(primary); + return this; + } + + /** + *

                                                              HEX Color for background.

                                                              + */ + @JsonSetter(value = "page_background", nulls = Nulls.SKIP) + public Builder pageBackground(Optional pageBackground) { + this.pageBackground = pageBackground; + return this; + } + + public Builder pageBackground(String pageBackground) { + this.pageBackground = Optional.ofNullable(pageBackground); + return this; + } + + public EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors build() { + return new EventStreamCloudEventOrgCreatedPreviousObjectBrandingColors( + primary, pageBackground, 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/EventStreamCloudEventOrgDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java index f0444b0e..ed145d7d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeleted.java @@ -114,7 +114,6 @@ public Builder from(EventStreamCloudEventOrgDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java index ff7384e5..c554d6a1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgDeletedCloudEventTypeEn } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgDeletedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgDeletedCloudEvent build() { return new EventStreamCloudEventOrgDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java index 0eb937bf..0a406f19 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgDeletedData { private final EventStreamCloudEventOrgDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgDeletedData( EventStreamCloudEventOrgDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgDeletedData build() { - return new EventStreamCloudEventOrgDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgDeletedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java index 5fcdbfef..01fd86a2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedObject.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventOrgDeletedObject other) { } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedPreviousObject.java new file mode 100644 index 00000000..9cb2f267 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgDeletedPreviousObject.java @@ -0,0 +1,250 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgDeletedPreviousObject { + private final Optional name; + + private final String id; + + private final Optional displayName; + + private final Optional> metadata; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgDeletedPreviousObject( + Optional name, + String id, + Optional displayName, + Optional> metadata, + Map additionalProperties) { + this.name = name; + this.id = id; + this.displayName = displayName; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return If set, the name that will be displayed to end-users for this organization in any interaction with them. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgDeletedPreviousObject + && equalTo((EventStreamCloudEventOrgDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgDeletedPreviousObject other) { + return name.equals(other.name) + && id.equals(other.id) + && displayName.equals(other.displayName) + && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id, this.displayName, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgDeletedPreviousObject other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional> metadata = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgDeletedPreviousObject other) { + name(other.getName()); + id(other.getId()); + displayName(other.getDisplayName()); + metadata(other.getMetadata()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgDeletedPreviousObject build() { + return new EventStreamCloudEventOrgDeletedPreviousObject( + name, id, displayName, metadata, 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/EventStreamCloudEventOrgGroupRoleAssigned.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java index fc22b3ce..2922bbcb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssigned.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssigned other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java index 0e19d0dc..4c135959 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgGroupRoleAssignedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgGroupRoleAssignedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgGroupRoleAssignedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgGroupRoleAssignedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgGroupRoleAssignedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgGroupRoleAssignedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgGroupRoleAssignedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssignedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedCloudE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgGroupRoleAssignedData } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgGroupRoleAssignedCloudEvent build() { return new EventStreamCloudEventOrgGroupRoleAssignedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java index de947ab2..53ec6020 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgGroupRoleAssignedData { private final EventStreamCloudEventOrgGroupRoleAssignedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgGroupRoleAssignedData( EventStreamCloudEventOrgGroupRoleAssignedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgGroupRoleAssignedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgGroupRoleAssignedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgGroupRoleAssignedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgGroupRoleAssignedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgGroupRoleAssignedData build() { - return new EventStreamCloudEventOrgGroupRoleAssignedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgGroupRoleAssignedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java index c8c3cd95..257ec244 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObject.java @@ -175,7 +175,6 @@ public CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleAssignedOb } /** - *

                                                              The time at which the role was assigned to the group in the organization.

                                                              *

                                                              The time at which the role was assigned to the group in the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java index f6400b15..4fdd56e0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup0 other) } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssigned } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java index e23039f8..b09c88d6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup1 other) } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssign } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java index 994cc95f..1dea9397 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2.java @@ -141,7 +141,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectGroup2 other) } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java index bdfd5d15..3da65229 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectOrganization } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java index 9e4e16ff..170455a4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedObjectRole.java @@ -121,7 +121,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleAssignedObjectRole other) { } /** - *

                                                              The ID of the role.

                                                              *

                                                              The ID of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the role.

                                                              *

                                                              The name of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObject.java new file mode 100644 index 00000000..921f40b6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObject.java @@ -0,0 +1,207 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObject { + private final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole role; + + private final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup group; + + private final OffsetDateTime createdAt; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObject( + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization organization, + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole role, + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup group, + OffsetDateTime createdAt, + Map additionalProperties) { + this.organization = organization; + this.role = role; + this.group = group; + this.createdAt = createdAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole getRole() { + return role; + } + + @JsonProperty("group") + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup getGroup() { + return group; + } + + /** + * @return The time at which the role was assigned to the group in the organization. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObject + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObject other) { + return organization.equals(other.organization) + && role.equals(other.role) + && group.equals(other.group) + && createdAt.equals(other.createdAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.role, this.group, this.createdAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + RoleStage organization( + @NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObject other); + } + + public interface RoleStage { + GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole role); + } + + public interface GroupStage { + CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup group); + } + + public interface CreatedAtStage { + /** + *

                                                              The time at which the role was assigned to the group in the organization.

                                                              + */ + _FinalStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, RoleStage, GroupStage, CreatedAtStage, _FinalStage { + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole role; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup group; + + private OffsetDateTime createdAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObject other) { + organization(other.getOrganization()); + role(other.getRole()); + group(other.getGroup()); + createdAt(other.getCreatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public RoleStage organization( + @NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + /** + *

                                                              The time at which the role was assigned to the group in the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObject build() { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObject( + organization, role, group, createdAt, 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/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup.java new file mode 100644 index 00000000..56a2c065 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup.Deserializer.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup of( + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 value) { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup(value, 0); + } + + public static EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup of( + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 value) { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup(value, 1); + } + + public static EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup of( + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 value) { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 value); + + T visit(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 value); + + T visit(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0.java new file mode 100644 index 00000000..f478f0fe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type( + @NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0 build() { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0( + id, externalId, type, connectionId, 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/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum.java new file mode 100644 index 00000000..bd2d10b8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum(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 EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1.java new file mode 100644 index 00000000..69bb1930 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type( + @NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1 build() { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1( + id, externalId, type, organizationId, 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/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum.java new file mode 100644 index 00000000..74fff369 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum.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 EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum( + Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum(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 EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2.java new file mode 100644 index 00000000..40fe5122 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2 build() { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2( + id, externalId, type, 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/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum.java new file mode 100644 index 00000000..cb60b846 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum(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 EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization.java new file mode 100644 index 00000000..c4244187 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectOrganization(id, 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/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole.java new file mode 100644 index 00000000..914b0f6c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole.java @@ -0,0 +1,162 @@ +/** + * 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 = EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole + && equalTo((EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the role.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole other); + } + + public interface NameStage { + /** + *

                                                              The name of the role.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

                                                              The ID of the role.

                                                              + * @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; + } + + /** + *

                                                              The name of the role.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole build() { + return new EventStreamCloudEventOrgGroupRoleAssignedPreviousObjectRole(id, name, 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/EventStreamCloudEventOrgGroupRoleDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java index 73d03e05..d989deb1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeleted.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java index f506c84e..f504d4ff 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgGroupRoleDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgGroupRoleDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgGroupRoleDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgGroupRoleDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgGroupRoleDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgGroupRoleDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgGroupRoleDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedCloudEv } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgGroupRoleDeletedData } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgGroupRoleDeletedCloudEvent build() { return new EventStreamCloudEventOrgGroupRoleDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java index 8583bcfa..013faea1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgGroupRoleDeletedData { private final EventStreamCloudEventOrgGroupRoleDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgGroupRoleDeletedData( EventStreamCloudEventOrgGroupRoleDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgGroupRoleDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgGroupRoleDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgGroupRoleDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgGroupRoleDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgGroupRoleDeletedData build() { - return new EventStreamCloudEventOrgGroupRoleDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgGroupRoleDeletedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java index a73b7597..76870870 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObject.java @@ -175,7 +175,6 @@ public DeletedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleDeletedObj } /** - *

                                                              The time at which the role was removed from the group in the organization.

                                                              *

                                                              The time at which the role was removed from the group in the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java index 3ba36126..d2aeb049 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup0 other) } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedO } /** - *

                                                              The connection ID associated with the group.

                                                              *

                                                              The connection ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java index c8c4ed2d..68e245f9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1.java @@ -166,7 +166,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup1 other) } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -185,7 +184,6 @@ public OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDelete } /** - *

                                                              The organization ID associated with the group.

                                                              *

                                                              The organization ID associated with the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java index 9a486699..5fd68b4c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2.java @@ -141,7 +141,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectGroup2 other) } /** - *

                                                              The unique identifier for the group.

                                                              *

                                                              The unique identifier for the group.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java index 28dfa483..32a582e7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectOrganization o } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java index 9a0b7931..c47436ca 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedObjectRole.java @@ -99,7 +99,6 @@ public Builder from(EventStreamCloudEventOrgGroupRoleDeletedObjectRole other) { } /** - *

                                                              The ID of the role.

                                                              *

                                                              The ID of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObject.java new file mode 100644 index 00000000..98a97fab --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObject.java @@ -0,0 +1,207 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObject { + private final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole role; + + private final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup group; + + private final OffsetDateTime createdAt; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObject( + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization organization, + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole role, + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup group, + OffsetDateTime createdAt, + Map additionalProperties) { + this.organization = organization; + this.role = role; + this.group = group; + this.createdAt = createdAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole getRole() { + return role; + } + + @JsonProperty("group") + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup getGroup() { + return group; + } + + /** + * @return The time at which the role was assigned to the group in the organization. + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObject + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObject other) { + return organization.equals(other.organization) + && role.equals(other.role) + && group.equals(other.group) + && createdAt.equals(other.createdAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.role, this.group, this.createdAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + RoleStage organization( + @NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObject other); + } + + public interface RoleStage { + GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole role); + } + + public interface GroupStage { + CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup group); + } + + public interface CreatedAtStage { + /** + *

                                                              The time at which the role was assigned to the group in the organization.

                                                              + */ + _FinalStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, RoleStage, GroupStage, CreatedAtStage, _FinalStage { + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole role; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup group; + + private OffsetDateTime createdAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObject other) { + organization(other.getOrganization()); + role(other.getRole()); + group(other.getGroup()); + createdAt(other.getCreatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public RoleStage organization( + @NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public GroupStage role(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("group") + public CreatedAtStage group(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup group) { + this.group = Objects.requireNonNull(group, "group must not be null"); + return this; + } + + /** + *

                                                              The time at which the role was assigned to the group in the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObject build() { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObject( + organization, role, group, createdAt, 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/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup.java new file mode 100644 index 00000000..e343869e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup.java @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup.Deserializer.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup { + private final Object value; + + private final int type; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup) other); + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup of( + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 value) { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup(value, 0); + } + + public static EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup of( + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 value) { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup(value, 1); + } + + public static EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup of( + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 value) { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup(value, 2); + } + + public interface Visitor { + T visit(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 value); + + T visit(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 value); + + T visit(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup.class); + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("connection_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type") + && ((Map) value).containsKey("organization_id")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("id") + && ((Map) value).containsKey("type")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0.java new file mode 100644 index 00000000..67b10e7a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum type; + + private final String connectionId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum type, + String connectionId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.connectionId = connectionId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum getType() { + return type; + } + + /** + * @return The connection ID associated with the group. + */ + @JsonProperty("connection_id") + public String getConnectionId() { + return connectionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && connectionId.equals(other.connectionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.connectionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 other); + } + + public interface TypeStage { + ConnectionIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum type); + } + + public interface ConnectionIdStage { + /** + *

                                                              The connection ID associated with the group.

                                                              + */ + _FinalStage connectionId(@NotNull String connectionId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, ConnectionIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum type; + + private String connectionId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + connectionId(other.getConnectionId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ConnectionIdStage type( + @NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The connection ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection_id") + public _FinalStage connectionId(@NotNull String connectionId) { + this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0 build() { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0( + id, externalId, type, connectionId, 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/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum.java new file mode 100644 index 00000000..d6a62dfc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum CONNECTION = + new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum(Value.CONNECTION, "connection"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum(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 EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CONNECTION: + return visitor.visitConnection(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum valueOf(String value) { + switch (value) { + case "connection": + return CONNECTION; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup0TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CONNECTION, + + UNKNOWN + } + + public interface Visitor { + T visitConnection(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1.java new file mode 100644 index 00000000..2f9d5dfd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1.java @@ -0,0 +1,236 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum type; + + private final String organizationId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum type, + String organizationId, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.organizationId = organizationId; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum getType() { + return type; + } + + /** + * @return The organization ID associated with the group. + */ + @JsonProperty("organization_id") + public String getOrganizationId() { + return organizationId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 other) { + return id.equals(other.id) + && externalId.equals(other.externalId) + && type.equals(other.type) + && organizationId.equals(other.organizationId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type, this.organizationId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 other); + } + + public interface TypeStage { + OrganizationIdStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum type); + } + + public interface OrganizationIdStage { + /** + *

                                                              The organization ID associated with the group.

                                                              + */ + _FinalStage organizationId(@NotNull String organizationId); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, OrganizationIdStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum type; + + private String organizationId; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + organizationId(other.getOrganizationId()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public OrganizationIdStage type( + @NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The organization ID associated with the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("organization_id") + public _FinalStage organizationId(@NotNull String organizationId) { + this.organizationId = Objects.requireNonNull(organizationId, "organizationId must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1 build() { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1( + id, externalId, type, organizationId, 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/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum.java new file mode 100644 index 00000000..4ad5e8d5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum.java @@ -0,0 +1,77 @@ +/** + * 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 EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum ORGANIZATION = + new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum( + Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum(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 EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum valueOf(String value) { + switch (value) { + case "organization": + return ORGANIZATION; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup1TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2.java new file mode 100644 index 00000000..2b282b07 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2.java @@ -0,0 +1,199 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 { + private final String id; + + private final Optional externalId; + + private final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum type; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2( + String id, + Optional externalId, + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum type, + Map additionalProperties) { + this.id = id; + this.externalId = externalId; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier for the group. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The external identifier for the group. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + @JsonProperty("type") + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 other) { + return id.equals(other.id) && externalId.equals(other.externalId) && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.externalId, this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The unique identifier for the group.

                                                              + */ + TypeStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 other); + } + + public interface TypeStage { + _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum type); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The external identifier for the group.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TypeStage, _FinalStage { + private String id; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum type; + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 other) { + id(other.getId()); + externalId(other.getExternalId()); + type(other.getType()); + return this; + } + + /** + *

                                                              The unique identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public TypeStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public _FinalStage type(@NotNull EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              The external identifier for the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2 build() { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2( + id, externalId, type, 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/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum.java new file mode 100644 index 00000000..db55c17c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum.java @@ -0,0 +1,76 @@ +/** + * 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 EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum { + public static final EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum TENANT = + new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum(Value.TENANT, "tenant"); + + private final Value value; + + private final String string; + + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum(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 EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum + && this.string.equals( + ((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + default: + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectGroup2TypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization.java new file mode 100644 index 00000000..12fbbaa7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectOrganization(id, 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/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole.java new file mode 100644 index 00000000..8a3b615a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole.java @@ -0,0 +1,162 @@ +/** + * 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 = EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole.Builder.class) +public final class EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole + && equalTo((EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the role.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole other); + } + + public interface NameStage { + /** + *

                                                              The name of the role.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

                                                              The ID of the role.

                                                              + * @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; + } + + /** + *

                                                              The name of the role.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole build() { + return new EventStreamCloudEventOrgGroupRoleDeletedPreviousObjectRole(id, name, 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/EventStreamCloudEventOrgMemberAdded.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java index 306d0aa6..39ed6ad6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAdded.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgMemberAdded other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java index 6de1e761..a75f141b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgMemberAddedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgMemberAddedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgMemberAddedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgMemberAddedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgMemberAddedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgMemberAddedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgMemberAddedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgMemberAddedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgMemberAddedCloudEventTy } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberAddedData data) } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberAddedCloudEvent build() { return new EventStreamCloudEventOrgMemberAddedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java index 72782674..1b59b804 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgMemberAddedData { private final EventStreamCloudEventOrgMemberAddedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgMemberAddedData( EventStreamCloudEventOrgMemberAddedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgMemberAddedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgMemberAddedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgMemberAddedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgMemberAddedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgMemberAddedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberAddedData build() { - return new EventStreamCloudEventOrgMemberAddedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgMemberAddedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java index ab458658..eeccf887 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectOrganization.java @@ -123,7 +123,6 @@ public Builder from(EventStreamCloudEventOrgMemberAddedObjectOrganization other) } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java index efede79a..a0c74eab 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedObjectUser.java @@ -99,7 +99,6 @@ public Builder from(EventStreamCloudEventOrgMemberAddedObjectUser other) { } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObject.java new file mode 100644 index 00000000..60ff7c22 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObject.java @@ -0,0 +1,145 @@ +/** + * 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 = EventStreamCloudEventOrgMemberAddedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedPreviousObject { + private final EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberAddedPreviousObjectUser user; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedPreviousObject( + EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization organization, + EventStreamCloudEventOrgMemberAddedPreviousObjectUser user, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberAddedPreviousObjectUser getUser() { + return user; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedPreviousObject + && equalTo((EventStreamCloudEventOrgMemberAddedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedPreviousObject other) { + return organization.equals(other.organization) && user.equals(other.user); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization(@NotNull EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberAddedPreviousObject other); + } + + public interface UserStage { + _FinalStage user(@NotNull EventStreamCloudEventOrgMemberAddedPreviousObjectUser user); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, _FinalStage { + private EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgMemberAddedPreviousObjectUser user; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedPreviousObject other) { + organization(other.getOrganization()); + user(other.getUser()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization( + @NotNull EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public _FinalStage user(@NotNull EventStreamCloudEventOrgMemberAddedPreviousObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedPreviousObject build() { + return new EventStreamCloudEventOrgMemberAddedPreviousObject(organization, user, 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/EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization.java new file mode 100644 index 00000000..87cbfaf7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization.java @@ -0,0 +1,173 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgMemberAddedPreviousObjectOrganization(name, id, 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/EventStreamCloudEventOrgMemberAddedPreviousObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObjectUser.java new file mode 100644 index 00000000..e11970fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberAddedPreviousObjectUser.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberAddedPreviousObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberAddedPreviousObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberAddedPreviousObjectUser( + String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberAddedPreviousObjectUser + && equalTo((EventStreamCloudEventOrgMemberAddedPreviousObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberAddedPreviousObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberAddedPreviousObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberAddedPreviousObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberAddedPreviousObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberAddedPreviousObjectUser build() { + return new EventStreamCloudEventOrgMemberAddedPreviousObjectUser(userId, 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/EventStreamCloudEventOrgMemberDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java index b2f6fef2..c3d605ec 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeleted.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgMemberDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java index d9a7700f..71fdc8cc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgMemberDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgMemberDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgMemberDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgMemberDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgMemberDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgMemberDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgMemberDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgMemberDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgMemberDeletedCloudEvent } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberDeletedData dat } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberDeletedCloudEvent build() { return new EventStreamCloudEventOrgMemberDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java index 78bd5486..3724ede0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgMemberDeletedData { private final EventStreamCloudEventOrgMemberDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgMemberDeletedData( EventStreamCloudEventOrgMemberDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgMemberDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgMemberDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgMemberDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgMemberDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,23 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgMemberDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberDeletedData build() { - return new EventStreamCloudEventOrgMemberDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgMemberDeletedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java index 7dbc8e81..a45e904f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectOrganization.java @@ -123,7 +123,6 @@ public Builder from(EventStreamCloudEventOrgMemberDeletedObjectOrganization othe } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java index 0f5fee04..0fc5315c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedObjectUser.java @@ -99,7 +99,6 @@ public Builder from(EventStreamCloudEventOrgMemberDeletedObjectUser other) { } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObject.java new file mode 100644 index 00000000..a0889cd5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObject.java @@ -0,0 +1,145 @@ +/** + * 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 = EventStreamCloudEventOrgMemberDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedPreviousObject { + private final EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberDeletedPreviousObjectUser user; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedPreviousObject( + EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization organization, + EventStreamCloudEventOrgMemberDeletedPreviousObjectUser user, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberDeletedPreviousObjectUser getUser() { + return user; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedPreviousObject + && equalTo((EventStreamCloudEventOrgMemberDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedPreviousObject other) { + return organization.equals(other.organization) && user.equals(other.user); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization(@NotNull EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberDeletedPreviousObject other); + } + + public interface UserStage { + _FinalStage user(@NotNull EventStreamCloudEventOrgMemberDeletedPreviousObjectUser user); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, _FinalStage { + private EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgMemberDeletedPreviousObjectUser user; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedPreviousObject other) { + organization(other.getOrganization()); + user(other.getUser()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization( + @NotNull EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public _FinalStage user(@NotNull EventStreamCloudEventOrgMemberDeletedPreviousObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedPreviousObject build() { + return new EventStreamCloudEventOrgMemberDeletedPreviousObject(organization, user, 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/EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization.java new file mode 100644 index 00000000..e53f13f4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization.java @@ -0,0 +1,173 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization { + private final Optional name; + + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization( + Optional name, String id, Map additionalProperties) { + this.name = name; + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization other) { + return name.equals(other.name) && id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization other) { + name(other.getName()); + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgMemberDeletedPreviousObjectOrganization(name, id, 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/EventStreamCloudEventOrgMemberDeletedPreviousObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObjectUser.java new file mode 100644 index 00000000..c650f73a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberDeletedPreviousObjectUser.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberDeletedPreviousObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberDeletedPreviousObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberDeletedPreviousObjectUser( + String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberDeletedPreviousObjectUser + && equalTo((EventStreamCloudEventOrgMemberDeletedPreviousObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberDeletedPreviousObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberDeletedPreviousObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberDeletedPreviousObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberDeletedPreviousObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberDeletedPreviousObjectUser build() { + return new EventStreamCloudEventOrgMemberDeletedPreviousObjectUser(userId, 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/EventStreamCloudEventOrgMemberRoleAssigned.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java index 983909ce..62f92aae 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssigned.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleAssigned other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java index 35765efa..360a0c2a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgMemberRoleAssignedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgMemberRoleAssignedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgMemberRoleAssignedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgMemberRoleAssignedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgMemberRoleAssignedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgMemberRoleAssignedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgMemberRoleAssignedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgMemberRoleAssignedCloudEvent other) return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgMemberRoleAssignedCloud } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberRoleAssignedDat } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberRoleAssignedCloudEvent build() { return new EventStreamCloudEventOrgMemberRoleAssignedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java index 28fa3c7e..9d66676c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgMemberRoleAssignedData { private final EventStreamCloudEventOrgMemberRoleAssignedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgMemberRoleAssignedData( EventStreamCloudEventOrgMemberRoleAssignedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgMemberRoleAssignedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgMemberRoleAssignedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgMemberRoleAssignedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgMemberRoleAssignedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberRoleAssignedData build() { - return new EventStreamCloudEventOrgMemberRoleAssignedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgMemberRoleAssignedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java index 32729156..500c5669 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectOrganization } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java index 824b0bff..7f10f3cc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectRole.java @@ -121,7 +121,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectRole other) } /** - *

                                                              The ID of the role.

                                                              *

                                                              The ID of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the role.

                                                              *

                                                              The name of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java index 09cbffc5..ebd1ef2d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedObjectUser.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleAssignedObjectUser other) } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObject.java new file mode 100644 index 00000000..2d805a0e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObject.java @@ -0,0 +1,170 @@ +/** + * 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 = EventStreamCloudEventOrgMemberRoleAssignedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedPreviousObject { + private final EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser user; + + private final EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole role; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObject( + EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization organization, + EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser user, + EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole role, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.role = role; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser getUser() { + return user; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole getRole() { + return role; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedPreviousObject + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedPreviousObject other) { + return organization.equals(other.organization) && user.equals(other.user) && role.equals(other.role); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user, this.role); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization( + @NotNull EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObject other); + } + + public interface UserStage { + RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser user); + } + + public interface RoleStage { + _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole role); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, RoleStage, _FinalStage { + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser user; + + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole role; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObject other) { + organization(other.getOrganization()); + user(other.getUser()); + role(other.getRole()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization( + @NotNull EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObject build() { + return new EventStreamCloudEventOrgMemberRoleAssignedPreviousObject( + organization, user, role, 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/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization.java new file mode 100644 index 00000000..a06a9c00 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectOrganization(id, 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/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole.java new file mode 100644 index 00000000..96250cb5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole.java @@ -0,0 +1,162 @@ +/** + * 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 = EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the role.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole other); + } + + public interface NameStage { + /** + *

                                                              The name of the role.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

                                                              The ID of the role.

                                                              + * @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; + } + + /** + *

                                                              The name of the role.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole build() { + return new EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectRole(id, name, 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/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser.java new file mode 100644 index 00000000..0fd480fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser( + String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser + && equalTo((EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser build() { + return new EventStreamCloudEventOrgMemberRoleAssignedPreviousObjectUser(userId, 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/EventStreamCloudEventOrgMemberRoleDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java index 2d04003b..4e568639 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeleted.java @@ -117,7 +117,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java index 2d732016..ca4cbace 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgMemberRoleDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgMemberRoleDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgMemberRoleDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgMemberRoleDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgMemberRoleDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgMemberRoleDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgMemberRoleDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgMemberRoleDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgMemberRoleDeletedCloudE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgMemberRoleDeletedData } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberRoleDeletedCloudEvent build() { return new EventStreamCloudEventOrgMemberRoleDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java index 25c76b53..0e0c3951 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgMemberRoleDeletedData { private final EventStreamCloudEventOrgMemberRoleDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgMemberRoleDeletedData( EventStreamCloudEventOrgMemberRoleDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgMemberRoleDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgMemberRoleDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgMemberRoleDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,24 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgMemberRoleDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject( + Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgMemberRoleDeletedData build() { - return new EventStreamCloudEventOrgMemberRoleDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgMemberRoleDeletedData( + object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java index d6f7a56e..a5bca598 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectOrganization } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java index bcf322e6..7cf6a434 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectRole.java @@ -121,7 +121,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectRole other) { } /** - *

                                                              The ID of the role.

                                                              *

                                                              The ID of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              The name of the role.

                                                              *

                                                              The name of the role.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java index 493ccfef..20cbae38 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedObjectUser.java @@ -100,7 +100,6 @@ public Builder from(EventStreamCloudEventOrgMemberRoleDeletedObjectUser other) { } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObject.java new file mode 100644 index 00000000..47965c52 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObject.java @@ -0,0 +1,170 @@ +/** + * 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 = EventStreamCloudEventOrgMemberRoleDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedPreviousObject { + private final EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization organization; + + private final EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser user; + + private final EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole role; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObject( + EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization organization, + EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser user, + EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole role, + Map additionalProperties) { + this.organization = organization; + this.user = user; + this.role = role; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("organization") + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization getOrganization() { + return organization; + } + + @JsonProperty("user") + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser getUser() { + return user; + } + + @JsonProperty("role") + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole getRole() { + return role; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedPreviousObject + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedPreviousObject other) { + return organization.equals(other.organization) && user.equals(other.user) && role.equals(other.role); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organization, this.user, this.role); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OrganizationStage builder() { + return new Builder(); + } + + public interface OrganizationStage { + UserStage organization( + @NotNull EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization organization); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObject other); + } + + public interface UserStage { + RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser user); + } + + public interface RoleStage { + _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole role); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OrganizationStage, UserStage, RoleStage, _FinalStage { + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization organization; + + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser user; + + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole role; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObject other) { + organization(other.getOrganization()); + user(other.getUser()); + role(other.getRole()); + return this; + } + + @java.lang.Override + @JsonSetter("organization") + public UserStage organization( + @NotNull EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization organization) { + this.organization = Objects.requireNonNull(organization, "organization must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user") + public RoleStage user(@NotNull EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser user) { + this.user = Objects.requireNonNull(user, "user must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("role") + public _FinalStage role(@NotNull EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole role) { + this.role = Objects.requireNonNull(role, "role must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObject build() { + return new EventStreamCloudEventOrgMemberRoleDeletedPreviousObject( + organization, user, role, 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/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization.java new file mode 100644 index 00000000..5473a10f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization { + private final String id; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization( + String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization other) { + id(other.getId()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization build() { + return new EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectOrganization(id, 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/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole.java new file mode 100644 index 00000000..fb27f62e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole.java @@ -0,0 +1,162 @@ +/** + * 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 = EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole { + private final String id; + + private final String name; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole( + String id, String name, Map additionalProperties) { + this.id = id; + this.name = name; + this.additionalProperties = additionalProperties; + } + + /** + * @return The ID of the role. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return The name of the role. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole other) { + return id.equals(other.id) && name.equals(other.name); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              The ID of the role.

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole other); + } + + public interface NameStage { + /** + *

                                                              The name of the role.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole other) { + id(other.getId()); + name(other.getName()); + return this; + } + + /** + *

                                                              The ID of the role.

                                                              + * @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; + } + + /** + *

                                                              The name of the role.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole build() { + return new EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectRole(id, name, 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/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser.java new file mode 100644 index 00000000..29765eee --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser.Builder.class) +public final class EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser { + private final String userId; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser( + String userId, Map additionalProperties) { + this.userId = userId; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser + && equalTo((EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser other) { + return userId.equals(other.userId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + _FinalStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, _FinalStage { + private String userId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser other) { + userId(other.getUserId()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public _FinalStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser build() { + return new EventStreamCloudEventOrgMemberRoleDeletedPreviousObjectUser(userId, 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/EventStreamCloudEventOrgUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java index 122184a5..b8b474d9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdated.java @@ -114,7 +114,6 @@ public Builder from(EventStreamCloudEventOrgUpdated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java index ec5ebb95..5a3f1c34 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedCloudEvent.Builder.class) public final class EventStreamCloudEventOrgUpdatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventOrgUpdatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventOrgUpdatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventOrgUpdatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventOrgUpdatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventOrgUpdatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventOrgUpdatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventOrgUpdatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventOrgUpdatedCloudEventTypeEn } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventOrgUpdatedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgUpdatedCloudEvent build() { return new EventStreamCloudEventOrgUpdatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java index 9e0185eb..68b7cf88 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventOrgUpdatedData { private final EventStreamCloudEventOrgUpdatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventOrgUpdatedData( EventStreamCloudEventOrgUpdatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventOrgUpdatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventOrgUpdatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventOrgUpdatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventOrgUpdatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventOrgUpdatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventOrgUpdatedData build() { - return new EventStreamCloudEventOrgUpdatedData(object, context, additionalProperties); + return new EventStreamCloudEventOrgUpdatedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java index 537970b7..b246eabb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedObject.java @@ -183,7 +183,6 @@ public Builder from(EventStreamCloudEventOrgUpdatedObject other) { } /** - *

                                                              ID of the organization.

                                                              *

                                                              ID of the organization.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObject.java new file mode 100644 index 00000000..01d033be --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObject.java @@ -0,0 +1,280 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedPreviousObject.Builder.class) +public final class EventStreamCloudEventOrgUpdatedPreviousObject { + private final Optional name; + + private final String id; + + private final Optional displayName; + + private final Optional> metadata; + + private final Optional branding; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedPreviousObject( + Optional name, + String id, + Optional displayName, + Optional> metadata, + Optional branding, + Map additionalProperties) { + this.name = name; + this.id = id; + this.displayName = displayName; + this.metadata = metadata; + this.branding = branding; + this.additionalProperties = additionalProperties; + } + + /** + * @return The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application.. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return ID of the organization. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return If set, the name that will be displayed to end-users for this organization in any interaction with them. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @JsonProperty("branding") + public Optional getBranding() { + return branding; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedPreviousObject + && equalTo((EventStreamCloudEventOrgUpdatedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedPreviousObject other) { + return name.equals(other.name) + && id.equals(other.id) + && displayName.equals(other.displayName) + && metadata.equals(other.metadata) + && branding.equals(other.branding); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.id, this.displayName, this.metadata, this.branding); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              ID of the organization.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(EventStreamCloudEventOrgUpdatedPreviousObject other); + } + + public interface _FinalStage { + EventStreamCloudEventOrgUpdatedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + */ + _FinalStage displayName(Optional displayName); + + _FinalStage displayName(String displayName); + + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + + _FinalStage branding(Optional branding); + + _FinalStage branding(EventStreamCloudEventOrgUpdatedPreviousObjectBranding branding); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + private Optional branding = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional name = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventOrgUpdatedPreviousObject other) { + name(other.getName()); + id(other.getId()); + displayName(other.getDisplayName()); + metadata(other.getMetadata()); + branding(other.getBranding()); + return this; + } + + /** + *

                                                              ID of the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage branding(EventStreamCloudEventOrgUpdatedPreviousObjectBranding branding) { + this.branding = Optional.ofNullable(branding); + return this; + } + + @java.lang.Override + @JsonSetter(value = "branding", nulls = Nulls.SKIP) + public _FinalStage branding(Optional branding) { + this.branding = branding; + return this; + } + + @java.lang.Override + public _FinalStage metadata(Map metadata) { + this.metadata = Optional.ofNullable(metadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + /** + *

                                                              If set, the name that will be displayed to end-users for this organization in any interaction with them.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public _FinalStage displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The human-readable identifier for the organization that will be used by end-users to direct them to their organization in your application..

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + @java.lang.Override + public EventStreamCloudEventOrgUpdatedPreviousObject build() { + return new EventStreamCloudEventOrgUpdatedPreviousObject( + name, id, displayName, metadata, branding, 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/EventStreamCloudEventOrgUpdatedPreviousObjectBranding.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObjectBranding.java new file mode 100644 index 00000000..14ea5603 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObjectBranding.java @@ -0,0 +1,137 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedPreviousObjectBranding.Builder.class) +public final class EventStreamCloudEventOrgUpdatedPreviousObjectBranding { + private final Optional logoUrl; + + private final Optional colors; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedPreviousObjectBranding( + Optional logoUrl, + Optional colors, + Map additionalProperties) { + this.logoUrl = logoUrl; + this.colors = colors; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of logo to display on login page. + */ + @JsonProperty("logo_url") + public Optional getLogoUrl() { + return logoUrl; + } + + @JsonProperty("colors") + public Optional getColors() { + return colors; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedPreviousObjectBranding + && equalTo((EventStreamCloudEventOrgUpdatedPreviousObjectBranding) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedPreviousObjectBranding other) { + return logoUrl.equals(other.logoUrl) && colors.equals(other.colors); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.logoUrl, this.colors); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional logoUrl = Optional.empty(); + + private Optional colors = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgUpdatedPreviousObjectBranding other) { + logoUrl(other.getLogoUrl()); + colors(other.getColors()); + return this; + } + + /** + *

                                                              URL of logo to display on login page.

                                                              + */ + @JsonSetter(value = "logo_url", nulls = Nulls.SKIP) + public Builder logoUrl(Optional logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + public Builder logoUrl(String logoUrl) { + this.logoUrl = Optional.ofNullable(logoUrl); + return this; + } + + @JsonSetter(value = "colors", nulls = Nulls.SKIP) + public Builder colors(Optional colors) { + this.colors = colors; + return this; + } + + public Builder colors(EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors colors) { + this.colors = Optional.ofNullable(colors); + return this; + } + + public EventStreamCloudEventOrgUpdatedPreviousObjectBranding build() { + return new EventStreamCloudEventOrgUpdatedPreviousObjectBranding(logoUrl, colors, 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/EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors.java new file mode 100644 index 00000000..4e863db1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors.java @@ -0,0 +1,142 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors.Builder.class) +public final class EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors { + private final Optional primary; + + private final Optional pageBackground; + + private final Map additionalProperties; + + private EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors( + Optional primary, Optional pageBackground, Map additionalProperties) { + this.primary = primary; + this.pageBackground = pageBackground; + this.additionalProperties = additionalProperties; + } + + /** + * @return HEX Color for primary elements. + */ + @JsonProperty("primary") + public Optional getPrimary() { + return primary; + } + + /** + * @return HEX Color for background. + */ + @JsonProperty("page_background") + public Optional getPageBackground() { + return pageBackground; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors + && equalTo((EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors other) { + return primary.equals(other.primary) && pageBackground.equals(other.pageBackground); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.primary, this.pageBackground); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional primary = Optional.empty(); + + private Optional pageBackground = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors other) { + primary(other.getPrimary()); + pageBackground(other.getPageBackground()); + return this; + } + + /** + *

                                                              HEX Color for primary elements.

                                                              + */ + @JsonSetter(value = "primary", nulls = Nulls.SKIP) + public Builder primary(Optional primary) { + this.primary = primary; + return this; + } + + public Builder primary(String primary) { + this.primary = Optional.ofNullable(primary); + return this; + } + + /** + *

                                                              HEX Color for background.

                                                              + */ + @JsonSetter(value = "page_background", nulls = Nulls.SKIP) + public Builder pageBackground(Optional pageBackground) { + this.pageBackground = pageBackground; + return this; + } + + public Builder pageBackground(String pageBackground) { + this.pageBackground = Optional.ofNullable(pageBackground); + return this; + } + + public EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors build() { + return new EventStreamCloudEventOrgUpdatedPreviousObjectBrandingColors( + primary, pageBackground, 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/EventStreamCloudEventSpecVersionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventSpecVersionEnum.java new file mode 100644 index 00000000..c0b6d418 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventSpecVersionEnum.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 EventStreamCloudEventSpecVersionEnum { + public static final EventStreamCloudEventSpecVersionEnum ONE0 = + new EventStreamCloudEventSpecVersionEnum(Value.ONE0, "1.0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventSpecVersionEnum(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 EventStreamCloudEventSpecVersionEnum + && this.string.equals(((EventStreamCloudEventSpecVersionEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ONE0: + return visitor.visitOne0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventSpecVersionEnum valueOf(String value) { + switch (value) { + case "1.0": + return ONE0; + default: + return new EventStreamCloudEventSpecVersionEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ONE0, + + UNKNOWN + } + + public interface Visitor { + T visitOne0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java index 974f9989..76505797 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreated.java @@ -114,7 +114,6 @@ public Builder from(EventStreamCloudEventUserCreated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java index 031beeb5..2bacd025 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventUserCreatedCloudEvent.Builder.class) public final class EventStreamCloudEventUserCreatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventUserCreatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventUserCreatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventUserCreatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventUserCreatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventUserCreatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventUserCreatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventUserCreatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventUserCreatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventUserCreatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventUserCreatedCloudEventTypeE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventUserCreatedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventUserCreatedCloudEvent build() { return new EventStreamCloudEventUserCreatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java index 99ab1cda..bdb357ca 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventUserCreatedData { private final EventStreamCloudEventUserCreatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventUserCreatedData( EventStreamCloudEventUserCreatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventUserCreatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventUserCreatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventUserCreatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventUserCreatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventUserCreatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventUserCreatedData build() { - return new EventStreamCloudEventUserCreatedData(object, context, additionalProperties); + return new EventStreamCloudEventUserCreatedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java index d5a0195d..a46dea36 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObject.java @@ -577,7 +577,6 @@ public Builder from(EventStreamCloudEventUserCreatedObject other) { } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -589,7 +588,6 @@ public CreatedAtStage userId(@NotNull String userId) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -601,7 +599,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java index e7ce2b54..0ba463c3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemCustom o } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java index 452e5bf5..7e2cba94 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemDatabase } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java index 61f36554..f18d974b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterprise.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemEnterpri } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java index 0d4478c2..224c0398 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemPasswordless.java @@ -176,7 +176,6 @@ public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemPassword } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java index a4e40b73..80c55a67 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserCreatedObjectIdentitiesItemSocial o } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObject.java new file mode 100644 index 00000000..8699ac9c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObject.java @@ -0,0 +1,1013 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = EventStreamCloudEventUserCreatedPreviousObject.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObject { + private final String userId; + + private final Optional email; + + private final Optional emailVerified; + + private final Optional username; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final List identities; + + private final Optional> appMetadata; + + private final Optional> userMetadata; + + private final Optional picture; + + private final Optional name; + + private final Optional nickname; + + private final Optional> multifactor; + + private final Optional lastIp; + + private final Optional lastLogin; + + private final Optional loginsCount; + + private final Optional blocked; + + private final Optional givenName; + + private final Optional familyName; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObject( + String userId, + Optional email, + Optional emailVerified, + Optional username, + Optional phoneNumber, + Optional phoneVerified, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + List identities, + Optional> appMetadata, + Optional> userMetadata, + Optional picture, + Optional name, + Optional nickname, + Optional> multifactor, + Optional lastIp, + Optional lastLogin, + Optional loginsCount, + Optional blocked, + Optional givenName, + Optional familyName, + Map additionalProperties) { + this.userId = userId; + this.email = email; + this.emailVerified = emailVerified; + this.username = username; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.identities = identities; + this.appMetadata = appMetadata; + this.userMetadata = userMetadata; + this.picture = picture; + this.name = name; + this.nickname = nickname; + this.multifactor = multifactor; + this.lastIp = lastIp; + this.lastLogin = lastLogin; + this.loginsCount = loginsCount; + this.blocked = blocked; + this.givenName = givenName; + this.familyName = familyName; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return Array of user identity objects when accounts are linked. + */ + @JsonProperty("identities") + public List getIdentities() { + return identities; + } + + @JsonProperty("app_metadata") + public Optional> getAppMetadata() { + return appMetadata; + } + + @JsonProperty("user_metadata") + public Optional> getUserMetadata() { + return userMetadata; + } + + /** + * @return URL to picture, photo, or avatar of this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Preferred nickname or alias of this user. + */ + @JsonProperty("nickname") + public Optional getNickname() { + return nickname; + } + + /** + * @return List of multi-factor authentication providers with which this user has enrolled. + */ + @JsonProperty("multifactor") + public Optional> getMultifactor() { + return multifactor; + } + + /** + * @return Last IP address from which this user logged in. + */ + @JsonProperty("last_ip") + public Optional getLastIp() { + return lastIp; + } + + /** + * @return Last date and time this user logged in (ISO_8601 format). + */ + @JsonProperty("last_login") + public Optional getLastLogin() { + return lastLogin; + } + + /** + * @return Total number of logins this user has performed. + */ + @JsonProperty("logins_count") + public Optional getLoginsCount() { + return loginsCount; + } + + /** + * @return Whether this user was blocked by an administrator (true) or is not (false). + */ + @JsonProperty("blocked") + public Optional getBlocked() { + return blocked; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObject + && equalTo((EventStreamCloudEventUserCreatedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObject other) { + return userId.equals(other.userId) + && email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && username.equals(other.username) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && identities.equals(other.identities) + && appMetadata.equals(other.appMetadata) + && userMetadata.equals(other.userMetadata) + && picture.equals(other.picture) + && name.equals(other.name) + && nickname.equals(other.nickname) + && multifactor.equals(other.multifactor) + && lastIp.equals(other.lastIp) + && lastLogin.equals(other.lastLogin) + && loginsCount.equals(other.loginsCount) + && blocked.equals(other.blocked) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.userId, + this.email, + this.emailVerified, + this.username, + this.phoneNumber, + this.phoneVerified, + this.createdAt, + this.updatedAt, + this.identities, + this.appMetadata, + this.userMetadata, + this.picture, + this.name, + this.nickname, + this.multifactor, + this.lastIp, + this.lastLogin, + this.loginsCount, + this.blocked, + this.givenName, + this.familyName); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + CreatedAtStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventUserCreatedPreviousObject other); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Email address of this user.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + _FinalStage emailVerified(Optional emailVerified); + + _FinalStage emailVerified(Boolean emailVerified); + + /** + *

                                                              Username of this user.

                                                              + */ + _FinalStage username(Optional username); + + _FinalStage username(String username); + + /** + *

                                                              Phone number of this user.

                                                              + */ + _FinalStage phoneNumber(Optional phoneNumber); + + _FinalStage phoneNumber(String phoneNumber); + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + _FinalStage phoneVerified(Optional phoneVerified); + + _FinalStage phoneVerified(Boolean phoneVerified); + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + */ + _FinalStage identities(List identities); + + _FinalStage addIdentities(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem identities); + + _FinalStage addAllIdentities(List identities); + + _FinalStage appMetadata(Optional> appMetadata); + + _FinalStage appMetadata(Map appMetadata); + + _FinalStage userMetadata(Optional> userMetadata); + + _FinalStage userMetadata(Map userMetadata); + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + */ + _FinalStage picture(Optional picture); + + _FinalStage picture(String picture); + + /** + *

                                                              Name of this user.

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + */ + _FinalStage nickname(Optional nickname); + + _FinalStage nickname(String nickname); + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + */ + _FinalStage multifactor(Optional> multifactor); + + _FinalStage multifactor(List multifactor); + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + */ + _FinalStage lastIp(Optional lastIp); + + _FinalStage lastIp(String lastIp); + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + */ + _FinalStage lastLogin(Optional lastLogin); + + _FinalStage lastLogin(OffsetDateTime lastLogin); + + /** + *

                                                              Total number of logins this user has performed.

                                                              + */ + _FinalStage loginsCount(Optional loginsCount); + + _FinalStage loginsCount(Integer loginsCount); + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + */ + _FinalStage blocked(Optional blocked); + + _FinalStage blocked(Boolean blocked); + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + _FinalStage givenName(Optional givenName); + + _FinalStage givenName(String givenName); + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + _FinalStage familyName(Optional familyName); + + _FinalStage familyName(String familyName); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String userId; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional familyName = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional blocked = Optional.empty(); + + private Optional loginsCount = Optional.empty(); + + private Optional lastLogin = Optional.empty(); + + private Optional lastIp = Optional.empty(); + + private Optional> multifactor = Optional.empty(); + + private Optional nickname = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional> userMetadata = Optional.empty(); + + private Optional> appMetadata = Optional.empty(); + + private List identities = new ArrayList<>(); + + private Optional phoneVerified = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedPreviousObject other) { + userId(other.getUserId()); + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + username(other.getUsername()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + identities(other.getIdentities()); + appMetadata(other.getAppMetadata()); + userMetadata(other.getUserMetadata()); + picture(other.getPicture()); + name(other.getName()); + nickname(other.getNickname()); + multifactor(other.getMultifactor()); + lastIp(other.getLastIp()); + lastLogin(other.getLastLogin()); + loginsCount(other.getLoginsCount()); + blocked(other.getBlocked()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public CreatedAtStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public _FinalStage familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public _FinalStage givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage blocked(Boolean blocked) { + this.blocked = Optional.ofNullable(blocked); + return this; + } + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "blocked", nulls = Nulls.SKIP) + public _FinalStage blocked(Optional blocked) { + this.blocked = blocked; + return this; + } + + /** + *

                                                              Total number of logins this user has performed.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginsCount(Integer loginsCount) { + this.loginsCount = Optional.ofNullable(loginsCount); + return this; + } + + /** + *

                                                              Total number of logins this user has performed.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) + public _FinalStage loginsCount(Optional loginsCount) { + this.loginsCount = loginsCount; + return this; + } + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = Optional.ofNullable(lastLogin); + return this; + } + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "last_login", nulls = Nulls.SKIP) + public _FinalStage lastLogin(Optional lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastIp(String lastIp) { + this.lastIp = Optional.ofNullable(lastIp); + return this; + } + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) + public _FinalStage lastIp(Optional lastIp) { + this.lastIp = lastIp; + return this; + } + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multifactor(List multifactor) { + this.multifactor = Optional.ofNullable(multifactor); + return this; + } + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) + public _FinalStage multifactor(Optional> multifactor) { + this.multifactor = multifactor; + return this; + } + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nickname(String nickname) { + this.nickname = Optional.ofNullable(nickname); + return this; + } + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "nickname", nulls = Nulls.SKIP) + public _FinalStage nickname(Optional nickname) { + this.nickname = nickname; + return this; + } + + /** + *

                                                              Name of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public _FinalStage picture(Optional picture) { + this.picture = picture; + return this; + } + + @java.lang.Override + public _FinalStage userMetadata(Map userMetadata) { + this.userMetadata = Optional.ofNullable(userMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) + public _FinalStage userMetadata(Optional> userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + @java.lang.Override + public _FinalStage appMetadata(Map appMetadata) { + this.appMetadata = Optional.ofNullable(appMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) + public _FinalStage appMetadata(Optional> appMetadata) { + this.appMetadata = appMetadata; + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdentities( + List identities) { + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdentities(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem identities) { + this.identities.add(identities); + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "identities", nulls = Nulls.SKIP) + public _FinalStage identities(List identities) { + this.identities.clear(); + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public _FinalStage phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public _FinalStage phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + *

                                                              Username of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public _FinalStage username(Optional username) { + this.username = username; + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public _FinalStage emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObject build() { + return new EventStreamCloudEventUserCreatedPreviousObject( + userId, + email, + emailVerified, + username, + phoneNumber, + phoneVerified, + createdAt, + updatedAt, + identities, + appMetadata, + userMetadata, + picture, + name, + nickname, + multifactor, + lastIp, + lastLogin, + loginsCount, + blocked, + givenName, + familyName, + 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem.java new file mode 100644 index 00000000..60f88e52 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem.java @@ -0,0 +1,175 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem.Deserializer.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem(value, 0); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem(value, 1); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem(value, 2); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem(value, 3); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem(value, 4); + } + + public interface Visitor { + T visit(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom value); + + T visit(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase value); + + T visit(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise value); + + T visit(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless value); + + T visit(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItem deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom.java new file mode 100644 index 00000000..93ccd3d2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom.java @@ -0,0 +1,245 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom { + private final String connection; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom( + String connection, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId userId; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustom( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData.java new file mode 100644 index 00000000..b02d1b66 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData.java @@ -0,0 +1,341 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum.java new file mode 100644 index 00000000..f3916644 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum.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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum { + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum CUSTOM = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum(Value.CUSTOM, "custom"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum(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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM: + return visitor.visitCustom(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum valueOf(String value) { + switch (value) { + case "custom": + return CUSTOM; + default: + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM, + + UNKNOWN + } + + public interface Visitor { + T visitCustom(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId.java new file mode 100644 index 00000000..f3998a62 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId of(String value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId of(int value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemCustomUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase.java new file mode 100644 index 00000000..df58a069 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase.java @@ -0,0 +1,246 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase { + private final String connection; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase( + String connection, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId userId; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabase( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData.java new file mode 100644 index 00000000..b2fc09a8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum.java new file mode 100644 index 00000000..5a90ceaa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum { + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum AUTH0 = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum(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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum valueOf( + String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId.java new file mode 100644 index 00000000..641630a5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId of(String value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId of(int value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemDatabaseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise.java new file mode 100644 index 00000000..5c25118e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise.java @@ -0,0 +1,250 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise { + private final String connection; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId userId; + + private final Optional + profileData; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise( + String connection, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional + getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional + profileData); + + _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId userId; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider; + + private boolean isSocial; + + private Optional + profileData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional + profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterprise( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData.java new file mode 100644 index 00000000..9e81d138 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java new file mode 100644 index 00000000..c7ceb25a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java @@ -0,0 +1,195 @@ +/** + * 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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum { + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum AD = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.AD, "ad"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum + PINGFEDERATE = new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.PINGFEDERATE, "pingfederate"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum OKTA = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.OKTA, "okta"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum SAMLP = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum WAAD = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.WAAD, "waad"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum OFFICE365 = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.OFFICE365, "office365"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum SHAREPOINT = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.SHAREPOINT, "sharepoint"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum IP = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.IP, "ip"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum ADFS = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.ADFS, "adfs"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum OIDC = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.OIDC, "oidc"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum GOOGLE_APPS = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + return visitor.visitOkta(); + case SAMLP: + return visitor.visitSamlp(); + case WAAD: + return visitor.visitWaad(); + case OFFICE365: + return visitor.visitOffice365(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case IP: + return visitor.visitIp(); + case ADFS: + return visitor.visitAdfs(); + case OIDC: + return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum valueOf( + String value) { + switch (value) { + case "ad": + return AD; + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "waad": + return WAAD; + case "office365": + return OFFICE365; + case "sharepoint": + return SHAREPOINT; + case "ip": + return IP; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + ADFS, + + GOOGLE_APPS, + + IP, + + OFFICE365, + + OIDC, + + OKTA, + + PINGFEDERATE, + + SAMLP, + + SHAREPOINT, + + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitAdfs(); + + T visitGoogleApps(); + + T visitIp(); + + T visitOffice365(); + + T visitOidc(); + + T visitOkta(); + + T visitPingfederate(); + + T visitSamlp(); + + T visitSharepoint(); + + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId.java new file mode 100644 index 00000000..0b35a9ff --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId of(String value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId of(int value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemEnterpriseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless.java new file mode 100644 index 00000000..2ec0490d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless.java @@ -0,0 +1,251 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless { + private final String connection; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId userId; + + private final Optional + profileData; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless( + String connection, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional + getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional + profileData); + + _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId userId; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider; + + private boolean isSocial; + + private Optional + profileData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional + profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordless( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData.java new file mode 100644 index 00000000..2247c453 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java new file mode 100644 index 00000000..3b22eac9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java @@ -0,0 +1,94 @@ +/** + * 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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum { + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum EMAIL = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum( + Value.EMAIL, "email"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum SMS = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum(Value.SMS, "sms"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum(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 + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case SMS: + return visitor.visitSms(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum valueOf( + String value) { + switch (value) { + case "email": + return EMAIL; + case "sms": + return SMS; + default: + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + SMS, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitSms(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId.java new file mode 100644 index 00000000..4079e627 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId of(String value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId of(int value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemPasswordlessUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial.java new file mode 100644 index 00000000..b419b00f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial.java @@ -0,0 +1,245 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial { + private final String connection; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial( + String connection, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId userId, + Optional profileData, + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId userId; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocial( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData.java new file mode 100644 index 00000000..f4358297 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData.java @@ -0,0 +1,341 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData.Builder.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData build() { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum.java new file mode 100644 index 00000000..e68122d2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum.java @@ -0,0 +1,519 @@ +/** + * 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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum { + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum BAIDU = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BAIDU, "baidu"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum DWOLLA = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.DWOLLA, "dwolla"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum AUTH0OIDC = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.AUTH0OIDC, "auth0-oidc"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum PLANNINGCENTER = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.PLANNINGCENTER, "planningcenter"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum BITLY = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BITLY, "bitly"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum PAYPAL_SANDBOX = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum DROPBOX = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.DROPBOX, "dropbox"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum GOOGLE_OAUTH2 = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.GOOGLE_OAUTH2, "google-oauth2"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum VKONTAKTE = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.VKONTAKTE, "vkontakte"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum WORDPRESS = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.WORDPRESS, "wordpress"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum EXACT = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.EXACT, "exact"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum INSTAGRAM = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.INSTAGRAM, "instagram"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum FITBIT = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.FITBIT, "fitbit"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum + THIRTYSEVENSIGNALS = new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum EVERNOTE = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE, "evernote"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum SHOPIFY = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SHOPIFY, "shopify"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum + SALESFORCE_SANDBOX = new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum + SALESFORCE_COMMUNITY = new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum FACEBOOK = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.FACEBOOK, "facebook"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum DACCOUNT = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.DACCOUNT, "daccount"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum SOUNDCLOUD = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SOUNDCLOUD, "soundcloud"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum APPLE = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.APPLE, "apple"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum + EVERNOTE_SANDBOX = new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum OAUTH2 = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.OAUTH2, "oauth2"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum OAUTH1 = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.OAUTH1, "oauth1"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum AMAZON = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.AMAZON, "amazon"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum LINE = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.LINE, "line"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum BOX = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BOX, "box"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum UNTAPPED = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.UNTAPPED, "untapped"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum GITHUB = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.GITHUB, "github"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum SALESFORCE = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE, "salesforce"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum BITBUCKET = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.BITBUCKET, "bitbucket"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum YAHOO = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.YAHOO, "yahoo"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum WEIBO = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.WEIBO, "weibo"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum PAYPAL = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.PAYPAL, "paypal"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum LINKEDIN = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.LINKEDIN, "linkedin"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum WINDOWSLIVE = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.WINDOWSLIVE, "windowslive"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum YANDEX = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.YANDEX, "yandex"); + + public static final EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum TWITTER = + new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.TWITTER, "twitter"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum(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 EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BAIDU: + return visitor.visitBaidu(); + case DWOLLA: + return visitor.visitDwolla(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case BITLY: + return visitor.visitBitly(); + case PAYPAL_SANDBOX: + return visitor.visitPaypalSandbox(); + case DROPBOX: + return visitor.visitDropbox(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case VKONTAKTE: + return visitor.visitVkontakte(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case INSTAGRAM: + return visitor.visitInstagram(); + case FITBIT: + return visitor.visitFitbit(); + case THIRTYSEVENSIGNALS: + return visitor.visitThirtysevensignals(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case SALESFORCE_COMMUNITY: + return visitor.visitSalesforceCommunity(); + case FACEBOOK: + return visitor.visitFacebook(); + case DACCOUNT: + return visitor.visitDaccount(); + case SOUNDCLOUD: + return visitor.visitSoundcloud(); + case APPLE: + return visitor.visitApple(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); + case OAUTH2: + return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case BOX: + return visitor.visitBox(); + case UNTAPPED: + return visitor.visitUntapped(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case YAHOO: + return visitor.visitYahoo(); + case WEIBO: + return visitor.visitWeibo(); + case PAYPAL: + return visitor.visitPaypal(); + case LINKEDIN: + return visitor.visitLinkedin(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum valueOf(String value) { + switch (value) { + case "baidu": + return BAIDU; + case "dwolla": + return DWOLLA; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "bitly": + return BITLY; + case "paypal-sandbox": + return PAYPAL_SANDBOX; + case "dropbox": + return DROPBOX; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "vkontakte": + return VKONTAKTE; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "instagram": + return INSTAGRAM; + case "fitbit": + return FITBIT; + case "thirtysevensignals": + return THIRTYSEVENSIGNALS; + case "evernote": + return EVERNOTE; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "salesforce-community": + return SALESFORCE_COMMUNITY; + case "facebook": + return FACEBOOK; + case "daccount": + return DACCOUNT; + case "soundcloud": + return SOUNDCLOUD; + case "apple": + return APPLE; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; + case "oauth2": + return OAUTH2; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "box": + return BOX; + case "untapped": + return UNTAPPED; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "yahoo": + return YAHOO; + case "weibo": + return WEIBO; + case "paypal": + return PAYPAL; + case "linkedin": + return LINKEDIN; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; + default: + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AMAZON, + + APPLE, + + DROPBOX, + + BITBUCKET, + + AUTH0OIDC, + + BAIDU, + + BITLY, + + BOX, + + DACCOUNT, + + DWOLLA, + + EVERNOTE_SANDBOX, + + EVERNOTE, + + EXACT, + + FACEBOOK, + + FITBIT, + + GITHUB, + + GOOGLE_OAUTH2, + + INSTAGRAM, + + LINE, + + LINKEDIN, + + OAUTH1, + + OAUTH2, + + PAYPAL, + + PAYPAL_SANDBOX, + + PLANNINGCENTER, + + SALESFORCE_COMMUNITY, + + SALESFORCE_SANDBOX, + + SALESFORCE, + + SHOPIFY, + + SOUNDCLOUD, + + THIRTYSEVENSIGNALS, + + TWITTER, + + UNTAPPED, + + VKONTAKTE, + + WEIBO, + + WINDOWSLIVE, + + WORDPRESS, + + YAHOO, + + YANDEX, + + UNKNOWN + } + + public interface Visitor { + T visitAmazon(); + + T visitApple(); + + T visitDropbox(); + + T visitBitbucket(); + + T visitAuth0Oidc(); + + T visitBaidu(); + + T visitBitly(); + + T visitBox(); + + T visitDaccount(); + + T visitDwolla(); + + T visitEvernoteSandbox(); + + T visitEvernote(); + + T visitExact(); + + T visitFacebook(); + + T visitFitbit(); + + T visitGithub(); + + T visitGoogleOauth2(); + + T visitInstagram(); + + T visitLine(); + + T visitLinkedin(); + + T visitOauth1(); + + T visitOauth2(); + + T visitPaypal(); + + T visitPaypalSandbox(); + + T visitPlanningcenter(); + + T visitSalesforceCommunity(); + + T visitSalesforceSandbox(); + + T visitSalesforce(); + + T visitShopify(); + + T visitSoundcloud(); + + T visitThirtysevensignals(); + + T visitTwitter(); + + T visitUntapped(); + + T visitVkontakte(); + + T visitWeibo(); + + T visitWindowslive(); + + T visitWordpress(); + + T visitYahoo(); + + T visitYandex(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId.java new file mode 100644 index 00000000..4bd10dc0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId.Deserializer.class) +public final class EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId + && equalTo((EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId of(String value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId(value, 0); + } + + public static EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId of(int value) { + return new EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserCreatedPreviousObjectIdentitiesItemSocialUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java index 47b8950f..2dfc193c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeleted.java @@ -114,7 +114,6 @@ public Builder from(EventStreamCloudEventUserDeleted other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java index 97064936..76c05138 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventUserDeletedCloudEvent.Builder.class) public final class EventStreamCloudEventUserDeletedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventUserDeletedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventUserDeletedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventUserDeletedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventUserDeletedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventUserDeletedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventUserDeletedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventUserDeletedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventUserDeletedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventUserDeletedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventUserDeletedCloudEventTypeE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventUserDeletedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventUserDeletedCloudEvent build() { return new EventStreamCloudEventUserDeletedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java index 28127ece..e6555053 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventUserDeletedData { private final EventStreamCloudEventUserDeletedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventUserDeletedData( EventStreamCloudEventUserDeletedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventUserDeletedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventUserDeletedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventUserDeletedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventUserDeletedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventUserDeletedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventUserDeletedData build() { - return new EventStreamCloudEventUserDeletedData(object, context, additionalProperties); + return new EventStreamCloudEventUserDeletedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java index e5238cc0..39f37bc7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObject.java @@ -602,7 +602,6 @@ public Builder from(EventStreamCloudEventUserDeletedObject other) { } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -614,7 +613,6 @@ public CreatedAtStage userId(@NotNull String userId) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -626,7 +624,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -638,7 +635,6 @@ public DeletedAtStage updatedAt(@NotNull OffsetDateTime updatedAt) { } /** - *

                                                              Date and time when this entity was deleted (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was deleted (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java index 73749953..2b46d7c4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemCustom o } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java index 419ccb42..c338b4cd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemDatabase } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java index 2a1e687f..327fd0d8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterprise.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemEnterpri } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java index 08e53fef..1c7f83b1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemPasswordless.java @@ -176,7 +176,6 @@ public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemPassword } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java index 8befc381..481835c2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserDeletedObjectIdentitiesItemSocial o } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObject.java new file mode 100644 index 00000000..ffebf536 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObject.java @@ -0,0 +1,1013 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = EventStreamCloudEventUserDeletedPreviousObject.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObject { + private final String userId; + + private final Optional email; + + private final Optional emailVerified; + + private final Optional username; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final List identities; + + private final Optional> appMetadata; + + private final Optional> userMetadata; + + private final Optional picture; + + private final Optional name; + + private final Optional nickname; + + private final Optional> multifactor; + + private final Optional lastIp; + + private final Optional lastLogin; + + private final Optional loginsCount; + + private final Optional blocked; + + private final Optional givenName; + + private final Optional familyName; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObject( + String userId, + Optional email, + Optional emailVerified, + Optional username, + Optional phoneNumber, + Optional phoneVerified, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + List identities, + Optional> appMetadata, + Optional> userMetadata, + Optional picture, + Optional name, + Optional nickname, + Optional> multifactor, + Optional lastIp, + Optional lastLogin, + Optional loginsCount, + Optional blocked, + Optional givenName, + Optional familyName, + Map additionalProperties) { + this.userId = userId; + this.email = email; + this.emailVerified = emailVerified; + this.username = username; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.identities = identities; + this.appMetadata = appMetadata; + this.userMetadata = userMetadata; + this.picture = picture; + this.name = name; + this.nickname = nickname; + this.multifactor = multifactor; + this.lastIp = lastIp; + this.lastLogin = lastLogin; + this.loginsCount = loginsCount; + this.blocked = blocked; + this.givenName = givenName; + this.familyName = familyName; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return Array of user identity objects when accounts are linked. + */ + @JsonProperty("identities") + public List getIdentities() { + return identities; + } + + @JsonProperty("app_metadata") + public Optional> getAppMetadata() { + return appMetadata; + } + + @JsonProperty("user_metadata") + public Optional> getUserMetadata() { + return userMetadata; + } + + /** + * @return URL to picture, photo, or avatar of this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Preferred nickname or alias of this user. + */ + @JsonProperty("nickname") + public Optional getNickname() { + return nickname; + } + + /** + * @return List of multi-factor authentication providers with which this user has enrolled. + */ + @JsonProperty("multifactor") + public Optional> getMultifactor() { + return multifactor; + } + + /** + * @return Last IP address from which this user logged in. + */ + @JsonProperty("last_ip") + public Optional getLastIp() { + return lastIp; + } + + /** + * @return Last date and time this user logged in (ISO_8601 format). + */ + @JsonProperty("last_login") + public Optional getLastLogin() { + return lastLogin; + } + + /** + * @return Total number of logins this user has performed. + */ + @JsonProperty("logins_count") + public Optional getLoginsCount() { + return loginsCount; + } + + /** + * @return Whether this user was blocked by an administrator (true) or is not (false). + */ + @JsonProperty("blocked") + public Optional getBlocked() { + return blocked; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObject + && equalTo((EventStreamCloudEventUserDeletedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObject other) { + return userId.equals(other.userId) + && email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && username.equals(other.username) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && identities.equals(other.identities) + && appMetadata.equals(other.appMetadata) + && userMetadata.equals(other.userMetadata) + && picture.equals(other.picture) + && name.equals(other.name) + && nickname.equals(other.nickname) + && multifactor.equals(other.multifactor) + && lastIp.equals(other.lastIp) + && lastLogin.equals(other.lastLogin) + && loginsCount.equals(other.loginsCount) + && blocked.equals(other.blocked) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.userId, + this.email, + this.emailVerified, + this.username, + this.phoneNumber, + this.phoneVerified, + this.createdAt, + this.updatedAt, + this.identities, + this.appMetadata, + this.userMetadata, + this.picture, + this.name, + this.nickname, + this.multifactor, + this.lastIp, + this.lastLogin, + this.loginsCount, + this.blocked, + this.givenName, + this.familyName); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + CreatedAtStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventUserDeletedPreviousObject other); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Email address of this user.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + _FinalStage emailVerified(Optional emailVerified); + + _FinalStage emailVerified(Boolean emailVerified); + + /** + *

                                                              Username of this user.

                                                              + */ + _FinalStage username(Optional username); + + _FinalStage username(String username); + + /** + *

                                                              Phone number of this user.

                                                              + */ + _FinalStage phoneNumber(Optional phoneNumber); + + _FinalStage phoneNumber(String phoneNumber); + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + _FinalStage phoneVerified(Optional phoneVerified); + + _FinalStage phoneVerified(Boolean phoneVerified); + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + */ + _FinalStage identities(List identities); + + _FinalStage addIdentities(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem identities); + + _FinalStage addAllIdentities(List identities); + + _FinalStage appMetadata(Optional> appMetadata); + + _FinalStage appMetadata(Map appMetadata); + + _FinalStage userMetadata(Optional> userMetadata); + + _FinalStage userMetadata(Map userMetadata); + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + */ + _FinalStage picture(Optional picture); + + _FinalStage picture(String picture); + + /** + *

                                                              Name of this user.

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + */ + _FinalStage nickname(Optional nickname); + + _FinalStage nickname(String nickname); + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + */ + _FinalStage multifactor(Optional> multifactor); + + _FinalStage multifactor(List multifactor); + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + */ + _FinalStage lastIp(Optional lastIp); + + _FinalStage lastIp(String lastIp); + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + */ + _FinalStage lastLogin(Optional lastLogin); + + _FinalStage lastLogin(OffsetDateTime lastLogin); + + /** + *

                                                              Total number of logins this user has performed.

                                                              + */ + _FinalStage loginsCount(Optional loginsCount); + + _FinalStage loginsCount(Integer loginsCount); + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + */ + _FinalStage blocked(Optional blocked); + + _FinalStage blocked(Boolean blocked); + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + _FinalStage givenName(Optional givenName); + + _FinalStage givenName(String givenName); + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + _FinalStage familyName(Optional familyName); + + _FinalStage familyName(String familyName); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String userId; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional familyName = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional blocked = Optional.empty(); + + private Optional loginsCount = Optional.empty(); + + private Optional lastLogin = Optional.empty(); + + private Optional lastIp = Optional.empty(); + + private Optional> multifactor = Optional.empty(); + + private Optional nickname = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional> userMetadata = Optional.empty(); + + private Optional> appMetadata = Optional.empty(); + + private List identities = new ArrayList<>(); + + private Optional phoneVerified = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedPreviousObject other) { + userId(other.getUserId()); + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + username(other.getUsername()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + identities(other.getIdentities()); + appMetadata(other.getAppMetadata()); + userMetadata(other.getUserMetadata()); + picture(other.getPicture()); + name(other.getName()); + nickname(other.getNickname()); + multifactor(other.getMultifactor()); + lastIp(other.getLastIp()); + lastLogin(other.getLastLogin()); + loginsCount(other.getLoginsCount()); + blocked(other.getBlocked()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public CreatedAtStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public _FinalStage familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public _FinalStage givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage blocked(Boolean blocked) { + this.blocked = Optional.ofNullable(blocked); + return this; + } + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "blocked", nulls = Nulls.SKIP) + public _FinalStage blocked(Optional blocked) { + this.blocked = blocked; + return this; + } + + /** + *

                                                              Total number of logins this user has performed.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginsCount(Integer loginsCount) { + this.loginsCount = Optional.ofNullable(loginsCount); + return this; + } + + /** + *

                                                              Total number of logins this user has performed.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) + public _FinalStage loginsCount(Optional loginsCount) { + this.loginsCount = loginsCount; + return this; + } + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = Optional.ofNullable(lastLogin); + return this; + } + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "last_login", nulls = Nulls.SKIP) + public _FinalStage lastLogin(Optional lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastIp(String lastIp) { + this.lastIp = Optional.ofNullable(lastIp); + return this; + } + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) + public _FinalStage lastIp(Optional lastIp) { + this.lastIp = lastIp; + return this; + } + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multifactor(List multifactor) { + this.multifactor = Optional.ofNullable(multifactor); + return this; + } + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) + public _FinalStage multifactor(Optional> multifactor) { + this.multifactor = multifactor; + return this; + } + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nickname(String nickname) { + this.nickname = Optional.ofNullable(nickname); + return this; + } + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "nickname", nulls = Nulls.SKIP) + public _FinalStage nickname(Optional nickname) { + this.nickname = nickname; + return this; + } + + /** + *

                                                              Name of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public _FinalStage picture(Optional picture) { + this.picture = picture; + return this; + } + + @java.lang.Override + public _FinalStage userMetadata(Map userMetadata) { + this.userMetadata = Optional.ofNullable(userMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) + public _FinalStage userMetadata(Optional> userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + @java.lang.Override + public _FinalStage appMetadata(Map appMetadata) { + this.appMetadata = Optional.ofNullable(appMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) + public _FinalStage appMetadata(Optional> appMetadata) { + this.appMetadata = appMetadata; + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdentities( + List identities) { + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdentities(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem identities) { + this.identities.add(identities); + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "identities", nulls = Nulls.SKIP) + public _FinalStage identities(List identities) { + this.identities.clear(); + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public _FinalStage phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public _FinalStage phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + *

                                                              Username of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public _FinalStage username(Optional username) { + this.username = username; + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public _FinalStage emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObject build() { + return new EventStreamCloudEventUserDeletedPreviousObject( + userId, + email, + emailVerified, + username, + phoneNumber, + phoneVerified, + createdAt, + updatedAt, + identities, + appMetadata, + userMetadata, + picture, + name, + nickname, + multifactor, + lastIp, + lastLogin, + loginsCount, + blocked, + givenName, + familyName, + 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem.java new file mode 100644 index 00000000..f73ee458 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem.java @@ -0,0 +1,175 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem.Deserializer.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem(value, 0); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem(value, 1); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem(value, 2); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem(value, 3); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem(value, 4); + } + + public interface Visitor { + T visit(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom value); + + T visit(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase value); + + T visit(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise value); + + T visit(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless value); + + T visit(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItem deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom.java new file mode 100644 index 00000000..7c927ced --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom.java @@ -0,0 +1,245 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom { + private final String connection; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom( + String connection, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId userId; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustom( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData.java new file mode 100644 index 00000000..76410844 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData.java @@ -0,0 +1,341 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum.java new file mode 100644 index 00000000..71094488 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum.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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum { + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum CUSTOM = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum(Value.CUSTOM, "custom"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum(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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM: + return visitor.visitCustom(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum valueOf(String value) { + switch (value) { + case "custom": + return CUSTOM; + default: + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM, + + UNKNOWN + } + + public interface Visitor { + T visitCustom(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId.java new file mode 100644 index 00000000..c9d49f23 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId of(String value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId of(int value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemCustomUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase.java new file mode 100644 index 00000000..c35032e9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase.java @@ -0,0 +1,246 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase { + private final String connection; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase( + String connection, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId userId; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabase( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData.java new file mode 100644 index 00000000..7eb74ada --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum.java new file mode 100644 index 00000000..77d5cd02 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum { + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum AUTH0 = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum(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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum valueOf( + String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId.java new file mode 100644 index 00000000..04253211 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId of(String value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId of(int value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemDatabaseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise.java new file mode 100644 index 00000000..c6b3d7e3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise.java @@ -0,0 +1,250 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise { + private final String connection; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId userId; + + private final Optional + profileData; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise( + String connection, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional + getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional + profileData); + + _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId userId; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider; + + private boolean isSocial; + + private Optional + profileData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional + profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterprise( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData.java new file mode 100644 index 00000000..3843adae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java new file mode 100644 index 00000000..e1a95da6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java @@ -0,0 +1,195 @@ +/** + * 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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum { + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum AD = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.AD, "ad"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum + PINGFEDERATE = new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.PINGFEDERATE, "pingfederate"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum OKTA = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.OKTA, "okta"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum SAMLP = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum WAAD = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.WAAD, "waad"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum OFFICE365 = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.OFFICE365, "office365"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum SHAREPOINT = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.SHAREPOINT, "sharepoint"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum IP = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.IP, "ip"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum ADFS = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.ADFS, "adfs"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum OIDC = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.OIDC, "oidc"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum GOOGLE_APPS = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum(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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + return visitor.visitOkta(); + case SAMLP: + return visitor.visitSamlp(); + case WAAD: + return visitor.visitWaad(); + case OFFICE365: + return visitor.visitOffice365(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case IP: + return visitor.visitIp(); + case ADFS: + return visitor.visitAdfs(); + case OIDC: + return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum valueOf( + String value) { + switch (value) { + case "ad": + return AD; + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "waad": + return WAAD; + case "office365": + return OFFICE365; + case "sharepoint": + return SHAREPOINT; + case "ip": + return IP; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + ADFS, + + GOOGLE_APPS, + + IP, + + OFFICE365, + + OIDC, + + OKTA, + + PINGFEDERATE, + + SAMLP, + + SHAREPOINT, + + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitAdfs(); + + T visitGoogleApps(); + + T visitIp(); + + T visitOffice365(); + + T visitOidc(); + + T visitOkta(); + + T visitPingfederate(); + + T visitSamlp(); + + T visitSharepoint(); + + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId.java new file mode 100644 index 00000000..b5a59621 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId of(String value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId of(int value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemEnterpriseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless.java new file mode 100644 index 00000000..70043d0b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless.java @@ -0,0 +1,251 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless { + private final String connection; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId userId; + + private final Optional + profileData; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless( + String connection, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional + getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional + profileData); + + _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId userId; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider; + + private boolean isSocial; + + private Optional + profileData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional + profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordless( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData.java new file mode 100644 index 00000000..7ef28d0e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java new file mode 100644 index 00000000..7024d00b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java @@ -0,0 +1,94 @@ +/** + * 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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum { + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum EMAIL = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum( + Value.EMAIL, "email"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum SMS = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum(Value.SMS, "sms"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum(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 + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case SMS: + return visitor.visitSms(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum valueOf( + String value) { + switch (value) { + case "email": + return EMAIL; + case "sms": + return SMS; + default: + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + SMS, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitSms(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId.java new file mode 100644 index 00000000..31fa2302 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId of(String value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId of(int value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemPasswordlessUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial.java new file mode 100644 index 00000000..4539da37 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial.java @@ -0,0 +1,245 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial { + private final String connection; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial( + String connection, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId userId, + Optional profileData, + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId userId; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocial( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData.java new file mode 100644 index 00000000..93300405 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData.java @@ -0,0 +1,341 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData.Builder.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData build() { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum.java new file mode 100644 index 00000000..0624bc2a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum.java @@ -0,0 +1,519 @@ +/** + * 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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum { + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum BAIDU = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BAIDU, "baidu"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum DWOLLA = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.DWOLLA, "dwolla"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum AUTH0OIDC = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.AUTH0OIDC, "auth0-oidc"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum PLANNINGCENTER = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.PLANNINGCENTER, "planningcenter"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum BITLY = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BITLY, "bitly"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum PAYPAL_SANDBOX = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum DROPBOX = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.DROPBOX, "dropbox"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum GOOGLE_OAUTH2 = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.GOOGLE_OAUTH2, "google-oauth2"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum VKONTAKTE = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.VKONTAKTE, "vkontakte"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum WORDPRESS = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.WORDPRESS, "wordpress"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum EXACT = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.EXACT, "exact"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum INSTAGRAM = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.INSTAGRAM, "instagram"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum FITBIT = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.FITBIT, "fitbit"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum + THIRTYSEVENSIGNALS = new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum EVERNOTE = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE, "evernote"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum SHOPIFY = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SHOPIFY, "shopify"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum + SALESFORCE_SANDBOX = new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum + SALESFORCE_COMMUNITY = new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum FACEBOOK = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.FACEBOOK, "facebook"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum DACCOUNT = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.DACCOUNT, "daccount"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum SOUNDCLOUD = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SOUNDCLOUD, "soundcloud"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum APPLE = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.APPLE, "apple"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum + EVERNOTE_SANDBOX = new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum OAUTH2 = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.OAUTH2, "oauth2"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum OAUTH1 = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.OAUTH1, "oauth1"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum AMAZON = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.AMAZON, "amazon"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum LINE = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.LINE, "line"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum BOX = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BOX, "box"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum UNTAPPED = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.UNTAPPED, "untapped"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum GITHUB = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.GITHUB, "github"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum SALESFORCE = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE, "salesforce"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum BITBUCKET = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.BITBUCKET, "bitbucket"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum YAHOO = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.YAHOO, "yahoo"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum WEIBO = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.WEIBO, "weibo"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum PAYPAL = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.PAYPAL, "paypal"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum LINKEDIN = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.LINKEDIN, "linkedin"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum WINDOWSLIVE = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.WINDOWSLIVE, "windowslive"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum YANDEX = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(Value.YANDEX, "yandex"); + + public static final EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum TWITTER = + new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.TWITTER, "twitter"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum(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 EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BAIDU: + return visitor.visitBaidu(); + case DWOLLA: + return visitor.visitDwolla(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case BITLY: + return visitor.visitBitly(); + case PAYPAL_SANDBOX: + return visitor.visitPaypalSandbox(); + case DROPBOX: + return visitor.visitDropbox(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case VKONTAKTE: + return visitor.visitVkontakte(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case INSTAGRAM: + return visitor.visitInstagram(); + case FITBIT: + return visitor.visitFitbit(); + case THIRTYSEVENSIGNALS: + return visitor.visitThirtysevensignals(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case SALESFORCE_COMMUNITY: + return visitor.visitSalesforceCommunity(); + case FACEBOOK: + return visitor.visitFacebook(); + case DACCOUNT: + return visitor.visitDaccount(); + case SOUNDCLOUD: + return visitor.visitSoundcloud(); + case APPLE: + return visitor.visitApple(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); + case OAUTH2: + return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case BOX: + return visitor.visitBox(); + case UNTAPPED: + return visitor.visitUntapped(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case YAHOO: + return visitor.visitYahoo(); + case WEIBO: + return visitor.visitWeibo(); + case PAYPAL: + return visitor.visitPaypal(); + case LINKEDIN: + return visitor.visitLinkedin(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum valueOf(String value) { + switch (value) { + case "baidu": + return BAIDU; + case "dwolla": + return DWOLLA; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "bitly": + return BITLY; + case "paypal-sandbox": + return PAYPAL_SANDBOX; + case "dropbox": + return DROPBOX; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "vkontakte": + return VKONTAKTE; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "instagram": + return INSTAGRAM; + case "fitbit": + return FITBIT; + case "thirtysevensignals": + return THIRTYSEVENSIGNALS; + case "evernote": + return EVERNOTE; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "salesforce-community": + return SALESFORCE_COMMUNITY; + case "facebook": + return FACEBOOK; + case "daccount": + return DACCOUNT; + case "soundcloud": + return SOUNDCLOUD; + case "apple": + return APPLE; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; + case "oauth2": + return OAUTH2; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "box": + return BOX; + case "untapped": + return UNTAPPED; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "yahoo": + return YAHOO; + case "weibo": + return WEIBO; + case "paypal": + return PAYPAL; + case "linkedin": + return LINKEDIN; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; + default: + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AMAZON, + + APPLE, + + DROPBOX, + + BITBUCKET, + + AUTH0OIDC, + + BAIDU, + + BITLY, + + BOX, + + DACCOUNT, + + DWOLLA, + + EVERNOTE_SANDBOX, + + EVERNOTE, + + EXACT, + + FACEBOOK, + + FITBIT, + + GITHUB, + + GOOGLE_OAUTH2, + + INSTAGRAM, + + LINE, + + LINKEDIN, + + OAUTH1, + + OAUTH2, + + PAYPAL, + + PAYPAL_SANDBOX, + + PLANNINGCENTER, + + SALESFORCE_COMMUNITY, + + SALESFORCE_SANDBOX, + + SALESFORCE, + + SHOPIFY, + + SOUNDCLOUD, + + THIRTYSEVENSIGNALS, + + TWITTER, + + UNTAPPED, + + VKONTAKTE, + + WEIBO, + + WINDOWSLIVE, + + WORDPRESS, + + YAHOO, + + YANDEX, + + UNKNOWN + } + + public interface Visitor { + T visitAmazon(); + + T visitApple(); + + T visitDropbox(); + + T visitBitbucket(); + + T visitAuth0Oidc(); + + T visitBaidu(); + + T visitBitly(); + + T visitBox(); + + T visitDaccount(); + + T visitDwolla(); + + T visitEvernoteSandbox(); + + T visitEvernote(); + + T visitExact(); + + T visitFacebook(); + + T visitFitbit(); + + T visitGithub(); + + T visitGoogleOauth2(); + + T visitInstagram(); + + T visitLine(); + + T visitLinkedin(); + + T visitOauth1(); + + T visitOauth2(); + + T visitPaypal(); + + T visitPaypalSandbox(); + + T visitPlanningcenter(); + + T visitSalesforceCommunity(); + + T visitSalesforceSandbox(); + + T visitSalesforce(); + + T visitShopify(); + + T visitSoundcloud(); + + T visitThirtysevensignals(); + + T visitTwitter(); + + T visitUntapped(); + + T visitVkontakte(); + + T visitWeibo(); + + T visitWindowslive(); + + T visitWordpress(); + + T visitYahoo(); + + T visitYandex(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId.java new file mode 100644 index 00000000..938638f7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId.Deserializer.class) +public final class EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId + && equalTo((EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId of(String value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId(value, 0); + } + + public static EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId of(int value) { + return new EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserDeletedPreviousObjectIdentitiesItemSocialUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java index 6a0b741e..3fb13870 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdated.java @@ -114,7 +114,6 @@ public Builder from(EventStreamCloudEventUserUpdated other) { } /** - *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              *

                                                              Opaque cursor representing position in the stream. Pass as the from query parameter to resume.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java index 74d7dbe6..e6b99b8b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedCloudEvent.java @@ -22,7 +22,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EventStreamCloudEventUserUpdatedCloudEvent.Builder.class) public final class EventStreamCloudEventUserUpdatedCloudEvent { - private final String specversion; + private final EventStreamCloudEventSpecVersionEnum specversion; private final EventStreamCloudEventUserUpdatedCloudEventTypeEnum type; @@ -36,21 +36,21 @@ public final class EventStreamCloudEventUserUpdatedCloudEvent { private final String a0Tenant; - private final String a0Stream; + private final Optional a0Stream; private final Optional a0Purpose; private final Map additionalProperties; private EventStreamCloudEventUserUpdatedCloudEvent( - String specversion, + EventStreamCloudEventSpecVersionEnum specversion, EventStreamCloudEventUserUpdatedCloudEventTypeEnum type, String source, String id, OffsetDateTime time, EventStreamCloudEventUserUpdatedData data, String a0Tenant, - String a0Stream, + Optional a0Stream, Optional a0Purpose, Map additionalProperties) { this.specversion = specversion; @@ -65,11 +65,8 @@ private EventStreamCloudEventUserUpdatedCloudEvent( this.additionalProperties = additionalProperties; } - /** - * @return The version of the CloudEvents specification which the event uses. - */ @JsonProperty("specversion") - public String getSpecversion() { + public EventStreamCloudEventSpecVersionEnum getSpecversion() { return specversion; } @@ -117,9 +114,11 @@ public String getA0Tenant() { /** * @return The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events). */ @JsonProperty("a0stream") - public String getA0Stream() { + public Optional getA0Stream() { return a0Stream; } @@ -176,10 +175,7 @@ public static SpecversionStage builder() { } public interface SpecversionStage { - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - */ - TypeStage specversion(@NotNull String specversion); + TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion); Builder from(EventStreamCloudEventUserUpdatedCloudEvent other); } @@ -217,14 +213,7 @@ public interface A0TenantStage { /** *

                                                              The auth0 tenant ID to which the event is associated.

                                                              */ - A0StreamStage a0Tenant(@NotNull String a0Tenant); - } - - public interface A0StreamStage { - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - */ - _FinalStage a0Stream(@NotNull String a0Stream); + _FinalStage a0Tenant(@NotNull String a0Tenant); } public interface _FinalStage { @@ -234,6 +223,15 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + _FinalStage a0Stream(Optional a0Stream); + + _FinalStage a0Stream(String a0Stream); + _FinalStage a0Purpose(Optional a0Purpose); _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose); @@ -248,9 +246,8 @@ public static final class Builder TimeStage, DataStage, A0TenantStage, - A0StreamStage, _FinalStage { - private String specversion; + private EventStreamCloudEventSpecVersionEnum specversion; private EventStreamCloudEventUserUpdatedCloudEventTypeEnum type; @@ -264,10 +261,10 @@ public static final class Builder private String a0Tenant; - private String a0Stream; - private Optional a0Purpose = Optional.empty(); + private Optional a0Stream = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -287,14 +284,9 @@ public Builder from(EventStreamCloudEventUserUpdatedCloudEvent other) { return this; } - /** - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - *

                                                              The version of the CloudEvents specification which the event uses.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("specversion") - public TypeStage specversion(@NotNull String specversion) { + public TypeStage specversion(@NotNull EventStreamCloudEventSpecVersionEnum specversion) { this.specversion = Objects.requireNonNull(specversion, "specversion must not be null"); return this; } @@ -307,7 +299,6 @@ public SourceStage type(@NotNull EventStreamCloudEventUserUpdatedCloudEventTypeE } /** - *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              *

                                                              The source of the event. This will take the form 'urn:auth0:<tenant>.<domain>'.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +310,6 @@ public IdStage source(@NotNull String source) { } /** - *

                                                              A unique identifier for the event.

                                                              *

                                                              A unique identifier for the event.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +321,6 @@ public TimeStage id(@NotNull String id) { } /** - *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              *

                                                              An ISO-8601 timestamp indicating when the event physically occurred.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -350,29 +339,16 @@ public A0TenantStage data(@NotNull EventStreamCloudEventUserUpdatedData data) { } /** - *

                                                              The auth0 tenant ID to which the event is associated.

                                                              *

                                                              The auth0 tenant ID to which the event is associated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @JsonSetter("a0tenant") - public A0StreamStage a0Tenant(@NotNull String a0Tenant) { + public _FinalStage a0Tenant(@NotNull String a0Tenant) { this.a0Tenant = Objects.requireNonNull(a0Tenant, "a0Tenant must not be null"); return this; } - /** - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - *

                                                              The auth0 event stream ID of the stream the event was delivered on.

                                                              - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("a0stream") - public _FinalStage a0Stream(@NotNull String a0Stream) { - this.a0Stream = Objects.requireNonNull(a0Stream, "a0Stream must not be null"); - return this; - } - @java.lang.Override public _FinalStage a0Purpose(EventStreamCloudEventA0PurposeEnum a0Purpose) { this.a0Purpose = Optional.ofNullable(a0Purpose); @@ -386,6 +362,30 @@ public _FinalStage a0Purpose(Optional a0Purp return this; } + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage a0Stream(String a0Stream) { + this.a0Stream = Optional.ofNullable(a0Stream); + return this; + } + + /** + *

                                                              The auth0 event stream ID of the stream the event was delivered on. + * Present when the event is delivered via an event stream; omitted when + * events are retrieved via the Events API (GET /api/v2/events).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "a0stream", nulls = Nulls.SKIP) + public _FinalStage a0Stream(Optional a0Stream) { + this.a0Stream = a0Stream; + return this; + } + @java.lang.Override public EventStreamCloudEventUserUpdatedCloudEvent build() { return new EventStreamCloudEventUserUpdatedCloudEvent( diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java index 652ed0ef..e6523147 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedData.java @@ -23,15 +23,19 @@ public final class EventStreamCloudEventUserUpdatedData { private final EventStreamCloudEventUserUpdatedObject object; + private final Optional previousObject; + private final Optional context; private final Map additionalProperties; private EventStreamCloudEventUserUpdatedData( EventStreamCloudEventUserUpdatedObject object, + Optional previousObject, Optional context, Map additionalProperties) { this.object = object; + this.previousObject = previousObject; this.context = context; this.additionalProperties = additionalProperties; } @@ -41,6 +45,11 @@ public EventStreamCloudEventUserUpdatedObject getObject() { return object; } + @JsonProperty("previous_object") + public Optional getPreviousObject() { + return previousObject; + } + @JsonProperty("context") public Optional getContext() { return context; @@ -59,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(EventStreamCloudEventUserUpdatedData other) { - return object.equals(other.object) && context.equals(other.context); + return object.equals(other.object) + && previousObject.equals(other.previousObject) + && context.equals(other.context); } @java.lang.Override public int hashCode() { - return Objects.hash(this.object, this.context); + return Objects.hash(this.object, this.previousObject, this.context); } @java.lang.Override @@ -89,6 +100,10 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + _FinalStage previousObject(Optional previousObject); + + _FinalStage previousObject(EventStreamCloudEventUserUpdatedPreviousObject previousObject); + _FinalStage context(Optional context); _FinalStage context(EventStreamCloudEventContext context); @@ -100,6 +115,8 @@ public static final class Builder implements ObjectStage, _FinalStage { private Optional context = Optional.empty(); + private Optional previousObject = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -108,6 +125,7 @@ private Builder() {} @java.lang.Override public Builder from(EventStreamCloudEventUserUpdatedData other) { object(other.getObject()); + previousObject(other.getPreviousObject()); context(other.getContext()); return this; } @@ -132,9 +150,22 @@ public _FinalStage context(Optional context) { return this; } + @java.lang.Override + public _FinalStage previousObject(EventStreamCloudEventUserUpdatedPreviousObject previousObject) { + this.previousObject = Optional.ofNullable(previousObject); + return this; + } + + @java.lang.Override + @JsonSetter(value = "previous_object", nulls = Nulls.SKIP) + public _FinalStage previousObject(Optional previousObject) { + this.previousObject = previousObject; + return this; + } + @java.lang.Override public EventStreamCloudEventUserUpdatedData build() { - return new EventStreamCloudEventUserUpdatedData(object, context, additionalProperties); + return new EventStreamCloudEventUserUpdatedData(object, previousObject, context, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java index b13a9f46..718d9e7a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObject.java @@ -577,7 +577,6 @@ public Builder from(EventStreamCloudEventUserUpdatedObject other) { } /** - *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -589,7 +588,6 @@ public CreatedAtStage userId(@NotNull String userId) { } /** - *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -601,7 +599,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java index 129e8c3a..a9ee1771 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemCustom o } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java index e8151f7c..c657a1b4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemDatabase } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java index f6e0423a..d1ae51fd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterprise.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemEnterpri } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java index ebd5f877..647e5811 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemPasswordless.java @@ -176,7 +176,6 @@ public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemPassword } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java index f1fad131..c4145bd4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial.java @@ -175,7 +175,6 @@ public Builder from(EventStreamCloudEventUserUpdatedObjectIdentitiesItemSocial o } /** - *

                                                              Name of the connection containing this identity.

                                                              *

                                                              Name of the connection containing this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObject.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObject.java new file mode 100644 index 00000000..404ca895 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObject.java @@ -0,0 +1,1013 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = EventStreamCloudEventUserUpdatedPreviousObject.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObject { + private final String userId; + + private final Optional email; + + private final Optional emailVerified; + + private final Optional username; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final List identities; + + private final Optional> appMetadata; + + private final Optional> userMetadata; + + private final Optional picture; + + private final Optional name; + + private final Optional nickname; + + private final Optional> multifactor; + + private final Optional lastIp; + + private final Optional lastLogin; + + private final Optional loginsCount; + + private final Optional blocked; + + private final Optional givenName; + + private final Optional familyName; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObject( + String userId, + Optional email, + Optional emailVerified, + Optional username, + Optional phoneNumber, + Optional phoneVerified, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + List identities, + Optional> appMetadata, + Optional> userMetadata, + Optional picture, + Optional name, + Optional nickname, + Optional> multifactor, + Optional lastIp, + Optional lastLogin, + Optional loginsCount, + Optional blocked, + Optional givenName, + Optional familyName, + Map additionalProperties) { + this.userId = userId; + this.email = email; + this.emailVerified = emailVerified; + this.username = username; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.identities = identities; + this.appMetadata = appMetadata; + this.userMetadata = userMetadata; + this.picture = picture; + this.name = name; + this.nickname = nickname; + this.multifactor = multifactor; + this.lastIp = lastIp; + this.lastLogin = lastLogin; + this.loginsCount = loginsCount; + this.blocked = blocked; + this.givenName = givenName; + this.familyName = familyName; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the user which can be used when interacting with other APIs. + */ + @JsonProperty("user_id") + public String getUserId() { + return userId; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + /** + * @return Date and time when this entity was created (ISO_8601 format). + */ + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * @return Date and time when this entity was last updated/modified (ISO_8601 format). + */ + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * @return Array of user identity objects when accounts are linked. + */ + @JsonProperty("identities") + public List getIdentities() { + return identities; + } + + @JsonProperty("app_metadata") + public Optional> getAppMetadata() { + return appMetadata; + } + + @JsonProperty("user_metadata") + public Optional> getUserMetadata() { + return userMetadata; + } + + /** + * @return URL to picture, photo, or avatar of this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Preferred nickname or alias of this user. + */ + @JsonProperty("nickname") + public Optional getNickname() { + return nickname; + } + + /** + * @return List of multi-factor authentication providers with which this user has enrolled. + */ + @JsonProperty("multifactor") + public Optional> getMultifactor() { + return multifactor; + } + + /** + * @return Last IP address from which this user logged in. + */ + @JsonProperty("last_ip") + public Optional getLastIp() { + return lastIp; + } + + /** + * @return Last date and time this user logged in (ISO_8601 format). + */ + @JsonProperty("last_login") + public Optional getLastLogin() { + return lastLogin; + } + + /** + * @return Total number of logins this user has performed. + */ + @JsonProperty("logins_count") + public Optional getLoginsCount() { + return loginsCount; + } + + /** + * @return Whether this user was blocked by an administrator (true) or is not (false). + */ + @JsonProperty("blocked") + public Optional getBlocked() { + return blocked; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObject + && equalTo((EventStreamCloudEventUserUpdatedPreviousObject) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObject other) { + return userId.equals(other.userId) + && email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && username.equals(other.username) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) + && identities.equals(other.identities) + && appMetadata.equals(other.appMetadata) + && userMetadata.equals(other.userMetadata) + && picture.equals(other.picture) + && name.equals(other.name) + && nickname.equals(other.nickname) + && multifactor.equals(other.multifactor) + && lastIp.equals(other.lastIp) + && lastLogin.equals(other.lastLogin) + && loginsCount.equals(other.loginsCount) + && blocked.equals(other.blocked) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.userId, + this.email, + this.emailVerified, + this.username, + this.phoneNumber, + this.phoneVerified, + this.createdAt, + this.updatedAt, + this.identities, + this.appMetadata, + this.userMetadata, + this.picture, + this.name, + this.nickname, + this.multifactor, + this.lastIp, + this.lastLogin, + this.loginsCount, + this.blocked, + this.givenName, + this.familyName); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static UserIdStage builder() { + return new Builder(); + } + + public interface UserIdStage { + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + */ + CreatedAtStage userId(@NotNull String userId); + + Builder from(EventStreamCloudEventUserUpdatedPreviousObject other); + } + + public interface CreatedAtStage { + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + */ + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + */ + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedPreviousObject build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Email address of this user.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + _FinalStage emailVerified(Optional emailVerified); + + _FinalStage emailVerified(Boolean emailVerified); + + /** + *

                                                              Username of this user.

                                                              + */ + _FinalStage username(Optional username); + + _FinalStage username(String username); + + /** + *

                                                              Phone number of this user.

                                                              + */ + _FinalStage phoneNumber(Optional phoneNumber); + + _FinalStage phoneNumber(String phoneNumber); + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + _FinalStage phoneVerified(Optional phoneVerified); + + _FinalStage phoneVerified(Boolean phoneVerified); + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + */ + _FinalStage identities(List identities); + + _FinalStage addIdentities(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem identities); + + _FinalStage addAllIdentities(List identities); + + _FinalStage appMetadata(Optional> appMetadata); + + _FinalStage appMetadata(Map appMetadata); + + _FinalStage userMetadata(Optional> userMetadata); + + _FinalStage userMetadata(Map userMetadata); + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + */ + _FinalStage picture(Optional picture); + + _FinalStage picture(String picture); + + /** + *

                                                              Name of this user.

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + */ + _FinalStage nickname(Optional nickname); + + _FinalStage nickname(String nickname); + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + */ + _FinalStage multifactor(Optional> multifactor); + + _FinalStage multifactor(List multifactor); + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + */ + _FinalStage lastIp(Optional lastIp); + + _FinalStage lastIp(String lastIp); + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + */ + _FinalStage lastLogin(Optional lastLogin); + + _FinalStage lastLogin(OffsetDateTime lastLogin); + + /** + *

                                                              Total number of logins this user has performed.

                                                              + */ + _FinalStage loginsCount(Optional loginsCount); + + _FinalStage loginsCount(Integer loginsCount); + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + */ + _FinalStage blocked(Optional blocked); + + _FinalStage blocked(Boolean blocked); + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + _FinalStage givenName(Optional givenName); + + _FinalStage givenName(String givenName); + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + _FinalStage familyName(Optional familyName); + + _FinalStage familyName(String familyName); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements UserIdStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String userId; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional familyName = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional blocked = Optional.empty(); + + private Optional loginsCount = Optional.empty(); + + private Optional lastLogin = Optional.empty(); + + private Optional lastIp = Optional.empty(); + + private Optional> multifactor = Optional.empty(); + + private Optional nickname = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional> userMetadata = Optional.empty(); + + private Optional> appMetadata = Optional.empty(); + + private List identities = new ArrayList<>(); + + private Optional phoneVerified = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedPreviousObject other) { + userId(other.getUserId()); + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + username(other.getUsername()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + identities(other.getIdentities()); + appMetadata(other.getAppMetadata()); + userMetadata(other.getUserMetadata()); + picture(other.getPicture()); + name(other.getName()); + nickname(other.getNickname()); + multifactor(other.getMultifactor()); + lastIp(other.getLastIp()); + lastLogin(other.getLastLogin()); + loginsCount(other.getLoginsCount()); + blocked(other.getBlocked()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + return this; + } + + /** + *

                                                              ID of the user which can be used when interacting with other APIs.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("user_id") + public CreatedAtStage userId(@NotNull String userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was created (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + /** + *

                                                              Date and time when this entity was last updated/modified (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public _FinalStage familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public _FinalStage givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage blocked(Boolean blocked) { + this.blocked = Optional.ofNullable(blocked); + return this; + } + + /** + *

                                                              Whether this user was blocked by an administrator (true) or is not (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "blocked", nulls = Nulls.SKIP) + public _FinalStage blocked(Optional blocked) { + this.blocked = blocked; + return this; + } + + /** + *

                                                              Total number of logins this user has performed.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage loginsCount(Integer loginsCount) { + this.loginsCount = Optional.ofNullable(loginsCount); + return this; + } + + /** + *

                                                              Total number of logins this user has performed.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) + public _FinalStage loginsCount(Optional loginsCount) { + this.loginsCount = loginsCount; + return this; + } + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = Optional.ofNullable(lastLogin); + return this; + } + + /** + *

                                                              Last date and time this user logged in (ISO_8601 format).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "last_login", nulls = Nulls.SKIP) + public _FinalStage lastLogin(Optional lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastIp(String lastIp) { + this.lastIp = Optional.ofNullable(lastIp); + return this; + } + + /** + *

                                                              Last IP address from which this user logged in.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) + public _FinalStage lastIp(Optional lastIp) { + this.lastIp = lastIp; + return this; + } + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage multifactor(List multifactor) { + this.multifactor = Optional.ofNullable(multifactor); + return this; + } + + /** + *

                                                              List of multi-factor authentication providers with which this user has enrolled.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) + public _FinalStage multifactor(Optional> multifactor) { + this.multifactor = multifactor; + return this; + } + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage nickname(String nickname) { + this.nickname = Optional.ofNullable(nickname); + return this; + } + + /** + *

                                                              Preferred nickname or alias of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "nickname", nulls = Nulls.SKIP) + public _FinalStage nickname(Optional nickname) { + this.nickname = nickname; + return this; + } + + /** + *

                                                              Name of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

                                                              URL to picture, photo, or avatar of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public _FinalStage picture(Optional picture) { + this.picture = picture; + return this; + } + + @java.lang.Override + public _FinalStage userMetadata(Map userMetadata) { + this.userMetadata = Optional.ofNullable(userMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) + public _FinalStage userMetadata(Optional> userMetadata) { + this.userMetadata = userMetadata; + return this; + } + + @java.lang.Override + public _FinalStage appMetadata(Map appMetadata) { + this.appMetadata = Optional.ofNullable(appMetadata); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) + public _FinalStage appMetadata(Optional> appMetadata) { + this.appMetadata = appMetadata; + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllIdentities( + List identities) { + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addIdentities(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem identities) { + this.identities.add(identities); + return this; + } + + /** + *

                                                              Array of user identity objects when accounts are linked.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "identities", nulls = Nulls.SKIP) + public _FinalStage identities(List identities) { + this.identities.clear(); + if (identities != null) { + this.identities.addAll(identities); + } + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public _FinalStage phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public _FinalStage phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + *

                                                              Username of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public _FinalStage username(Optional username) { + this.username = username; + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public _FinalStage emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObject build() { + return new EventStreamCloudEventUserUpdatedPreviousObject( + userId, + email, + emailVerified, + username, + phoneNumber, + phoneVerified, + createdAt, + updatedAt, + identities, + appMetadata, + userMetadata, + picture, + name, + nickname, + multifactor, + lastIp, + lastLogin, + loginsCount, + blocked, + givenName, + familyName, + 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem.java new file mode 100644 index 00000000..b9d0c52b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem.java @@ -0,0 +1,175 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom) this.value); + } else if (this.type == 1) { + return visitor.visit((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase) this.value); + } else if (this.type == 2) { + return visitor.visit((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise) this.value); + } else if (this.type == 3) { + return visitor.visit((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless) this.value); + } else if (this.type == 4) { + return visitor.visit((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem(value, 0); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem(value, 1); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem(value, 2); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem(value, 3); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem of( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem(value, 4); + } + + public interface Visitor { + T visit(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom value); + + T visit(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase value); + + T visit(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise value); + + T visit(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless value); + + T visit(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItem deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map + && ((Map) value).containsKey("connection") + && ((Map) value).containsKey("user_id") + && ((Map) value).containsKey("provider") + && ((Map) value).containsKey("isSocial")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial.class)); + } catch (RuntimeException e) { + } + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom.java new file mode 100644 index 00000000..2286da86 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom.java @@ -0,0 +1,245 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom { + private final String connection; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom( + String connection, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId userId; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustom( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData.java new file mode 100644 index 00000000..d5a07d25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData.java @@ -0,0 +1,341 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum.java new file mode 100644 index 00000000..cfbbe45a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum.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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum { + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum CUSTOM = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum(Value.CUSTOM, "custom"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum(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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CUSTOM: + return visitor.visitCustom(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum valueOf(String value) { + switch (value) { + case "custom": + return CUSTOM; + default: + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + CUSTOM, + + UNKNOWN + } + + public interface Visitor { + T visitCustom(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId.java new file mode 100644 index 00000000..e59e634f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId of(String value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId of(int value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemCustomUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase.java new file mode 100644 index 00000000..558725fe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase.java @@ -0,0 +1,246 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase { + private final String connection; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase( + String connection, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId userId; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabase( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData.java new file mode 100644 index 00000000..2ab4f944 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum.java new file mode 100644 index 00000000..71959d58 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum.java @@ -0,0 +1,80 @@ +/** + * 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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum { + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum AUTH0 = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum(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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum valueOf( + String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId.java new file mode 100644 index 00000000..10371734 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId of(String value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId of(int value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemDatabaseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise.java new file mode 100644 index 00000000..504364a9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise.java @@ -0,0 +1,250 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise { + private final String connection; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId userId; + + private final Optional + profileData; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise( + String connection, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional + getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional + profileData); + + _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId userId; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider; + + private boolean isSocial; + + private Optional + profileData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional + profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterprise( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData.java new file mode 100644 index 00000000..ba5ea9af --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java new file mode 100644 index 00000000..541c1c0a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum.java @@ -0,0 +1,195 @@ +/** + * 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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum { + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum AD = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.AD, "ad"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum + PINGFEDERATE = new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.PINGFEDERATE, "pingfederate"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum OKTA = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.OKTA, "okta"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum SAMLP = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.SAMLP, "samlp"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum WAAD = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.WAAD, "waad"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum OFFICE365 = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.OFFICE365, "office365"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum SHAREPOINT = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.SHAREPOINT, "sharepoint"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum IP = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.IP, "ip"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum ADFS = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.ADFS, "adfs"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum OIDC = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(Value.OIDC, "oidc"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum GOOGLE_APPS = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.GOOGLE_APPS, "google-apps"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum(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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AD: + return visitor.visitAd(); + case PINGFEDERATE: + return visitor.visitPingfederate(); + case OKTA: + return visitor.visitOkta(); + case SAMLP: + return visitor.visitSamlp(); + case WAAD: + return visitor.visitWaad(); + case OFFICE365: + return visitor.visitOffice365(); + case SHAREPOINT: + return visitor.visitSharepoint(); + case IP: + return visitor.visitIp(); + case ADFS: + return visitor.visitAdfs(); + case OIDC: + return visitor.visitOidc(); + case GOOGLE_APPS: + return visitor.visitGoogleApps(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum valueOf( + String value) { + switch (value) { + case "ad": + return AD; + case "pingfederate": + return PINGFEDERATE; + case "okta": + return OKTA; + case "samlp": + return SAMLP; + case "waad": + return WAAD; + case "office365": + return OFFICE365; + case "sharepoint": + return SHAREPOINT; + case "ip": + return IP; + case "adfs": + return ADFS; + case "oidc": + return OIDC; + case "google-apps": + return GOOGLE_APPS; + default: + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AD, + + ADFS, + + GOOGLE_APPS, + + IP, + + OFFICE365, + + OIDC, + + OKTA, + + PINGFEDERATE, + + SAMLP, + + SHAREPOINT, + + WAAD, + + UNKNOWN + } + + public interface Visitor { + T visitAd(); + + T visitAdfs(); + + T visitGoogleApps(); + + T visitIp(); + + T visitOffice365(); + + T visitOidc(); + + T visitOkta(); + + T visitPingfederate(); + + T visitSamlp(); + + T visitSharepoint(); + + T visitWaad(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId.java new file mode 100644 index 00000000..f5909828 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId of(String value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId of(int value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemEnterpriseUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless.java new file mode 100644 index 00000000..9c7e24af --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless.java @@ -0,0 +1,251 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless { + private final String connection; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId userId; + + private final Optional + profileData; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless( + String connection, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional + getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless other); + } + + public interface UserIdStage { + ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional + profileData); + + _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId userId; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider; + + private boolean isSocial; + + private Optional + profileData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional + profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordless( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData.java new file mode 100644 index 00000000..5ef44b05 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData.java @@ -0,0 +1,342 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize( + builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java new file mode 100644 index 00000000..5a9dc454 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum.java @@ -0,0 +1,94 @@ +/** + * 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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum { + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum EMAIL = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum( + Value.EMAIL, "email"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum SMS = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum(Value.SMS, "sms"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum(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 + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum) + other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EMAIL: + return visitor.visitEmail(); + case SMS: + return visitor.visitSms(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum valueOf( + String value) { + switch (value) { + case "email": + return EMAIL; + case "sms": + return SMS; + default: + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + EMAIL, + + SMS, + + UNKNOWN + } + + public interface Visitor { + T visitEmail(); + + T visitSms(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId.java new file mode 100644 index 00000000..7f31300e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize( + using = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId of(String value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId of(int value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemPasswordlessUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial.java new file mode 100644 index 00000000..2348c6be --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial.java @@ -0,0 +1,245 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial { + private final String connection; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId userId; + + private final Optional profileData; + + private final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum provider; + + private final boolean isSocial; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial( + String connection, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId userId, + Optional profileData, + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum provider, + boolean isSocial, + Map additionalProperties) { + this.connection = connection; + this.userId = userId; + this.profileData = profileData; + this.provider = provider; + this.isSocial = isSocial; + this.additionalProperties = additionalProperties; + } + + /** + * @return Name of the connection containing this identity. + */ + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("user_id") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId getUserId() { + return userId; + } + + @JsonProperty("profileData") + public Optional getProfileData() { + return profileData; + } + + @JsonProperty("provider") + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum getProvider() { + return provider; + } + + @JsonProperty("isSocial") + public boolean getIsSocial() { + return isSocial; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial other) { + return connection.equals(other.connection) + && userId.equals(other.userId) + && profileData.equals(other.profileData) + && provider.equals(other.provider) + && isSocial == other.isSocial; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.userId, this.profileData, this.provider, this.isSocial); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + /** + *

                                                              Name of the connection containing this identity.

                                                              + */ + UserIdStage connection(@NotNull String connection); + + Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial other); + } + + public interface UserIdStage { + ProviderStage userId(@NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId userId); + } + + public interface ProviderStage { + IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum provider); + } + + public interface IsSocialStage { + _FinalStage isSocial(boolean isSocial); + } + + public interface _FinalStage { + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage profileData( + Optional profileData); + + _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData profileData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements ConnectionStage, UserIdStage, ProviderStage, IsSocialStage, _FinalStage { + private String connection; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId userId; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum provider; + + private boolean isSocial; + + private Optional profileData = + Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial other) { + connection(other.getConnection()); + userId(other.getUserId()); + profileData(other.getProfileData()); + provider(other.getProvider()); + isSocial(other.getIsSocial()); + return this; + } + + /** + *

                                                              Name of the connection containing this identity.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("connection") + public UserIdStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("user_id") + public ProviderStage userId( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId userId) { + this.userId = Objects.requireNonNull(userId, "userId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public IsSocialStage provider( + @NotNull EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("isSocial") + public _FinalStage isSocial(boolean isSocial) { + this.isSocial = isSocial; + return this; + } + + @java.lang.Override + public _FinalStage profileData( + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData profileData) { + this.profileData = Optional.ofNullable(profileData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "profileData", nulls = Nulls.SKIP) + public _FinalStage profileData( + Optional profileData) { + this.profileData = profileData; + return this; + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocial( + connection, userId, profileData, provider, isSocial, 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData.java new file mode 100644 index 00000000..0e52523b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData.java @@ -0,0 +1,341 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData.Builder.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData { + private final Optional email; + + private final Optional emailVerified; + + private final Optional name; + + private final Optional username; + + private final Optional givenName; + + private final Optional familyName; + + private final Optional phoneNumber; + + private final Optional phoneVerified; + + private final Map additionalProperties; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData( + Optional email, + Optional emailVerified, + Optional name, + Optional username, + Optional givenName, + Optional familyName, + Optional phoneNumber, + Optional phoneVerified, + Map additionalProperties) { + this.email = email; + this.emailVerified = emailVerified; + this.name = name; + this.username = username; + this.givenName = givenName; + this.familyName = familyName; + this.phoneNumber = phoneNumber; + this.phoneVerified = phoneVerified; + this.additionalProperties = additionalProperties; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Whether this email address is verified (true) or unverified (false). + */ + @JsonProperty("email_verified") + public Optional getEmailVerified() { + return emailVerified; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Username of this user. + */ + @JsonProperty("username") + public Optional getUsername() { + return username; + } + + /** + * @return Given name/first name/forename of this user. + */ + @JsonProperty("given_name") + public Optional getGivenName() { + return givenName; + } + + /** + * @return Family name/last name/surname of this user. + */ + @JsonProperty("family_name") + public Optional getFamilyName() { + return familyName; + } + + /** + * @return Phone number of this user. + */ + @JsonProperty("phone_number") + public Optional getPhoneNumber() { + return phoneNumber; + } + + /** + * @return Whether this phone number has been verified (true) or not (false). + */ + @JsonProperty("phone_verified") + public Optional getPhoneVerified() { + return phoneVerified; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData other) { + return email.equals(other.email) + && emailVerified.equals(other.emailVerified) + && name.equals(other.name) + && username.equals(other.username) + && givenName.equals(other.givenName) + && familyName.equals(other.familyName) + && phoneNumber.equals(other.phoneNumber) + && phoneVerified.equals(other.phoneVerified); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.email, + this.emailVerified, + this.name, + this.username, + this.givenName, + this.familyName, + this.phoneNumber, + this.phoneVerified); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional username = Optional.empty(); + + private Optional givenName = Optional.empty(); + + private Optional familyName = Optional.empty(); + + private Optional phoneNumber = Optional.empty(); + + private Optional phoneVerified = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData other) { + email(other.getEmail()); + emailVerified(other.getEmailVerified()); + name(other.getName()); + username(other.getUsername()); + givenName(other.getGivenName()); + familyName(other.getFamilyName()); + phoneNumber(other.getPhoneNumber()); + phoneVerified(other.getPhoneVerified()); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Whether this email address is verified (true) or unverified (false).

                                                              + */ + @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) + public Builder emailVerified(Optional emailVerified) { + this.emailVerified = emailVerified; + return this; + } + + public Builder emailVerified(Boolean emailVerified) { + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Username of this user.

                                                              + */ + @JsonSetter(value = "username", nulls = Nulls.SKIP) + public Builder username(Optional username) { + this.username = username; + return this; + } + + public Builder username(String username) { + this.username = Optional.ofNullable(username); + return this; + } + + /** + *

                                                              Given name/first name/forename of this user.

                                                              + */ + @JsonSetter(value = "given_name", nulls = Nulls.SKIP) + public Builder givenName(Optional givenName) { + this.givenName = givenName; + return this; + } + + public Builder givenName(String givenName) { + this.givenName = Optional.ofNullable(givenName); + return this; + } + + /** + *

                                                              Family name/last name/surname of this user.

                                                              + */ + @JsonSetter(value = "family_name", nulls = Nulls.SKIP) + public Builder familyName(Optional familyName) { + this.familyName = familyName; + return this; + } + + public Builder familyName(String familyName) { + this.familyName = Optional.ofNullable(familyName); + return this; + } + + /** + *

                                                              Phone number of this user.

                                                              + */ + @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) + public Builder phoneNumber(Optional phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + public Builder phoneNumber(String phoneNumber) { + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + *

                                                              Whether this phone number has been verified (true) or not (false).

                                                              + */ + @JsonSetter(value = "phone_verified", nulls = Nulls.SKIP) + public Builder phoneVerified(Optional phoneVerified) { + this.phoneVerified = phoneVerified; + return this; + } + + public Builder phoneVerified(Boolean phoneVerified) { + this.phoneVerified = Optional.ofNullable(phoneVerified); + return this; + } + + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData build() { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProfileData( + email, + emailVerified, + name, + username, + givenName, + familyName, + phoneNumber, + phoneVerified, + 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/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum.java new file mode 100644 index 00000000..5d689787 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum.java @@ -0,0 +1,519 @@ +/** + * 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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum { + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum BAIDU = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BAIDU, "baidu"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum DWOLLA = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.DWOLLA, "dwolla"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum AUTH0OIDC = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.AUTH0OIDC, "auth0-oidc"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum PLANNINGCENTER = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.PLANNINGCENTER, "planningcenter"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum BITLY = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BITLY, "bitly"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum PAYPAL_SANDBOX = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.PAYPAL_SANDBOX, "paypal-sandbox"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum DROPBOX = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.DROPBOX, "dropbox"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum GOOGLE_OAUTH2 = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.GOOGLE_OAUTH2, "google-oauth2"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum VKONTAKTE = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.VKONTAKTE, "vkontakte"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum WORDPRESS = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.WORDPRESS, "wordpress"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum EXACT = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.EXACT, "exact"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum INSTAGRAM = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.INSTAGRAM, "instagram"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum FITBIT = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.FITBIT, "fitbit"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum + THIRTYSEVENSIGNALS = new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum EVERNOTE = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE, "evernote"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum SHOPIFY = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SHOPIFY, "shopify"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum + SALESFORCE_SANDBOX = new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum + SALESFORCE_COMMUNITY = new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE_COMMUNITY, "salesforce-community"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum FACEBOOK = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.FACEBOOK, "facebook"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum DACCOUNT = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.DACCOUNT, "daccount"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum SOUNDCLOUD = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SOUNDCLOUD, "soundcloud"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum APPLE = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.APPLE, "apple"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum + EVERNOTE_SANDBOX = new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.EVERNOTE_SANDBOX, "evernote-sandbox"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum OAUTH2 = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.OAUTH2, "oauth2"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum OAUTH1 = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.OAUTH1, "oauth1"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum AMAZON = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.AMAZON, "amazon"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum LINE = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.LINE, "line"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum BOX = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.BOX, "box"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum UNTAPPED = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.UNTAPPED, "untapped"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum GITHUB = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.GITHUB, "github"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum SALESFORCE = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.SALESFORCE, "salesforce"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum BITBUCKET = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.BITBUCKET, "bitbucket"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum YAHOO = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.YAHOO, "yahoo"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum WEIBO = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.WEIBO, "weibo"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum PAYPAL = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.PAYPAL, "paypal"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum LINKEDIN = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.LINKEDIN, "linkedin"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum WINDOWSLIVE = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.WINDOWSLIVE, "windowslive"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum YANDEX = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(Value.YANDEX, "yandex"); + + public static final EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum TWITTER = + new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.TWITTER, "twitter"); + + private final Value value; + + private final String string; + + EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum(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 EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum + && this.string.equals( + ((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum) other) + .string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case BAIDU: + return visitor.visitBaidu(); + case DWOLLA: + return visitor.visitDwolla(); + case AUTH0OIDC: + return visitor.visitAuth0Oidc(); + case PLANNINGCENTER: + return visitor.visitPlanningcenter(); + case BITLY: + return visitor.visitBitly(); + case PAYPAL_SANDBOX: + return visitor.visitPaypalSandbox(); + case DROPBOX: + return visitor.visitDropbox(); + case GOOGLE_OAUTH2: + return visitor.visitGoogleOauth2(); + case VKONTAKTE: + return visitor.visitVkontakte(); + case WORDPRESS: + return visitor.visitWordpress(); + case EXACT: + return visitor.visitExact(); + case INSTAGRAM: + return visitor.visitInstagram(); + case FITBIT: + return visitor.visitFitbit(); + case THIRTYSEVENSIGNALS: + return visitor.visitThirtysevensignals(); + case EVERNOTE: + return visitor.visitEvernote(); + case SHOPIFY: + return visitor.visitShopify(); + case SALESFORCE_SANDBOX: + return visitor.visitSalesforceSandbox(); + case SALESFORCE_COMMUNITY: + return visitor.visitSalesforceCommunity(); + case FACEBOOK: + return visitor.visitFacebook(); + case DACCOUNT: + return visitor.visitDaccount(); + case SOUNDCLOUD: + return visitor.visitSoundcloud(); + case APPLE: + return visitor.visitApple(); + case EVERNOTE_SANDBOX: + return visitor.visitEvernoteSandbox(); + case OAUTH2: + return visitor.visitOauth2(); + case OAUTH1: + return visitor.visitOauth1(); + case AMAZON: + return visitor.visitAmazon(); + case LINE: + return visitor.visitLine(); + case BOX: + return visitor.visitBox(); + case UNTAPPED: + return visitor.visitUntapped(); + case GITHUB: + return visitor.visitGithub(); + case SALESFORCE: + return visitor.visitSalesforce(); + case BITBUCKET: + return visitor.visitBitbucket(); + case YAHOO: + return visitor.visitYahoo(); + case WEIBO: + return visitor.visitWeibo(); + case PAYPAL: + return visitor.visitPaypal(); + case LINKEDIN: + return visitor.visitLinkedin(); + case WINDOWSLIVE: + return visitor.visitWindowslive(); + case YANDEX: + return visitor.visitYandex(); + case TWITTER: + return visitor.visitTwitter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum valueOf(String value) { + switch (value) { + case "baidu": + return BAIDU; + case "dwolla": + return DWOLLA; + case "auth0-oidc": + return AUTH0OIDC; + case "planningcenter": + return PLANNINGCENTER; + case "bitly": + return BITLY; + case "paypal-sandbox": + return PAYPAL_SANDBOX; + case "dropbox": + return DROPBOX; + case "google-oauth2": + return GOOGLE_OAUTH2; + case "vkontakte": + return VKONTAKTE; + case "wordpress": + return WORDPRESS; + case "exact": + return EXACT; + case "instagram": + return INSTAGRAM; + case "fitbit": + return FITBIT; + case "thirtysevensignals": + return THIRTYSEVENSIGNALS; + case "evernote": + return EVERNOTE; + case "shopify": + return SHOPIFY; + case "salesforce-sandbox": + return SALESFORCE_SANDBOX; + case "salesforce-community": + return SALESFORCE_COMMUNITY; + case "facebook": + return FACEBOOK; + case "daccount": + return DACCOUNT; + case "soundcloud": + return SOUNDCLOUD; + case "apple": + return APPLE; + case "evernote-sandbox": + return EVERNOTE_SANDBOX; + case "oauth2": + return OAUTH2; + case "oauth1": + return OAUTH1; + case "amazon": + return AMAZON; + case "line": + return LINE; + case "box": + return BOX; + case "untapped": + return UNTAPPED; + case "github": + return GITHUB; + case "salesforce": + return SALESFORCE; + case "bitbucket": + return BITBUCKET; + case "yahoo": + return YAHOO; + case "weibo": + return WEIBO; + case "paypal": + return PAYPAL; + case "linkedin": + return LINKEDIN; + case "windowslive": + return WINDOWSLIVE; + case "yandex": + return YANDEX; + case "twitter": + return TWITTER; + default: + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialProviderEnum( + Value.UNKNOWN, value); + } + } + + public enum Value { + AMAZON, + + APPLE, + + DROPBOX, + + BITBUCKET, + + AUTH0OIDC, + + BAIDU, + + BITLY, + + BOX, + + DACCOUNT, + + DWOLLA, + + EVERNOTE_SANDBOX, + + EVERNOTE, + + EXACT, + + FACEBOOK, + + FITBIT, + + GITHUB, + + GOOGLE_OAUTH2, + + INSTAGRAM, + + LINE, + + LINKEDIN, + + OAUTH1, + + OAUTH2, + + PAYPAL, + + PAYPAL_SANDBOX, + + PLANNINGCENTER, + + SALESFORCE_COMMUNITY, + + SALESFORCE_SANDBOX, + + SALESFORCE, + + SHOPIFY, + + SOUNDCLOUD, + + THIRTYSEVENSIGNALS, + + TWITTER, + + UNTAPPED, + + VKONTAKTE, + + WEIBO, + + WINDOWSLIVE, + + WORDPRESS, + + YAHOO, + + YANDEX, + + UNKNOWN + } + + public interface Visitor { + T visitAmazon(); + + T visitApple(); + + T visitDropbox(); + + T visitBitbucket(); + + T visitAuth0Oidc(); + + T visitBaidu(); + + T visitBitly(); + + T visitBox(); + + T visitDaccount(); + + T visitDwolla(); + + T visitEvernoteSandbox(); + + T visitEvernote(); + + T visitExact(); + + T visitFacebook(); + + T visitFitbit(); + + T visitGithub(); + + T visitGoogleOauth2(); + + T visitInstagram(); + + T visitLine(); + + T visitLinkedin(); + + T visitOauth1(); + + T visitOauth2(); + + T visitPaypal(); + + T visitPaypalSandbox(); + + T visitPlanningcenter(); + + T visitSalesforceCommunity(); + + T visitSalesforceSandbox(); + + T visitSalesforce(); + + T visitShopify(); + + T visitSoundcloud(); + + T visitThirtysevensignals(); + + T visitTwitter(); + + T visitUntapped(); + + T visitVkontakte(); + + T visitWeibo(); + + T visitWindowslive(); + + T visitWordpress(); + + T visitYahoo(); + + T visitYandex(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId.java new file mode 100644 index 00000000..bc556969 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId.Deserializer.class) +public final class EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId { + private final Object value; + + private final int type; + + private EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((int) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId + && equalTo((EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId) other); + } + + private boolean equalTo(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId of(String value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId(value, 0); + } + + public static EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId of(int value) { + return new EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(int value); + } + + static final class Deserializer + extends StdDeserializer { + Deserializer() { + super(EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId.class); + } + + @java.lang.Override + public EventStreamCloudEventUserUpdatedPreviousObjectIdentitiesItemSocialUserId deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Integer) { + return of((Integer) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.java index 3e55b7e2..c5662cbe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.java @@ -203,7 +203,6 @@ public Builder from(EventStreamDelivery other) { } /** - *

                                                              Unique identifier for the delivery

                                                              *

                                                              Unique identifier for the delivery

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -215,7 +214,6 @@ public EventStreamIdStage id(@NotNull String id) { } /** - *

                                                              Unique identifier for the event stream.

                                                              *

                                                              Unique identifier for the event stream.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java index d8502ab4..9eccf260 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java @@ -28,16 +28,20 @@ public final class EventStreamDeliveryAttempt { private final Optional errorMessage; + private final Optional duration; + private final Map additionalProperties; private EventStreamDeliveryAttempt( EventStreamDeliveryStatusEnum status, OffsetDateTime timestamp, Optional errorMessage, + Optional duration, Map additionalProperties) { this.status = status; this.timestamp = timestamp; this.errorMessage = errorMessage; + this.duration = duration; this.additionalProperties = additionalProperties; } @@ -62,6 +66,14 @@ public Optional getErrorMessage() { return errorMessage; } + /** + * @return Duration of the delivery attempt in milliseconds + */ + @JsonProperty("duration") + public Optional getDuration() { + return duration; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -76,12 +88,13 @@ public Map getAdditionalProperties() { private boolean equalTo(EventStreamDeliveryAttempt other) { return status.equals(other.status) && timestamp.equals(other.timestamp) - && errorMessage.equals(other.errorMessage); + && errorMessage.equals(other.errorMessage) + && duration.equals(other.duration); } @java.lang.Override public int hashCode() { - return Objects.hash(this.status, this.timestamp, this.errorMessage); + return Objects.hash(this.status, this.timestamp, this.errorMessage, this.duration); } @java.lang.Override @@ -119,6 +132,13 @@ public interface _FinalStage { _FinalStage errorMessage(Optional errorMessage); _FinalStage errorMessage(String errorMessage); + + /** + *

                                                              Duration of the delivery attempt in milliseconds

                                                              + */ + _FinalStage duration(Optional duration); + + _FinalStage duration(Double duration); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -127,6 +147,8 @@ public static final class Builder implements StatusStage, TimestampStage, _Final private OffsetDateTime timestamp; + private Optional duration = Optional.empty(); + private Optional errorMessage = Optional.empty(); @JsonAnySetter @@ -139,6 +161,7 @@ public Builder from(EventStreamDeliveryAttempt other) { status(other.getStatus()); timestamp(other.getTimestamp()); errorMessage(other.getErrorMessage()); + duration(other.getDuration()); return this; } @@ -150,7 +173,6 @@ public TimestampStage status(@NotNull EventStreamDeliveryStatusEnum status) { } /** - *

                                                              Timestamp of delivery attempt

                                                              *

                                                              Timestamp of delivery attempt

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -161,6 +183,26 @@ public _FinalStage timestamp(@NotNull OffsetDateTime timestamp) { return this; } + /** + *

                                                              Duration of the delivery attempt in milliseconds

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage duration(Double duration) { + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + *

                                                              Duration of the delivery attempt in milliseconds

                                                              + */ + @java.lang.Override + @JsonSetter(value = "duration", nulls = Nulls.SKIP) + public _FinalStage duration(Optional duration) { + this.duration = duration; + return this; + } + /** *

                                                              Delivery error message, if applicable

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -183,7 +225,7 @@ public _FinalStage errorMessage(Optional errorMessage) { @java.lang.Override public EventStreamDeliveryAttempt build() { - return new EventStreamDeliveryAttempt(status, timestamp, errorMessage, additionalProperties); + return new EventStreamDeliveryAttempt(status, timestamp, errorMessage, duration, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java index 4ee09102..7bebe6e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EventStreamDeliveryEventTypeEnum { + public static final EventStreamDeliveryEventTypeEnum CONNECTION_DELETED = + new EventStreamDeliveryEventTypeEnum(Value.CONNECTION_DELETED, "connection.deleted"); + public static final EventStreamDeliveryEventTypeEnum GROUP_DELETED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); @@ -17,15 +20,9 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CONNECTION_ADDED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); - public static final EventStreamDeliveryEventTypeEnum USER_DELETED = - new EventStreamDeliveryEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamDeliveryEventTypeEnum GROUP_ROLE_DELETED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CREATED = - new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); @@ -38,9 +35,8 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + public static final EventStreamDeliveryEventTypeEnum CONNECTION_CREATED = + new EventStreamDeliveryEventTypeEnum(Value.CONNECTION_CREATED, "connection.created"); public static final EventStreamDeliveryEventTypeEnum GROUP_CREATED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_CREATED, "group.created"); @@ -52,6 +48,26 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum USER_CREATED = new EventStreamDeliveryEventTypeEnum(Value.USER_CREATED, "user.created"); + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_DELETED = + new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamDeliveryEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + public static final EventStreamDeliveryEventTypeEnum USER_DELETED = + new EventStreamDeliveryEventTypeEnum(Value.USER_DELETED, "user.deleted"); + + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CREATED = + new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamDeliveryEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + public static final EventStreamDeliveryEventTypeEnum CONNECTION_UPDATED = + new EventStreamDeliveryEventTypeEnum(Value.CONNECTION_UPDATED, "connection.updated"); + public static final EventStreamDeliveryEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); @@ -61,9 +77,6 @@ public final class EventStreamDeliveryEventTypeEnum { public static final EventStreamDeliveryEventTypeEnum GROUP_ROLE_ASSIGNED = new EventStreamDeliveryEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_DELETED = - new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); @@ -71,10 +84,6 @@ public final class EventStreamDeliveryEventTypeEnum { new EventStreamDeliveryEventTypeEnum( Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamDeliveryEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -112,18 +121,16 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case CONNECTION_DELETED: + return visitor.visitConnectionDeleted(); case GROUP_DELETED: return visitor.visitGroupDeleted(); case ORGANIZATION_CONNECTION_UPDATED: return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); case USER_UPDATED: @@ -132,28 +139,36 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: return visitor.visitGroupMemberAdded(); - case ORGANIZATION_GROUP_ROLE_ASSIGNED: - return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_CREATED: + return visitor.visitConnectionCreated(); case GROUP_CREATED: return visitor.visitGroupCreated(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case USER_DELETED: + return visitor.visitUserDeleted(); + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_UPDATED: + return visitor.visitConnectionUpdated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); case GROUP_UPDATED: return visitor.visitGroupUpdated(); case GROUP_ROLE_ASSIGNED: return visitor.visitGroupRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); case ORGANIZATION_GROUP_ROLE_DELETED: return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -165,18 +180,16 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EventStreamDeliveryEventTypeEnum valueOf(String value) { switch (value) { + case "connection.deleted": + return CONNECTION_DELETED; case "group.deleted": return GROUP_DELETED; case "organization.connection.updated": return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; case "group.role.deleted": return GROUP_ROLE_DELETED; - case "organization.created": - return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; case "user.updated": @@ -185,28 +198,36 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { return ORGANIZATION_UPDATED; case "group.member.added": return GROUP_MEMBER_ADDED; - case "organization.group.role.assigned": - return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.created": + return CONNECTION_CREATED; case "group.created": return GROUP_CREATED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; + case "organization.deleted": + return ORGANIZATION_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "user.deleted": + return USER_DELETED; + case "organization.created": + return ORGANIZATION_CREATED; + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.updated": + return CONNECTION_UPDATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; case "group.updated": return GROUP_UPDATED; case "group.role.assigned": return GROUP_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; case "organization.group.role.deleted": return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: @@ -215,6 +236,12 @@ public static EventStreamDeliveryEventTypeEnum valueOf(String value) { } public enum Value { + CONNECTION_CREATED, + + CONNECTION_DELETED, + + CONNECTION_UPDATED, + GROUP_CREATED, GROUP_DELETED, @@ -263,6 +290,12 @@ public enum Value { } public interface Visitor { + T visitConnectionCreated(); + + T visitConnectionDeleted(); + + T visitConnectionUpdated(); + T visitGroupCreated(); T visitGroupDeleted(); diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java index 100c67e4..7193467f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java @@ -143,7 +143,6 @@ public Builder from(EventStreamEventBridgeConfiguration other) { } /** - *

                                                              AWS Account ID for EventBridge destination.

                                                              *

                                                              AWS Account ID for EventBridge destination.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java index 4e9b5203..87a0f855 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EventStreamEventTypeEnum { + public static final EventStreamEventTypeEnum CONNECTION_DELETED = + new EventStreamEventTypeEnum(Value.CONNECTION_DELETED, "connection.deleted"); + public static final EventStreamEventTypeEnum GROUP_DELETED = new EventStreamEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); @@ -16,15 +19,9 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum ORGANIZATION_CONNECTION_ADDED = new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); - public static final EventStreamEventTypeEnum USER_DELETED = - new EventStreamEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamEventTypeEnum GROUP_ROLE_DELETED = new EventStreamEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); - public static final EventStreamEventTypeEnum ORGANIZATION_CREATED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); - public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); @@ -37,8 +34,8 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - public static final EventStreamEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + public static final EventStreamEventTypeEnum CONNECTION_CREATED = + new EventStreamEventTypeEnum(Value.CONNECTION_CREATED, "connection.created"); public static final EventStreamEventTypeEnum GROUP_CREATED = new EventStreamEventTypeEnum(Value.GROUP_CREATED, "group.created"); @@ -49,6 +46,24 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum USER_CREATED = new EventStreamEventTypeEnum(Value.USER_CREATED, "user.created"); + public static final EventStreamEventTypeEnum ORGANIZATION_DELETED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + public static final EventStreamEventTypeEnum USER_DELETED = + new EventStreamEventTypeEnum(Value.USER_DELETED, "user.deleted"); + + public static final EventStreamEventTypeEnum ORGANIZATION_CREATED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + public static final EventStreamEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + public static final EventStreamEventTypeEnum CONNECTION_UPDATED = + new EventStreamEventTypeEnum(Value.CONNECTION_UPDATED, "connection.updated"); + public static final EventStreamEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); @@ -58,18 +73,12 @@ public final class EventStreamEventTypeEnum { public static final EventStreamEventTypeEnum GROUP_ROLE_ASSIGNED = new EventStreamEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamEventTypeEnum ORGANIZATION_DELETED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); - public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); public static final EventStreamEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = new EventStreamEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); - public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); - public static final EventStreamEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -106,18 +115,16 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case CONNECTION_DELETED: + return visitor.visitConnectionDeleted(); case GROUP_DELETED: return visitor.visitGroupDeleted(); case ORGANIZATION_CONNECTION_UPDATED: return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); case USER_UPDATED: @@ -126,28 +133,36 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: return visitor.visitGroupMemberAdded(); - case ORGANIZATION_GROUP_ROLE_ASSIGNED: - return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_CREATED: + return visitor.visitConnectionCreated(); case GROUP_CREATED: return visitor.visitGroupCreated(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case USER_DELETED: + return visitor.visitUserDeleted(); + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_UPDATED: + return visitor.visitConnectionUpdated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); case GROUP_UPDATED: return visitor.visitGroupUpdated(); case GROUP_ROLE_ASSIGNED: return visitor.visitGroupRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); case ORGANIZATION_GROUP_ROLE_DELETED: return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -159,18 +174,16 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EventStreamEventTypeEnum valueOf(String value) { switch (value) { + case "connection.deleted": + return CONNECTION_DELETED; case "group.deleted": return GROUP_DELETED; case "organization.connection.updated": return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; case "group.role.deleted": return GROUP_ROLE_DELETED; - case "organization.created": - return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; case "user.updated": @@ -179,28 +192,36 @@ public static EventStreamEventTypeEnum valueOf(String value) { return ORGANIZATION_UPDATED; case "group.member.added": return GROUP_MEMBER_ADDED; - case "organization.group.role.assigned": - return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.created": + return CONNECTION_CREATED; case "group.created": return GROUP_CREATED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; + case "organization.deleted": + return ORGANIZATION_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "user.deleted": + return USER_DELETED; + case "organization.created": + return ORGANIZATION_CREATED; + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.updated": + return CONNECTION_UPDATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; case "group.updated": return GROUP_UPDATED; case "group.role.assigned": return GROUP_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; case "organization.group.role.deleted": return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: @@ -209,6 +230,12 @@ public static EventStreamEventTypeEnum valueOf(String value) { } public enum Value { + CONNECTION_CREATED, + + CONNECTION_DELETED, + + CONNECTION_UPDATED, + GROUP_CREATED, GROUP_DELETED, @@ -257,6 +284,12 @@ public enum Value { } public interface Visitor { + T visitConnectionCreated(); + + T visitConnectionDeleted(); + + T visitConnectionUpdated(); + T visitGroupCreated(); T visitGroupDeleted(); diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java index d2ce6b2c..66de59fb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsEventTypeEnum.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EventStreamSubscribeEventsEventTypeEnum { + public static final EventStreamSubscribeEventsEventTypeEnum CONNECTION_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.CONNECTION_DELETED, "connection.deleted"); + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_DELETED = new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); @@ -18,15 +21,9 @@ public final class EventStreamSubscribeEventsEventTypeEnum { new EventStreamSubscribeEventsEventTypeEnum( Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); - public static final EventStreamSubscribeEventsEventTypeEnum USER_DELETED = - new EventStreamSubscribeEventsEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamSubscribeEventsEventTypeEnum GROUP_ROLE_DELETED = new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_CREATED = - new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamSubscribeEventsEventTypeEnum( Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); @@ -40,9 +37,8 @@ public final class EventStreamSubscribeEventsEventTypeEnum { public static final EventStreamSubscribeEventsEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = - new EventStreamSubscribeEventsEventTypeEnum( - Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + public static final EventStreamSubscribeEventsEventTypeEnum CONNECTION_CREATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.CONNECTION_CREATED, "connection.created"); public static final EventStreamSubscribeEventsEventTypeEnum GROUP_CREATED = new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_CREATED, "group.created"); @@ -54,6 +50,26 @@ public final class EventStreamSubscribeEventsEventTypeEnum { public static final EventStreamSubscribeEventsEventTypeEnum USER_CREATED = new EventStreamSubscribeEventsEventTypeEnum(Value.USER_CREATED, "user.created"); + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + public static final EventStreamSubscribeEventsEventTypeEnum USER_DELETED = + new EventStreamSubscribeEventsEventTypeEnum(Value.USER_DELETED, "user.deleted"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_CREATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamSubscribeEventsEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + public static final EventStreamSubscribeEventsEventTypeEnum CONNECTION_UPDATED = + new EventStreamSubscribeEventsEventTypeEnum(Value.CONNECTION_UPDATED, "connection.updated"); + public static final EventStreamSubscribeEventsEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); @@ -63,9 +79,6 @@ public final class EventStreamSubscribeEventsEventTypeEnum { public static final EventStreamSubscribeEventsEventTypeEnum GROUP_ROLE_ASSIGNED = new EventStreamSubscribeEventsEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_DELETED = - new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamSubscribeEventsEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); @@ -73,10 +86,6 @@ public final class EventStreamSubscribeEventsEventTypeEnum { new EventStreamSubscribeEventsEventTypeEnum( Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamSubscribeEventsEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); - public static final EventStreamSubscribeEventsEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamSubscribeEventsEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -114,18 +123,16 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case CONNECTION_DELETED: + return visitor.visitConnectionDeleted(); case GROUP_DELETED: return visitor.visitGroupDeleted(); case ORGANIZATION_CONNECTION_UPDATED: return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); case USER_UPDATED: @@ -134,28 +141,36 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: return visitor.visitGroupMemberAdded(); - case ORGANIZATION_GROUP_ROLE_ASSIGNED: - return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_CREATED: + return visitor.visitConnectionCreated(); case GROUP_CREATED: return visitor.visitGroupCreated(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case USER_DELETED: + return visitor.visitUserDeleted(); + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_UPDATED: + return visitor.visitConnectionUpdated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); case GROUP_UPDATED: return visitor.visitGroupUpdated(); case GROUP_ROLE_ASSIGNED: return visitor.visitGroupRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); case ORGANIZATION_GROUP_ROLE_DELETED: return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -167,18 +182,16 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EventStreamSubscribeEventsEventTypeEnum valueOf(String value) { switch (value) { + case "connection.deleted": + return CONNECTION_DELETED; case "group.deleted": return GROUP_DELETED; case "organization.connection.updated": return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; case "group.role.deleted": return GROUP_ROLE_DELETED; - case "organization.created": - return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; case "user.updated": @@ -187,28 +200,36 @@ public static EventStreamSubscribeEventsEventTypeEnum valueOf(String value) { return ORGANIZATION_UPDATED; case "group.member.added": return GROUP_MEMBER_ADDED; - case "organization.group.role.assigned": - return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.created": + return CONNECTION_CREATED; case "group.created": return GROUP_CREATED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; + case "organization.deleted": + return ORGANIZATION_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "user.deleted": + return USER_DELETED; + case "organization.created": + return ORGANIZATION_CREATED; + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.updated": + return CONNECTION_UPDATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; case "group.updated": return GROUP_UPDATED; case "group.role.assigned": return GROUP_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; case "organization.group.role.deleted": return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: @@ -217,6 +238,12 @@ public static EventStreamSubscribeEventsEventTypeEnum valueOf(String value) { } public enum Value { + CONNECTION_CREATED, + + CONNECTION_DELETED, + + CONNECTION_UPDATED, + GROUP_CREATED, GROUP_DELETED, @@ -265,6 +292,12 @@ public enum Value { } public interface Visitor { + T visitConnectionCreated(); + + T visitConnectionDeleted(); + + T visitConnectionUpdated(); + T visitGroupCreated(); T visitGroupDeleted(); diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java index f129c61e..97b728ad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java @@ -26,6 +26,21 @@ public T visit(Visitor visitor) { return value.visit(visitor); } + public static EventStreamSubscribeEventsResponseContent connectionCreated( + EventStreamCloudEventConnectionCreated value) { + return new EventStreamSubscribeEventsResponseContent(new ConnectionCreatedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent connectionDeleted( + EventStreamCloudEventConnectionDeleted value) { + return new EventStreamSubscribeEventsResponseContent(new ConnectionDeletedValue(value)); + } + + public static EventStreamSubscribeEventsResponseContent connectionUpdated( + EventStreamCloudEventConnectionUpdated value) { + return new EventStreamSubscribeEventsResponseContent(new ConnectionUpdatedValue(value)); + } + public static EventStreamSubscribeEventsResponseContent groupCreated(EventStreamCloudEventGroupCreated value) { return new EventStreamSubscribeEventsResponseContent(new GroupCreatedValue(value)); } @@ -135,6 +150,18 @@ public static EventStreamSubscribeEventsResponseContent offsetOnly(EventStreamCl return new EventStreamSubscribeEventsResponseContent(new OffsetOnlyValue(value)); } + public boolean isConnectionCreated() { + return value instanceof ConnectionCreatedValue; + } + + public boolean isConnectionDeleted() { + return value instanceof ConnectionDeletedValue; + } + + public boolean isConnectionUpdated() { + return value instanceof ConnectionUpdatedValue; + } + public boolean isGroupCreated() { return value instanceof GroupCreatedValue; } @@ -235,6 +262,27 @@ public boolean _isUnknown() { return value instanceof _UnknownValue; } + public Optional getConnectionCreated() { + if (isConnectionCreated()) { + return Optional.of(((ConnectionCreatedValue) value).value); + } + return Optional.empty(); + } + + public Optional getConnectionDeleted() { + if (isConnectionDeleted()) { + return Optional.of(((ConnectionDeletedValue) value).value); + } + return Optional.empty(); + } + + public Optional getConnectionUpdated() { + if (isConnectionUpdated()) { + return Optional.of(((ConnectionUpdatedValue) value).value); + } + return Optional.empty(); + } + public Optional getGroupCreated() { if (isGroupCreated()) { return Optional.of(((GroupCreatedValue) value).value); @@ -433,6 +481,12 @@ private Value getValue() { } public interface Visitor { + T visitConnectionCreated(EventStreamCloudEventConnectionCreated connectionCreated); + + T visitConnectionDeleted(EventStreamCloudEventConnectionDeleted connectionDeleted); + + T visitConnectionUpdated(EventStreamCloudEventConnectionUpdated connectionUpdated); + T visitGroupCreated(EventStreamCloudEventGroupCreated groupCreated); T visitGroupDeleted(EventStreamCloudEventGroupDeleted groupDeleted); @@ -487,6 +541,9 @@ T visitOrganizationMemberRoleAssigned( @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) @JsonSubTypes({ + @JsonSubTypes.Type(ConnectionCreatedValue.class), + @JsonSubTypes.Type(ConnectionDeletedValue.class), + @JsonSubTypes.Type(ConnectionUpdatedValue.class), @JsonSubTypes.Type(GroupCreatedValue.class), @JsonSubTypes.Type(GroupDeletedValue.class), @JsonSubTypes.Type(GroupMemberAddedValue.class), @@ -517,6 +574,126 @@ private interface Value { T visit(Visitor visitor); } + @JsonTypeName("connection.created") + @JsonIgnoreProperties("type") + private static final class ConnectionCreatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventConnectionCreated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private ConnectionCreatedValue() {} + + private ConnectionCreatedValue(EventStreamCloudEventConnectionCreated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitConnectionCreated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionCreatedValue && equalTo((ConnectionCreatedValue) other); + } + + private boolean equalTo(ConnectionCreatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("connection.deleted") + @JsonIgnoreProperties("type") + private static final class ConnectionDeletedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventConnectionDeleted value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private ConnectionDeletedValue() {} + + private ConnectionDeletedValue(EventStreamCloudEventConnectionDeleted value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitConnectionDeleted(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionDeletedValue && equalTo((ConnectionDeletedValue) other); + } + + private boolean equalTo(ConnectionDeletedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("connection.updated") + @JsonIgnoreProperties("type") + private static final class ConnectionUpdatedValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private EventStreamCloudEventConnectionUpdated value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private ConnectionUpdatedValue() {} + + private ConnectionUpdatedValue(EventStreamCloudEventConnectionUpdated value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitConnectionUpdated(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConnectionUpdatedValue && equalTo((ConnectionUpdatedValue) other); + } + + private boolean equalTo(ConnectionUpdatedValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "EventStreamSubscribeEventsResponseContent{" + "value: " + value + "}"; + } + } + @JsonTypeName("group.created") @JsonIgnoreProperties("type") private static final class GroupCreatedValue implements Value { diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java index 78998f84..f7edcf7a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class EventStreamTestEventTypeEnum { + public static final EventStreamTestEventTypeEnum CONNECTION_DELETED = + new EventStreamTestEventTypeEnum(Value.CONNECTION_DELETED, "connection.deleted"); + public static final EventStreamTestEventTypeEnum GROUP_DELETED = new EventStreamTestEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); @@ -16,15 +19,9 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum ORGANIZATION_CONNECTION_ADDED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_ADDED, "organization.connection.added"); - public static final EventStreamTestEventTypeEnum USER_DELETED = - new EventStreamTestEventTypeEnum(Value.USER_DELETED, "user.deleted"); - public static final EventStreamTestEventTypeEnum GROUP_ROLE_DELETED = new EventStreamTestEventTypeEnum(Value.GROUP_ROLE_DELETED, "group.role.deleted"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_CREATED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_DELETED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_MEMBER_DELETED, "organization.member.deleted"); @@ -37,9 +34,8 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum GROUP_MEMBER_ADDED = new EventStreamTestEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = - new EventStreamTestEventTypeEnum( - Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + public static final EventStreamTestEventTypeEnum CONNECTION_CREATED = + new EventStreamTestEventTypeEnum(Value.CONNECTION_CREATED, "connection.created"); public static final EventStreamTestEventTypeEnum GROUP_CREATED = new EventStreamTestEventTypeEnum(Value.GROUP_CREATED, "group.created"); @@ -50,6 +46,26 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum USER_CREATED = new EventStreamTestEventTypeEnum(Value.USER_CREATED, "user.created"); + public static final EventStreamTestEventTypeEnum ORGANIZATION_DELETED = + new EventStreamTestEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); + + public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = + new EventStreamTestEventTypeEnum( + Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); + + public static final EventStreamTestEventTypeEnum USER_DELETED = + new EventStreamTestEventTypeEnum(Value.USER_DELETED, "user.deleted"); + + public static final EventStreamTestEventTypeEnum ORGANIZATION_CREATED = + new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CREATED, "organization.created"); + + public static final EventStreamTestEventTypeEnum ORGANIZATION_GROUP_ROLE_ASSIGNED = + new EventStreamTestEventTypeEnum( + Value.ORGANIZATION_GROUP_ROLE_ASSIGNED, "organization.group.role.assigned"); + + public static final EventStreamTestEventTypeEnum CONNECTION_UPDATED = + new EventStreamTestEventTypeEnum(Value.CONNECTION_UPDATED, "connection.updated"); + public static final EventStreamTestEventTypeEnum GROUP_MEMBER_DELETED = new EventStreamTestEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.deleted"); @@ -59,19 +75,12 @@ public final class EventStreamTestEventTypeEnum { public static final EventStreamTestEventTypeEnum GROUP_ROLE_ASSIGNED = new EventStreamTestEventTypeEnum(Value.GROUP_ROLE_ASSIGNED, "group.role.assigned"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_DELETED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ADDED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); public static final EventStreamTestEventTypeEnum ORGANIZATION_GROUP_ROLE_DELETED = new EventStreamTestEventTypeEnum(Value.ORGANIZATION_GROUP_ROLE_DELETED, "organization.group.role.deleted"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ROLE_ASSIGNED = - new EventStreamTestEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_ASSIGNED, "organization.member.role.assigned"); - public static final EventStreamTestEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = new EventStreamTestEventTypeEnum( Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); @@ -109,18 +118,16 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case CONNECTION_DELETED: + return visitor.visitConnectionDeleted(); case GROUP_DELETED: return visitor.visitGroupDeleted(); case ORGANIZATION_CONNECTION_UPDATED: return visitor.visitOrganizationConnectionUpdated(); case ORGANIZATION_CONNECTION_ADDED: return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); case GROUP_ROLE_DELETED: return visitor.visitGroupRoleDeleted(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); case ORGANIZATION_MEMBER_DELETED: return visitor.visitOrganizationMemberDeleted(); case USER_UPDATED: @@ -129,28 +136,36 @@ public T visit(Visitor visitor) { return visitor.visitOrganizationUpdated(); case GROUP_MEMBER_ADDED: return visitor.visitGroupMemberAdded(); - case ORGANIZATION_GROUP_ROLE_ASSIGNED: - return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_CREATED: + return visitor.visitConnectionCreated(); case GROUP_CREATED: return visitor.visitGroupCreated(); case ORGANIZATION_CONNECTION_REMOVED: return visitor.visitOrganizationConnectionRemoved(); case USER_CREATED: return visitor.visitUserCreated(); + case ORGANIZATION_DELETED: + return visitor.visitOrganizationDeleted(); + case ORGANIZATION_MEMBER_ROLE_ASSIGNED: + return visitor.visitOrganizationMemberRoleAssigned(); + case USER_DELETED: + return visitor.visitUserDeleted(); + case ORGANIZATION_CREATED: + return visitor.visitOrganizationCreated(); + case ORGANIZATION_GROUP_ROLE_ASSIGNED: + return visitor.visitOrganizationGroupRoleAssigned(); + case CONNECTION_UPDATED: + return visitor.visitConnectionUpdated(); case GROUP_MEMBER_DELETED: return visitor.visitGroupMemberDeleted(); case GROUP_UPDATED: return visitor.visitGroupUpdated(); case GROUP_ROLE_ASSIGNED: return visitor.visitGroupRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); case ORGANIZATION_MEMBER_ADDED: return visitor.visitOrganizationMemberAdded(); case ORGANIZATION_GROUP_ROLE_DELETED: return visitor.visitOrganizationGroupRoleDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); case ORGANIZATION_MEMBER_ROLE_DELETED: return visitor.visitOrganizationMemberRoleDeleted(); case UNKNOWN: @@ -162,18 +177,16 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static EventStreamTestEventTypeEnum valueOf(String value) { switch (value) { + case "connection.deleted": + return CONNECTION_DELETED; case "group.deleted": return GROUP_DELETED; case "organization.connection.updated": return ORGANIZATION_CONNECTION_UPDATED; case "organization.connection.added": return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; case "group.role.deleted": return GROUP_ROLE_DELETED; - case "organization.created": - return ORGANIZATION_CREATED; case "organization.member.deleted": return ORGANIZATION_MEMBER_DELETED; case "user.updated": @@ -182,28 +195,36 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { return ORGANIZATION_UPDATED; case "group.member.added": return GROUP_MEMBER_ADDED; - case "organization.group.role.assigned": - return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.created": + return CONNECTION_CREATED; case "group.created": return GROUP_CREATED; case "organization.connection.removed": return ORGANIZATION_CONNECTION_REMOVED; case "user.created": return USER_CREATED; + case "organization.deleted": + return ORGANIZATION_DELETED; + case "organization.member.role.assigned": + return ORGANIZATION_MEMBER_ROLE_ASSIGNED; + case "user.deleted": + return USER_DELETED; + case "organization.created": + return ORGANIZATION_CREATED; + case "organization.group.role.assigned": + return ORGANIZATION_GROUP_ROLE_ASSIGNED; + case "connection.updated": + return CONNECTION_UPDATED; case "group.member.deleted": return GROUP_MEMBER_DELETED; case "group.updated": return GROUP_UPDATED; case "group.role.assigned": return GROUP_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; case "organization.member.added": return ORGANIZATION_MEMBER_ADDED; case "organization.group.role.deleted": return ORGANIZATION_GROUP_ROLE_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; case "organization.member.role.deleted": return ORGANIZATION_MEMBER_ROLE_DELETED; default: @@ -212,6 +233,12 @@ public static EventStreamTestEventTypeEnum valueOf(String value) { } public enum Value { + CONNECTION_CREATED, + + CONNECTION_DELETED, + + CONNECTION_UPDATED, + GROUP_CREATED, GROUP_DELETED, @@ -260,6 +287,12 @@ public enum Value { } public interface Visitor { + T visitConnectionCreated(); + + T visitConnectionDeleted(); + + T visitConnectionUpdated(); + T visitGroupCreated(); T visitGroupDeleted(); diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java index f9a0bffb..50d5853f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java @@ -121,7 +121,6 @@ public UsernameStage method(@NotNull EventStreamWebhookBasicAuthMethodEnum metho } /** - *

                                                              Username

                                                              *

                                                              Username

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java index 2c0760dc..a4f91866 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java @@ -116,7 +116,6 @@ public Builder from(EventStreamWebhookConfiguration other) { } /** - *

                                                              Target HTTP endpoint URL.

                                                              *

                                                              Target HTTP endpoint URL.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookCustomHeaderAuth.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookCustomHeaderAuth.java index 3d9b9bd3..6bf1f0f8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookCustomHeaderAuth.java +++ b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookCustomHeaderAuth.java @@ -124,7 +124,6 @@ public HeaderKeyStage method(@NotNull EventStreamWebhookCustomHeaderAuthMethodEn } /** - *

                                                              HTTP header name.

                                                              *

                                                              HTTP header name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ExperimentListItem.java b/src/main/java/com/auth0/client/mgmt/types/ExperimentListItem.java new file mode 100644 index 00000000..08383612 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ExperimentListItem.java @@ -0,0 +1,829 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +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; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ExperimentListItem.Builder.class) +public final class ExperimentListItem { + private final String id; + + private final String name; + + private final Optional description; + + private final String featureFlagId; + + private final Optional featureFlagName; + + private final String authenticationFlow; + + private final AllocationStrategyEnum allocationStrategy; + + private final ExperimentStatusEnum status; + + private final boolean isValid; + + private final Optional defaultConfig; + + private final OptionalNullable> featureFlagSnapshot; + + private final List allocations; + + private final List editableFields; + + private final Optional> levels; + + private final OptionalNullable currentLevel; + + private final Optional startedAt; + + private final Optional endedAt; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private ExperimentListItem( + String id, + String name, + Optional description, + String featureFlagId, + Optional featureFlagName, + String authenticationFlow, + AllocationStrategyEnum allocationStrategy, + ExperimentStatusEnum status, + boolean isValid, + Optional defaultConfig, + OptionalNullable> featureFlagSnapshot, + List allocations, + List editableFields, + Optional> levels, + OptionalNullable currentLevel, + Optional startedAt, + Optional endedAt, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.featureFlagId = featureFlagId; + this.featureFlagName = featureFlagName; + this.authenticationFlow = authenticationFlow; + this.allocationStrategy = allocationStrategy; + this.status = status; + this.isValid = isValid; + this.defaultConfig = defaultConfig; + this.featureFlagSnapshot = featureFlagSnapshot; + this.allocations = allocations; + this.editableFields = editableFields; + this.levels = levels; + this.currentLevel = currentLevel; + this.startedAt = startedAt; + this.endedAt = endedAt; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("feature_flag_name") + public Optional getFeatureFlagName() { + return featureFlagName; + } + + @JsonProperty("authentication_flow") + public String getAuthenticationFlow() { + return authenticationFlow; + } + + @JsonProperty("allocation_strategy") + public AllocationStrategyEnum getAllocationStrategy() { + return allocationStrategy; + } + + @JsonProperty("status") + public ExperimentStatusEnum getStatus() { + return status; + } + + /** + * @return Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result. + */ + @JsonProperty("is_valid") + public boolean getIsValid() { + return isValid; + } + + @JsonProperty("default_config") + public Optional getDefaultConfig() { + return defaultConfig; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + public OptionalNullable> getFeatureFlagSnapshot() { + if (featureFlagSnapshot == null) { + return OptionalNullable.absent(); + } + return featureFlagSnapshot; + } + + @JsonProperty("allocations") + public List getAllocations() { + return allocations; + } + + /** + * @return Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic. + */ + @JsonProperty("editable_fields") + public List getEditableFields() { + return editableFields; + } + + /** + * @return Ramp experiment levels configuration. + */ + @JsonProperty("levels") + public Optional> getLevels() { + return levels; + } + + /** + * @return Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + public OptionalNullable getCurrentLevel() { + if (currentLevel == null) { + return OptionalNullable.absent(); + } + return currentLevel; + } + + @JsonProperty("started_at") + public Optional getStartedAt() { + return startedAt; + } + + @JsonProperty("ended_at") + public Optional getEndedAt() { + return endedAt; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + private OptionalNullable> _getFeatureFlagSnapshot() { + return featureFlagSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + private OptionalNullable _getCurrentLevel() { + return currentLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ExperimentListItem && equalTo((ExperimentListItem) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ExperimentListItem other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && featureFlagId.equals(other.featureFlagId) + && featureFlagName.equals(other.featureFlagName) + && authenticationFlow.equals(other.authenticationFlow) + && allocationStrategy.equals(other.allocationStrategy) + && status.equals(other.status) + && isValid == other.isValid + && defaultConfig.equals(other.defaultConfig) + && featureFlagSnapshot.equals(other.featureFlagSnapshot) + && allocations.equals(other.allocations) + && editableFields.equals(other.editableFields) + && levels.equals(other.levels) + && currentLevel.equals(other.currentLevel) + && startedAt.equals(other.startedAt) + && endedAt.equals(other.endedAt) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.featureFlagId, + this.featureFlagName, + this.authenticationFlow, + this.allocationStrategy, + this.status, + this.isValid, + this.defaultConfig, + this.featureFlagSnapshot, + this.allocations, + this.editableFields, + this.levels, + this.currentLevel, + this.startedAt, + this.endedAt, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(ExperimentListItem other); + } + + public interface NameStage { + FeatureFlagIdStage name(@NotNull String name); + } + + public interface FeatureFlagIdStage { + AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId); + } + + public interface AuthenticationFlowStage { + AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow); + } + + public interface AllocationStrategyStage { + StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy); + } + + public interface StatusStage { + IsValidStage status(@NotNull ExperimentStatusEnum status); + } + + public interface IsValidStage { + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + */ + CreatedAtStage isValid(boolean isValid); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + ExperimentListItem build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage featureFlagName(Optional featureFlagName); + + _FinalStage featureFlagName(String featureFlagName); + + _FinalStage defaultConfig(Optional defaultConfig); + + _FinalStage defaultConfig(DefaultConfigEnum defaultConfig); + + _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Map featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot); + + _FinalStage allocations(List allocations); + + _FinalStage addAllocations(AllocationItem allocations); + + _FinalStage addAllAllocations(List allocations); + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + _FinalStage editableFields(List editableFields); + + _FinalStage addEditableFields(String editableFields); + + _FinalStage addAllEditableFields(List editableFields); + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + _FinalStage levels(Optional> levels); + + _FinalStage levels(List levels); + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + _FinalStage currentLevel(@Nullable OptionalNullable currentLevel); + + _FinalStage currentLevel(Integer currentLevel); + + _FinalStage currentLevel(Optional currentLevel); + + _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel); + + _FinalStage startedAt(Optional startedAt); + + _FinalStage startedAt(OffsetDateTime startedAt); + + _FinalStage endedAt(Optional endedAt); + + _FinalStage endedAt(OffsetDateTime endedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, + NameStage, + FeatureFlagIdStage, + AuthenticationFlowStage, + AllocationStrategyStage, + StatusStage, + IsValidStage, + CreatedAtStage, + UpdatedAtStage, + _FinalStage { + private String id; + + private String name; + + private String featureFlagId; + + private String authenticationFlow; + + private AllocationStrategyEnum allocationStrategy; + + private ExperimentStatusEnum status; + + private boolean isValid; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional endedAt = Optional.empty(); + + private Optional startedAt = Optional.empty(); + + private OptionalNullable currentLevel = OptionalNullable.absent(); + + private Optional> levels = Optional.empty(); + + private List editableFields = new ArrayList<>(); + + private List allocations = new ArrayList<>(); + + private OptionalNullable> featureFlagSnapshot = OptionalNullable.absent(); + + private Optional defaultConfig = Optional.empty(); + + private Optional featureFlagName = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ExperimentListItem other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + featureFlagId(other.getFeatureFlagId()); + featureFlagName(other.getFeatureFlagName()); + authenticationFlow(other.getAuthenticationFlow()); + allocationStrategy(other.getAllocationStrategy()); + status(other.getStatus()); + isValid(other.getIsValid()); + defaultConfig(other.getDefaultConfig()); + featureFlagSnapshot(other.getFeatureFlagSnapshot()); + allocations(other.getAllocations()); + editableFields(other.getEditableFields()); + levels(other.getLevels()); + currentLevel(other.getCurrentLevel()); + startedAt(other.getStartedAt()); + endedAt(other.getEndedAt()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public FeatureFlagIdStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("authentication_flow") + public AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow) { + this.authenticationFlow = Objects.requireNonNull(authenticationFlow, "authenticationFlow must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("allocation_strategy") + public StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy) { + this.allocationStrategy = Objects.requireNonNull(allocationStrategy, "allocationStrategy must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public IsValidStage status(@NotNull ExperimentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_valid") + public CreatedAtStage isValid(boolean isValid) { + this.isValid = isValid; + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage endedAt(OffsetDateTime endedAt) { + this.endedAt = Optional.ofNullable(endedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) + public _FinalStage endedAt(Optional endedAt) { + this.endedAt = endedAt; + return this; + } + + @java.lang.Override + public _FinalStage startedAt(OffsetDateTime startedAt) { + this.startedAt = Optional.ofNullable(startedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "started_at", nulls = Nulls.SKIP) + public _FinalStage startedAt(Optional startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel) { + if (currentLevel.isNull()) { + this.currentLevel = OptionalNullable.ofNull(); + } else if (currentLevel.isEmpty()) { + this.currentLevel = OptionalNullable.absent(); + } else { + this.currentLevel = OptionalNullable.of(currentLevel.get()); + } + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(Optional currentLevel) { + if (currentLevel.isPresent()) { + this.currentLevel = OptionalNullable.of(currentLevel.get()); + } else { + this.currentLevel = OptionalNullable.absent(); + } + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(Integer currentLevel) { + this.currentLevel = OptionalNullable.of(currentLevel); + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "current_level", nulls = Nulls.SKIP) + public _FinalStage currentLevel(@Nullable OptionalNullable currentLevel) { + this.currentLevel = currentLevel; + return this; + } + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage levels(List levels) { + this.levels = Optional.ofNullable(levels); + return this; + } + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "levels", nulls = Nulls.SKIP) + public _FinalStage levels(Optional> levels) { + this.levels = levels; + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllEditableFields(List editableFields) { + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addEditableFields(String editableFields) { + this.editableFields.add(editableFields); + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "editable_fields", nulls = Nulls.SKIP) + public _FinalStage editableFields(List editableFields) { + this.editableFields.clear(); + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllAllocations(List allocations) { + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllocations(AllocationItem allocations) { + this.allocations.add(allocations); + return this; + } + + @java.lang.Override + @JsonSetter(value = "allocations", nulls = Nulls.SKIP) + public _FinalStage allocations(List allocations) { + this.allocations.clear(); + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot( + com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot) { + if (featureFlagSnapshot.isNull()) { + this.featureFlagSnapshot = OptionalNullable.ofNull(); + } else if (featureFlagSnapshot.isEmpty()) { + this.featureFlagSnapshot = OptionalNullable.absent(); + } else { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot) { + if (featureFlagSnapshot.isPresent()) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } else { + this.featureFlagSnapshot = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Map featureFlagSnapshot) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_snapshot", nulls = Nulls.SKIP) + public _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot) { + this.featureFlagSnapshot = featureFlagSnapshot; + return this; + } + + @java.lang.Override + public _FinalStage defaultConfig(DefaultConfigEnum defaultConfig) { + this.defaultConfig = Optional.ofNullable(defaultConfig); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default_config", nulls = Nulls.SKIP) + public _FinalStage defaultConfig(Optional defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + @java.lang.Override + public _FinalStage featureFlagName(String featureFlagName) { + this.featureFlagName = Optional.ofNullable(featureFlagName); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_name", nulls = Nulls.SKIP) + public _FinalStage featureFlagName(Optional featureFlagName) { + this.featureFlagName = featureFlagName; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public ExperimentListItem build() { + return new ExperimentListItem( + id, + name, + description, + featureFlagId, + featureFlagName, + authenticationFlow, + allocationStrategy, + status, + isValid, + defaultConfig, + featureFlagSnapshot, + allocations, + editableFields, + levels, + currentLevel, + startedAt, + endedAt, + 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/ExperimentStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ExperimentStatusEnum.java new file mode 100644 index 00000000..bed1c828 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ExperimentStatusEnum.java @@ -0,0 +1,113 @@ +/** + * 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 ExperimentStatusEnum { + public static final ExperimentStatusEnum COMPLETED = new ExperimentStatusEnum(Value.COMPLETED, "completed"); + + public static final ExperimentStatusEnum PAUSED = new ExperimentStatusEnum(Value.PAUSED, "paused"); + + public static final ExperimentStatusEnum DRAFT = new ExperimentStatusEnum(Value.DRAFT, "draft"); + + public static final ExperimentStatusEnum ARCHIVED = new ExperimentStatusEnum(Value.ARCHIVED, "archived"); + + public static final ExperimentStatusEnum ACTIVE = new ExperimentStatusEnum(Value.ACTIVE, "active"); + + private final Value value; + + private final String string; + + ExperimentStatusEnum(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 ExperimentStatusEnum && this.string.equals(((ExperimentStatusEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case COMPLETED: + return visitor.visitCompleted(); + case PAUSED: + return visitor.visitPaused(); + case DRAFT: + return visitor.visitDraft(); + case ARCHIVED: + return visitor.visitArchived(); + case ACTIVE: + return visitor.visitActive(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ExperimentStatusEnum valueOf(String value) { + switch (value) { + case "completed": + return COMPLETED; + case "paused": + return PAUSED; + case "draft": + return DRAFT; + case "archived": + return ARCHIVED; + case "active": + return ACTIVE; + default: + return new ExperimentStatusEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DRAFT, + + ACTIVE, + + PAUSED, + + COMPLETED, + + ARCHIVED, + + UNKNOWN + } + + public interface Visitor { + T visitDraft(); + + T visitActive(); + + T visitPaused(); + + T visitCompleted(); + + T visitArchived(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ExperimentTransitionStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ExperimentTransitionStatusEnum.java new file mode 100644 index 00000000..e121dc2a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ExperimentTransitionStatusEnum.java @@ -0,0 +1,108 @@ +/** + * 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 ExperimentTransitionStatusEnum { + public static final ExperimentTransitionStatusEnum COMPLETED = + new ExperimentTransitionStatusEnum(Value.COMPLETED, "completed"); + + public static final ExperimentTransitionStatusEnum PAUSED = + new ExperimentTransitionStatusEnum(Value.PAUSED, "paused"); + + public static final ExperimentTransitionStatusEnum ARCHIVED = + new ExperimentTransitionStatusEnum(Value.ARCHIVED, "archived"); + + public static final ExperimentTransitionStatusEnum ACTIVE = + new ExperimentTransitionStatusEnum(Value.ACTIVE, "active"); + + private final Value value; + + private final String string; + + ExperimentTransitionStatusEnum(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 ExperimentTransitionStatusEnum + && this.string.equals(((ExperimentTransitionStatusEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case COMPLETED: + return visitor.visitCompleted(); + case PAUSED: + return visitor.visitPaused(); + case ARCHIVED: + return visitor.visitArchived(); + case ACTIVE: + return visitor.visitActive(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ExperimentTransitionStatusEnum valueOf(String value) { + switch (value) { + case "completed": + return COMPLETED; + case "paused": + return PAUSED; + case "archived": + return ARCHIVED; + case "active": + return ACTIVE; + default: + return new ExperimentTransitionStatusEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ACTIVE, + + PAUSED, + + COMPLETED, + + ARCHIVED, + + UNKNOWN + } + + public interface Visitor { + T visitActive(); + + T visitPaused(); + + T visitCompleted(); + + T visitArchived(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ExperimentValidationError.java b/src/main/java/com/auth0/client/mgmt/types/ExperimentValidationError.java new file mode 100644 index 00000000..e7d01da9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ExperimentValidationError.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.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 = ExperimentValidationError.Builder.class) +public final class ExperimentValidationError { + private final String code; + + private final String message; + + private final Map additionalProperties; + + private ExperimentValidationError(String code, String message, Map additionalProperties) { + this.code = code; + this.message = message; + this.additionalProperties = additionalProperties; + } + + /** + * @return Machine-readable error code identifying the validation failure. + */ + @JsonProperty("code") + public String getCode() { + return code; + } + + /** + * @return Human-readable description of the validation failure. + */ + @JsonProperty("message") + public String getMessage() { + return message; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ExperimentValidationError && equalTo((ExperimentValidationError) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ExperimentValidationError other) { + return code.equals(other.code) && message.equals(other.message); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.code, this.message); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static CodeStage builder() { + return new Builder(); + } + + public interface CodeStage { + /** + *

                                                              Machine-readable error code identifying the validation failure.

                                                              + */ + MessageStage code(@NotNull String code); + + Builder from(ExperimentValidationError other); + } + + public interface MessageStage { + /** + *

                                                              Human-readable description of the validation failure.

                                                              + */ + _FinalStage message(@NotNull String message); + } + + public interface _FinalStage { + ExperimentValidationError build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements CodeStage, MessageStage, _FinalStage { + private String code; + + private String message; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ExperimentValidationError other) { + code(other.getCode()); + message(other.getMessage()); + return this; + } + + /** + *

                                                              Machine-readable error code identifying the validation failure.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("code") + public MessageStage code(@NotNull String code) { + this.code = Objects.requireNonNull(code, "code must not be null"); + return this; + } + + /** + *

                                                              Human-readable description of the validation failure.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("message") + public _FinalStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + @java.lang.Override + public ExperimentValidationError build() { + return new ExperimentValidationError(code, message, 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/ExpressConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ExpressConfiguration.java index 54865823..a08a9152 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ExpressConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ExpressConfiguration.java @@ -40,6 +40,8 @@ public final class ExpressConfiguration { private final Optional oinSubmissionId; + private final Optional oktaOinListingUrl; + private final Map additionalProperties; private ExpressConfiguration( @@ -52,6 +54,7 @@ private ExpressConfiguration( String oktaOinClientId, String adminLoginDomain, Optional oinSubmissionId, + Optional oktaOinListingUrl, Map additionalProperties) { this.initiateLoginUriTemplate = initiateLoginUriTemplate; this.userAttributeProfileId = userAttributeProfileId; @@ -62,6 +65,7 @@ private ExpressConfiguration( this.oktaOinClientId = oktaOinClientId; this.adminLoginDomain = adminLoginDomain; this.oinSubmissionId = oinSubmissionId; + this.oktaOinListingUrl = oktaOinListingUrl; this.additionalProperties = additionalProperties; } @@ -137,6 +141,14 @@ public Optional getOinSubmissionId() { return oinSubmissionId; } + /** + * @return URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment. + */ + @JsonProperty("okta_oin_listing_url") + public Optional getOktaOinListingUrl() { + return oktaOinListingUrl; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -157,7 +169,8 @@ private boolean equalTo(ExpressConfiguration other) { && linkedClients.equals(other.linkedClients) && oktaOinClientId.equals(other.oktaOinClientId) && adminLoginDomain.equals(other.adminLoginDomain) - && oinSubmissionId.equals(other.oinSubmissionId); + && oinSubmissionId.equals(other.oinSubmissionId) + && oktaOinListingUrl.equals(other.oktaOinListingUrl); } @java.lang.Override @@ -171,7 +184,8 @@ public int hashCode() { this.linkedClients, this.oktaOinClientId, this.adminLoginDomain, - this.oinSubmissionId); + this.oinSubmissionId, + this.oktaOinListingUrl); } @java.lang.Override @@ -254,6 +268,13 @@ public interface _FinalStage { _FinalStage oinSubmissionId(Optional oinSubmissionId); _FinalStage oinSubmissionId(String oinSubmissionId); + + /** + *

                                                              URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment.

                                                              + */ + _FinalStage oktaOinListingUrl(Optional oktaOinListingUrl); + + _FinalStage oktaOinListingUrl(String oktaOinListingUrl); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -280,6 +301,8 @@ public static final class Builder private String adminLoginDomain; + private Optional oktaOinListingUrl = Optional.empty(); + private Optional oinSubmissionId = Optional.empty(); private Optional> linkedClients = Optional.empty(); @@ -300,11 +323,11 @@ public Builder from(ExpressConfiguration other) { oktaOinClientId(other.getOktaOinClientId()); adminLoginDomain(other.getAdminLoginDomain()); oinSubmissionId(other.getOinSubmissionId()); + oktaOinListingUrl(other.getOktaOinListingUrl()); return this; } /** - *

                                                              The URI users should bookmark to log in to this application. Variable substitution is permitted for the following properties: organization_name, organization_id, and connection_name.

                                                              *

                                                              The URI users should bookmark to log in to this application. Variable substitution is permitted for the following properties: organization_name, organization_id, and connection_name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -317,7 +340,6 @@ public UserAttributeProfileIdStage initiateLoginUriTemplate(@NotNull String init } /** - *

                                                              The ID of the user attribute profile to use for this application.

                                                              *

                                                              The ID of the user attribute profile to use for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -330,7 +352,6 @@ public ConnectionProfileIdStage userAttributeProfileId(@NotNull String userAttri } /** - *

                                                              The ID of the connection profile to use for this application.

                                                              *

                                                              The ID of the connection profile to use for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -343,7 +364,6 @@ public EnableClientStage connectionProfileId(@NotNull String connectionProfileId } /** - *

                                                              When true, all connections made via express configuration will be enabled for this application.

                                                              *

                                                              When true, all connections made via express configuration will be enabled for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -355,7 +375,6 @@ public EnableOrganizationStage enableClient(boolean enableClient) { } /** - *

                                                              When true, all connections made via express configuration will have the associated organization enabled.

                                                              *

                                                              When true, all connections made via express configuration will have the associated organization enabled.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -367,7 +386,6 @@ public OktaOinClientIdStage enableOrganization(boolean enableOrganization) { } /** - *

                                                              This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application.

                                                              *

                                                              This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -379,7 +397,6 @@ public AdminLoginDomainStage oktaOinClientId(@NotNull String oktaOinClientId) { } /** - *

                                                              This is the domain that admins are expected to log in via for authenticating for express configuration. It can be either the canonical domain or a registered custom domain.

                                                              *

                                                              This is the domain that admins are expected to log in via for authenticating for express configuration. It can be either the canonical domain or a registered custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -390,6 +407,26 @@ public _FinalStage adminLoginDomain(@NotNull String adminLoginDomain) { return this; } + /** + *

                                                              URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage oktaOinListingUrl(String oktaOinListingUrl) { + this.oktaOinListingUrl = Optional.ofNullable(oktaOinListingUrl); + return this; + } + + /** + *

                                                              URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "okta_oin_listing_url", nulls = Nulls.SKIP) + public _FinalStage oktaOinListingUrl(Optional oktaOinListingUrl) { + this.oktaOinListingUrl = oktaOinListingUrl; + return this; + } + /** *

                                                              The identifier of the published application in the OKTA OIN.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -442,6 +479,7 @@ public ExpressConfiguration build() { oktaOinClientId, adminLoginDomain, oinSubmissionId, + oktaOinListingUrl, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ExpressConfigurationOrNull.java b/src/main/java/com/auth0/client/mgmt/types/ExpressConfigurationOrNull.java index 66ad5115..f36f04bd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ExpressConfigurationOrNull.java +++ b/src/main/java/com/auth0/client/mgmt/types/ExpressConfigurationOrNull.java @@ -40,6 +40,8 @@ public final class ExpressConfigurationOrNull { private final Optional oinSubmissionId; + private final Optional oktaOinListingUrl; + private final Map additionalProperties; private ExpressConfigurationOrNull( @@ -52,6 +54,7 @@ private ExpressConfigurationOrNull( String oktaOinClientId, String adminLoginDomain, Optional oinSubmissionId, + Optional oktaOinListingUrl, Map additionalProperties) { this.initiateLoginUriTemplate = initiateLoginUriTemplate; this.userAttributeProfileId = userAttributeProfileId; @@ -62,6 +65,7 @@ private ExpressConfigurationOrNull( this.oktaOinClientId = oktaOinClientId; this.adminLoginDomain = adminLoginDomain; this.oinSubmissionId = oinSubmissionId; + this.oktaOinListingUrl = oktaOinListingUrl; this.additionalProperties = additionalProperties; } @@ -137,6 +141,14 @@ public Optional getOinSubmissionId() { return oinSubmissionId; } + /** + * @return URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment. + */ + @JsonProperty("okta_oin_listing_url") + public Optional getOktaOinListingUrl() { + return oktaOinListingUrl; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -157,7 +169,8 @@ private boolean equalTo(ExpressConfigurationOrNull other) { && linkedClients.equals(other.linkedClients) && oktaOinClientId.equals(other.oktaOinClientId) && adminLoginDomain.equals(other.adminLoginDomain) - && oinSubmissionId.equals(other.oinSubmissionId); + && oinSubmissionId.equals(other.oinSubmissionId) + && oktaOinListingUrl.equals(other.oktaOinListingUrl); } @java.lang.Override @@ -171,7 +184,8 @@ public int hashCode() { this.linkedClients, this.oktaOinClientId, this.adminLoginDomain, - this.oinSubmissionId); + this.oinSubmissionId, + this.oktaOinListingUrl); } @java.lang.Override @@ -254,6 +268,13 @@ public interface _FinalStage { _FinalStage oinSubmissionId(Optional oinSubmissionId); _FinalStage oinSubmissionId(String oinSubmissionId); + + /** + *

                                                              URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment.

                                                              + */ + _FinalStage oktaOinListingUrl(Optional oktaOinListingUrl); + + _FinalStage oktaOinListingUrl(String oktaOinListingUrl); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -280,6 +301,8 @@ public static final class Builder private String adminLoginDomain; + private Optional oktaOinListingUrl = Optional.empty(); + private Optional oinSubmissionId = Optional.empty(); private Optional> linkedClients = Optional.empty(); @@ -300,11 +323,11 @@ public Builder from(ExpressConfigurationOrNull other) { oktaOinClientId(other.getOktaOinClientId()); adminLoginDomain(other.getAdminLoginDomain()); oinSubmissionId(other.getOinSubmissionId()); + oktaOinListingUrl(other.getOktaOinListingUrl()); return this; } /** - *

                                                              The URI users should bookmark to log in to this application. Variable substitution is permitted for the following properties: organization_name, organization_id, and connection_name.

                                                              *

                                                              The URI users should bookmark to log in to this application. Variable substitution is permitted for the following properties: organization_name, organization_id, and connection_name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -317,7 +340,6 @@ public UserAttributeProfileIdStage initiateLoginUriTemplate(@NotNull String init } /** - *

                                                              The ID of the user attribute profile to use for this application.

                                                              *

                                                              The ID of the user attribute profile to use for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -330,7 +352,6 @@ public ConnectionProfileIdStage userAttributeProfileId(@NotNull String userAttri } /** - *

                                                              The ID of the connection profile to use for this application.

                                                              *

                                                              The ID of the connection profile to use for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -343,7 +364,6 @@ public EnableClientStage connectionProfileId(@NotNull String connectionProfileId } /** - *

                                                              When true, all connections made via express configuration will be enabled for this application.

                                                              *

                                                              When true, all connections made via express configuration will be enabled for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -355,7 +375,6 @@ public EnableOrganizationStage enableClient(boolean enableClient) { } /** - *

                                                              When true, all connections made via express configuration will have the associated organization enabled.

                                                              *

                                                              When true, all connections made via express configuration will have the associated organization enabled.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -367,7 +386,6 @@ public OktaOinClientIdStage enableOrganization(boolean enableOrganization) { } /** - *

                                                              This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application.

                                                              *

                                                              This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -379,7 +397,6 @@ public AdminLoginDomainStage oktaOinClientId(@NotNull String oktaOinClientId) { } /** - *

                                                              This is the domain that admins are expected to log in via for authenticating for express configuration. It can be either the canonical domain or a registered custom domain.

                                                              *

                                                              This is the domain that admins are expected to log in via for authenticating for express configuration. It can be either the canonical domain or a registered custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -390,6 +407,26 @@ public _FinalStage adminLoginDomain(@NotNull String adminLoginDomain) { return this; } + /** + *

                                                              URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage oktaOinListingUrl(String oktaOinListingUrl) { + this.oktaOinListingUrl = Optional.ofNullable(oktaOinListingUrl); + return this; + } + + /** + *

                                                              URL of the application's listing in the Okta Integration Network (OIN) catalog, used to redirect customers into OIN Express Configuration. Must be an https URL on an okta.com domain with no query string or fragment.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "okta_oin_listing_url", nulls = Nulls.SKIP) + public _FinalStage oktaOinListingUrl(Optional oktaOinListingUrl) { + this.oktaOinListingUrl = oktaOinListingUrl; + return this; + } + /** *

                                                              The identifier of the published application in the OKTA OIN.

                                                              * @return Reference to {@code this} so that method calls can be chained together. @@ -442,6 +479,7 @@ public ExpressConfigurationOrNull build() { oktaOinClientId, adminLoginDomain, oinSubmissionId, + oktaOinListingUrl, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/FeatureFlag.java b/src/main/java/com/auth0/client/mgmt/types/FeatureFlag.java new file mode 100644 index 00000000..b9a5d414 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FeatureFlag.java @@ -0,0 +1,313 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = FeatureFlag.Builder.class) +public final class FeatureFlag { + private final String id; + + private final String name; + + private final Optional description; + + private final FeatureFlagTypeEnum type; + + private final FeatureFlagStatusEnum status; + + private final Optional> parameters; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private FeatureFlag( + String id, + String name, + Optional description, + FeatureFlagTypeEnum type, + FeatureFlagStatusEnum status, + Optional> parameters, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.parameters = parameters; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public FeatureFlagTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public FeatureFlagStatusEnum getStatus() { + return status; + } + + @JsonProperty("parameters") + public Optional> getParameters() { + return parameters; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof FeatureFlag && equalTo((FeatureFlag) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(FeatureFlag other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && parameters.equals(other.parameters) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.parameters, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(FeatureFlag other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull FeatureFlagTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull FeatureFlagStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + FeatureFlag build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage parameters(Optional> parameters); + + _FinalStage parameters(Map parameters); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private FeatureFlagTypeEnum type; + + private FeatureFlagStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional> parameters = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(FeatureFlag other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + parameters(other.getParameters()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull FeatureFlagTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull FeatureFlagStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage parameters(Map parameters) { + this.parameters = Optional.ofNullable(parameters); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parameters", nulls = Nulls.SKIP) + public _FinalStage parameters(Optional> parameters) { + this.parameters = parameters; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public FeatureFlag build() { + return new FeatureFlag( + id, name, description, type, status, parameters, 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/FeatureFlagConfigParam.java b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagConfigParam.java new file mode 100644 index 00000000..859e5bc9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagConfigParam.java @@ -0,0 +1,187 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = FeatureFlagConfigParam.Builder.class) +public final class FeatureFlagConfigParam { + private final FeatureFlagConfigParamTypeEnum type; + + private final Object value; + + private final Optional description; + + private final Map additionalProperties; + + private FeatureFlagConfigParam( + FeatureFlagConfigParamTypeEnum type, + Object value, + Optional description, + Map additionalProperties) { + this.type = type; + this.value = value; + this.description = description; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public FeatureFlagConfigParamTypeEnum getType() { + return type; + } + + @JsonProperty("value") + public Object getValue() { + return value; + } + + /** + * @return A human-readable description of the parameter + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof FeatureFlagConfigParam && equalTo((FeatureFlagConfigParam) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(FeatureFlagConfigParam other) { + return type.equals(other.type) && value.equals(other.value) && description.equals(other.description); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value, this.description); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TypeStage builder() { + return new Builder(); + } + + public interface TypeStage { + ValueStage type(@NotNull FeatureFlagConfigParamTypeEnum type); + + Builder from(FeatureFlagConfigParam other); + } + + public interface ValueStage { + _FinalStage value(Object value); + } + + public interface _FinalStage { + FeatureFlagConfigParam build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              A human-readable description of the parameter

                                                              + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TypeStage, ValueStage, _FinalStage { + private FeatureFlagConfigParamTypeEnum type; + + private Object value; + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(FeatureFlagConfigParam other) { + type(other.getType()); + value(other.getValue()); + description(other.getDescription()); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public ValueStage type(@NotNull FeatureFlagConfigParamTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("value") + public _FinalStage value(Object value) { + this.value = value; + return this; + } + + /** + *

                                                              A human-readable description of the parameter

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + /** + *

                                                              A human-readable description of the parameter

                                                              + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public FeatureFlagConfigParam build() { + return new FeatureFlagConfigParam(type, value, description, 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/FeatureFlagConfigParamTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagConfigParamTypeEnum.java new file mode 100644 index 00000000..e4b3545c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagConfigParamTypeEnum.java @@ -0,0 +1,118 @@ +/** + * 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 FeatureFlagConfigParamTypeEnum { + public static final FeatureFlagConfigParamTypeEnum NUMBER = + new FeatureFlagConfigParamTypeEnum(Value.NUMBER, "number"); + + public static final FeatureFlagConfigParamTypeEnum STRING = + new FeatureFlagConfigParamTypeEnum(Value.STRING, "string"); + + public static final FeatureFlagConfigParamTypeEnum BOOLEAN = + new FeatureFlagConfigParamTypeEnum(Value.BOOLEAN, "boolean"); + + public static final FeatureFlagConfigParamTypeEnum ARRAY = new FeatureFlagConfigParamTypeEnum(Value.ARRAY, "array"); + + public static final FeatureFlagConfigParamTypeEnum OBJECT = + new FeatureFlagConfigParamTypeEnum(Value.OBJECT, "object"); + + private final Value value; + + private final String string; + + FeatureFlagConfigParamTypeEnum(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 FeatureFlagConfigParamTypeEnum + && this.string.equals(((FeatureFlagConfigParamTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NUMBER: + return visitor.visitNumber(); + case STRING: + return visitor.visitString(); + case BOOLEAN: + return visitor.visitBoolean(); + case ARRAY: + return visitor.visitArray(); + case OBJECT: + return visitor.visitObject(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static FeatureFlagConfigParamTypeEnum valueOf(String value) { + switch (value) { + case "number": + return NUMBER; + case "string": + return STRING; + case "boolean": + return BOOLEAN; + case "array": + return ARRAY; + case "object": + return OBJECT; + default: + return new FeatureFlagConfigParamTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + STRING, + + BOOLEAN, + + NUMBER, + + ARRAY, + + OBJECT, + + UNKNOWN + } + + public interface Visitor { + T visitString(); + + T visitBoolean(); + + T visitNumber(); + + T visitArray(); + + T visitObject(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/FeatureFlagStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagStatusEnum.java new file mode 100644 index 00000000..fd983e44 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagStatusEnum.java @@ -0,0 +1,94 @@ +/** + * 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 FeatureFlagStatusEnum { + public static final FeatureFlagStatusEnum DRAFT = new FeatureFlagStatusEnum(Value.DRAFT, "draft"); + + public static final FeatureFlagStatusEnum ARCHIVED = new FeatureFlagStatusEnum(Value.ARCHIVED, "archived"); + + public static final FeatureFlagStatusEnum ACTIVE = new FeatureFlagStatusEnum(Value.ACTIVE, "active"); + + private final Value value; + + private final String string; + + FeatureFlagStatusEnum(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 FeatureFlagStatusEnum + && this.string.equals(((FeatureFlagStatusEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case DRAFT: + return visitor.visitDraft(); + case ARCHIVED: + return visitor.visitArchived(); + case ACTIVE: + return visitor.visitActive(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static FeatureFlagStatusEnum valueOf(String value) { + switch (value) { + case "draft": + return DRAFT; + case "archived": + return ARCHIVED; + case "active": + return ACTIVE; + default: + return new FeatureFlagStatusEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DRAFT, + + ACTIVE, + + ARCHIVED, + + UNKNOWN + } + + public interface Visitor { + T visitDraft(); + + T visitActive(); + + T visitArchived(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/FeatureFlagTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagTypeEnum.java new file mode 100644 index 00000000..c45c26ca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/FeatureFlagTypeEnum.java @@ -0,0 +1,83 @@ +/** + * 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 FeatureFlagTypeEnum { + public static final FeatureFlagTypeEnum SELF = new FeatureFlagTypeEnum(Value.SELF, "self"); + + public static final FeatureFlagTypeEnum AUTH0 = new FeatureFlagTypeEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + FeatureFlagTypeEnum(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 FeatureFlagTypeEnum && this.string.equals(((FeatureFlagTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SELF: + return visitor.visitSelf(); + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static FeatureFlagTypeEnum valueOf(String value) { + switch (value) { + case "self": + return SELF; + case "auth0": + return AUTH0; + default: + return new FeatureFlagTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + SELF, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitSelf(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/FederatedConnectionTokenSet.java b/src/main/java/com/auth0/client/mgmt/types/FederatedConnectionTokenSet.java deleted file mode 100644 index fa43fb93..00000000 --- a/src/main/java/com/auth0/client/mgmt/types/FederatedConnectionTokenSet.java +++ /dev/null @@ -1,292 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FederatedConnectionTokenSet.Builder.class) -public final class FederatedConnectionTokenSet { - private final Optional id; - - private final Optional connection; - - private final Optional scope; - - private final OptionalNullable expiresAt; - - private final Optional issuedAt; - - private final OptionalNullable lastUsedAt; - - private final Map additionalProperties; - - private FederatedConnectionTokenSet( - Optional id, - Optional connection, - Optional scope, - OptionalNullable expiresAt, - Optional issuedAt, - OptionalNullable lastUsedAt, - Map additionalProperties) { - this.id = id; - this.connection = connection; - this.scope = scope; - this.expiresAt = expiresAt; - this.issuedAt = issuedAt; - this.lastUsedAt = lastUsedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("expires_at") - public OptionalNullable getExpiresAt() { - if (expiresAt == null) { - return OptionalNullable.absent(); - } - return expiresAt; - } - - @JsonProperty("issued_at") - public Optional getIssuedAt() { - return issuedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("last_used_at") - public OptionalNullable getLastUsedAt() { - if (lastUsedAt == null) { - return OptionalNullable.absent(); - } - return lastUsedAt; - } - - @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_used_at") - private OptionalNullable _getLastUsedAt() { - return lastUsedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FederatedConnectionTokenSet && equalTo((FederatedConnectionTokenSet) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FederatedConnectionTokenSet other) { - return id.equals(other.id) - && connection.equals(other.connection) - && scope.equals(other.scope) - && expiresAt.equals(other.expiresAt) - && issuedAt.equals(other.issuedAt) - && lastUsedAt.equals(other.lastUsedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.connection, this.scope, this.expiresAt, this.issuedAt, this.lastUsedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional id = Optional.empty(); - - private Optional connection = Optional.empty(); - - private Optional scope = Optional.empty(); - - private OptionalNullable expiresAt = OptionalNullable.absent(); - - private Optional issuedAt = Optional.empty(); - - private OptionalNullable lastUsedAt = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FederatedConnectionTokenSet other) { - id(other.getId()); - connection(other.getConnection()); - scope(other.getScope()); - expiresAt(other.getExpiresAt()); - issuedAt(other.getIssuedAt()); - lastUsedAt(other.getLastUsedAt()); - return this; - } - - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public Builder id(Optional id) { - this.id = id; - return this; - } - - public Builder id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(Optional connection) { - this.connection = connection; - return this; - } - - public Builder connection(String connection) { - this.connection = Optional.ofNullable(connection); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(String scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(@Nullable OptionalNullable expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime 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 = "issued_at", nulls = Nulls.SKIP) - public Builder issuedAt(Optional issuedAt) { - this.issuedAt = issuedAt; - return this; - } - - public Builder issuedAt(OffsetDateTime issuedAt) { - this.issuedAt = Optional.ofNullable(issuedAt); - return this; - } - - @JsonSetter(value = "last_used_at", nulls = Nulls.SKIP) - public Builder lastUsedAt(@Nullable OptionalNullable lastUsedAt) { - this.lastUsedAt = lastUsedAt; - return this; - } - - public Builder lastUsedAt(OffsetDateTime lastUsedAt) { - this.lastUsedAt = OptionalNullable.of(lastUsedAt); - return this; - } - - public Builder lastUsedAt(Optional lastUsedAt) { - if (lastUsedAt.isPresent()) { - this.lastUsedAt = OptionalNullable.of(lastUsedAt.get()); - } else { - this.lastUsedAt = OptionalNullable.absent(); - } - return this; - } - - public Builder lastUsedAt(com.auth0.client.mgmt.core.Nullable lastUsedAt) { - if (lastUsedAt.isNull()) { - this.lastUsedAt = OptionalNullable.ofNull(); - } else if (lastUsedAt.isEmpty()) { - this.lastUsedAt = OptionalNullable.absent(); - } else { - this.lastUsedAt = OptionalNullable.of(lastUsedAt.get()); - } - return this; - } - - public FederatedConnectionTokenSet build() { - return new FederatedConnectionTokenSet( - id, connection, scope, expiresAt, issuedAt, lastUsedAt, 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/FlowAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowAction.java index e87c6ae8..47dd8aee 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowAction.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowAction.java @@ -266,18 +266,6 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public FlowAction deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaign.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtable.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -288,10 +276,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbit.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -302,10 +286,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlow.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -326,18 +306,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspot.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJson.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwt.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -358,18 +326,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtp.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedrive.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforce.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -390,10 +346,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripe.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -404,10 +356,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilio.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -418,10 +366,6 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXml.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("id") && ((Map) value).containsKey("type") @@ -432,6 +376,62 @@ public FlowAction deserialize(JsonParser p, DeserializationContext context) thro } catch (RuntimeException e) { } } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaign.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtable.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbit.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlow.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspot.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJson.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwt.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtp.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedrive.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforce.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripe.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilio.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXml.class)); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } 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 2c82a829..1c6aa909 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/FlowExecutionSummary.java b/src/main/java/com/auth0/client/mgmt/types/FlowExecutionSummary.java index 337c9f3f..2d7694b9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowExecutionSummary.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowExecutionSummary.java @@ -273,7 +273,6 @@ public Builder from(FlowExecutionSummary other) { } /** - *

                                                              Flow execution identifier

                                                              *

                                                              Flow execution identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -285,7 +284,6 @@ public TraceIdStage id(@NotNull String id) { } /** - *

                                                              Trace id

                                                              *

                                                              Trace id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -297,7 +295,6 @@ public StatusStage traceId(@NotNull String traceId) { } /** - *

                                                              Execution status

                                                              *

                                                              Execution status

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -309,7 +306,6 @@ public CreatedAtStage status(@NotNull String status) { } /** - *

                                                              The ISO 8601 formatted date when this flow execution was created.

                                                              *

                                                              The ISO 8601 formatted date when this flow execution was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -321,7 +317,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 formatted date when this flow execution was updated.

                                                              *

                                                              The ISO 8601 formatted date when this flow execution was updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java index ae3c4a6e..a80fb7ed 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java +++ b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java @@ -298,7 +298,6 @@ public Builder from(FlowsVaultConnectionSummary other) { } /** - *

                                                              Flows Vault Connection identifier.

                                                              *

                                                              Flows Vault Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -310,7 +309,6 @@ public AppIdStage id(@NotNull String id) { } /** - *

                                                              Flows Vault Connection app identifier.

                                                              *

                                                              Flows Vault Connection app identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -322,7 +320,6 @@ public NameStage appId(@NotNull String appId) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -334,7 +331,6 @@ public ReadyStage name(@NotNull String name) { } /** - *

                                                              Whether the Flows Vault Connection is configured.

                                                              *

                                                              Whether the Flows Vault Connection is configured.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -346,7 +342,6 @@ public CreatedAtStage ready(boolean ready) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -358,7 +353,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java index 09209aef..e1b3fd33 100644 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java +++ b/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java @@ -10,10 +10,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -21,10 +23,14 @@ public final class FormWidgetGMapsAddressConfig { private final String apiKey; + private final Optional serverKey; + private final Map additionalProperties; - private FormWidgetGMapsAddressConfig(String apiKey, Map additionalProperties) { + private FormWidgetGMapsAddressConfig( + String apiKey, Optional serverKey, Map additionalProperties) { this.apiKey = apiKey; + this.serverKey = serverKey; this.additionalProperties = additionalProperties; } @@ -33,6 +39,11 @@ public String getApiKey() { return apiKey; } + @JsonProperty("server_key") + public Optional getServerKey() { + return serverKey; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -45,12 +56,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(FormWidgetGMapsAddressConfig other) { - return apiKey.equals(other.apiKey); + return apiKey.equals(other.apiKey) && serverKey.equals(other.serverKey); } @java.lang.Override public int hashCode() { - return Objects.hash(this.apiKey); + return Objects.hash(this.apiKey, this.serverKey); } @java.lang.Override @@ -74,12 +85,18 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage serverKey(Optional serverKey); + + _FinalStage serverKey(String serverKey); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ApiKeyStage, _FinalStage { private String apiKey; + private Optional serverKey = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -88,6 +105,7 @@ private Builder() {} @java.lang.Override public Builder from(FormWidgetGMapsAddressConfig other) { apiKey(other.getApiKey()); + serverKey(other.getServerKey()); return this; } @@ -98,9 +116,22 @@ public _FinalStage apiKey(@NotNull String apiKey) { return this; } + @java.lang.Override + public _FinalStage serverKey(String serverKey) { + this.serverKey = Optional.ofNullable(serverKey); + return this; + } + + @java.lang.Override + @JsonSetter(value = "server_key", nulls = Nulls.SKIP) + public _FinalStage serverKey(Optional serverKey) { + this.serverKey = serverKey; + return this; + } + @java.lang.Override public FormWidgetGMapsAddressConfig build() { - return new FormWidgetGMapsAddressConfig(apiKey, additionalProperties); + return new FormWidgetGMapsAddressConfig(apiKey, serverKey, additionalProperties); } @java.lang.Override 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 00000000..610807e1 --- /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/GetBrandingDefaultThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingDefaultThemeResponseContent.java index 0c93fddf..d9fbae0d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingDefaultThemeResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetBrandingDefaultThemeResponseContent.java @@ -10,10 +10,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -27,6 +29,8 @@ public final class GetBrandingDefaultThemeResponseContent { private final BrandingThemeFonts fonts; + private final Optional identifiers; + private final BrandingThemePageBackground pageBackground; private final String themeId; @@ -40,6 +44,7 @@ private GetBrandingDefaultThemeResponseContent( BrandingThemeColors colors, String displayName, BrandingThemeFonts fonts, + Optional identifiers, BrandingThemePageBackground pageBackground, String themeId, BrandingThemeWidget widget, @@ -48,6 +53,7 @@ private GetBrandingDefaultThemeResponseContent( this.colors = colors; this.displayName = displayName; this.fonts = fonts; + this.identifiers = identifiers; this.pageBackground = pageBackground; this.themeId = themeId; this.widget = widget; @@ -77,6 +83,11 @@ public BrandingThemeFonts getFonts() { return fonts; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("page_background") public BrandingThemePageBackground getPageBackground() { return pageBackground; @@ -112,6 +123,7 @@ private boolean equalTo(GetBrandingDefaultThemeResponseContent other) { && colors.equals(other.colors) && displayName.equals(other.displayName) && fonts.equals(other.fonts) + && identifiers.equals(other.identifiers) && pageBackground.equals(other.pageBackground) && themeId.equals(other.themeId) && widget.equals(other.widget); @@ -124,6 +136,7 @@ public int hashCode() { this.colors, this.displayName, this.fonts, + this.identifiers, this.pageBackground, this.themeId, this.widget); @@ -180,6 +193,10 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage identifiers(Optional identifiers); + + _FinalStage identifiers(BrandingThemeIdentifiers identifiers); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -206,6 +223,8 @@ public static final class Builder private BrandingThemeWidget widget; + private Optional identifiers = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -217,6 +236,7 @@ public Builder from(GetBrandingDefaultThemeResponseContent other) { colors(other.getColors()); displayName(other.getDisplayName()); fonts(other.getFonts()); + identifiers(other.getIdentifiers()); pageBackground(other.getPageBackground()); themeId(other.getThemeId()); widget(other.getWidget()); @@ -238,7 +258,6 @@ public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { } /** - *

                                                              Display Name

                                                              *

                                                              Display Name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -264,7 +283,6 @@ public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBack } /** - *

                                                              Theme Id

                                                              *

                                                              Theme Id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -282,10 +300,31 @@ public _FinalStage widget(@NotNull BrandingThemeWidget widget) { return this; } + @java.lang.Override + public _FinalStage identifiers(BrandingThemeIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public _FinalStage identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + @java.lang.Override public GetBrandingDefaultThemeResponseContent build() { return new GetBrandingDefaultThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); + borders, + colors, + displayName, + fonts, + identifiers, + pageBackground, + themeId, + widget, + additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java index fd6b36e8..7c5086f0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java @@ -10,10 +10,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -27,6 +29,8 @@ public final class GetBrandingThemeResponseContent { private final BrandingThemeFonts fonts; + private final Optional identifiers; + private final BrandingThemePageBackground pageBackground; private final String themeId; @@ -40,6 +44,7 @@ private GetBrandingThemeResponseContent( BrandingThemeColors colors, String displayName, BrandingThemeFonts fonts, + Optional identifiers, BrandingThemePageBackground pageBackground, String themeId, BrandingThemeWidget widget, @@ -48,6 +53,7 @@ private GetBrandingThemeResponseContent( this.colors = colors; this.displayName = displayName; this.fonts = fonts; + this.identifiers = identifiers; this.pageBackground = pageBackground; this.themeId = themeId; this.widget = widget; @@ -77,6 +83,11 @@ public BrandingThemeFonts getFonts() { return fonts; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("page_background") public BrandingThemePageBackground getPageBackground() { return pageBackground; @@ -111,6 +122,7 @@ private boolean equalTo(GetBrandingThemeResponseContent other) { && colors.equals(other.colors) && displayName.equals(other.displayName) && fonts.equals(other.fonts) + && identifiers.equals(other.identifiers) && pageBackground.equals(other.pageBackground) && themeId.equals(other.themeId) && widget.equals(other.widget); @@ -123,6 +135,7 @@ public int hashCode() { this.colors, this.displayName, this.fonts, + this.identifiers, this.pageBackground, this.themeId, this.widget); @@ -179,6 +192,10 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage identifiers(Optional identifiers); + + _FinalStage identifiers(BrandingThemeIdentifiers identifiers); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -205,6 +222,8 @@ public static final class Builder private BrandingThemeWidget widget; + private Optional identifiers = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -216,6 +235,7 @@ public Builder from(GetBrandingThemeResponseContent other) { colors(other.getColors()); displayName(other.getDisplayName()); fonts(other.getFonts()); + identifiers(other.getIdentifiers()); pageBackground(other.getPageBackground()); themeId(other.getThemeId()); widget(other.getWidget()); @@ -237,7 +257,6 @@ public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { } /** - *

                                                              Display Name

                                                              *

                                                              Display Name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -263,7 +282,6 @@ public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBack } /** - *

                                                              Theme Id

                                                              *

                                                              Theme Id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -281,10 +299,31 @@ public _FinalStage widget(@NotNull BrandingThemeWidget widget) { return this; } + @java.lang.Override + public _FinalStage identifiers(BrandingThemeIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public _FinalStage identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + @java.lang.Override public GetBrandingThemeResponseContent build() { return new GetBrandingThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); + borders, + colors, + displayName, + fonts, + identifiers, + pageBackground, + themeId, + widget, + additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java index af3343e7..f1069218 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java @@ -29,6 +29,8 @@ public final class GetBruteForceSettingsResponseContent { private final Optional mode; + private final Optional formSubmissionMode; + private final Optional maxAttempts; private final Map additionalProperties; @@ -38,12 +40,14 @@ private GetBruteForceSettingsResponseContent( Optional> shields, Optional> allowlist, Optional mode, + Optional formSubmissionMode, Optional maxAttempts, Map additionalProperties) { this.enabled = enabled; this.shields = shields; this.allowlist = allowlist; this.mode = mode; + this.formSubmissionMode = formSubmissionMode; this.maxAttempts = maxAttempts; this.additionalProperties = additionalProperties; } @@ -78,6 +82,11 @@ public Optional getMode() { return mode; } + @JsonProperty("form_submission_mode") + public Optional getFormSubmissionMode() { + return formSubmissionMode; + } + /** * @return Maximum number of unsuccessful attempts. */ @@ -103,12 +112,14 @@ private boolean equalTo(GetBruteForceSettingsResponseContent other) { && shields.equals(other.shields) && allowlist.equals(other.allowlist) && mode.equals(other.mode) + && formSubmissionMode.equals(other.formSubmissionMode) && maxAttempts.equals(other.maxAttempts); } @java.lang.Override public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.mode, this.maxAttempts); + return Objects.hash( + this.enabled, this.shields, this.allowlist, this.mode, this.formSubmissionMode, this.maxAttempts); } @java.lang.Override @@ -130,6 +141,8 @@ public static final class Builder { private Optional mode = Optional.empty(); + private Optional formSubmissionMode = Optional.empty(); + private Optional maxAttempts = Optional.empty(); @JsonAnySetter @@ -142,6 +155,7 @@ public Builder from(GetBruteForceSettingsResponseContent other) { shields(other.getShields()); allowlist(other.getAllowlist()); mode(other.getMode()); + formSubmissionMode(other.getFormSubmissionMode()); maxAttempts(other.getMaxAttempts()); return this; } @@ -200,6 +214,17 @@ public Builder mode(BruteForceProtectionModeEnum mode) { return this; } + @JsonSetter(value = "form_submission_mode", nulls = Nulls.SKIP) + public Builder formSubmissionMode(Optional formSubmissionMode) { + this.formSubmissionMode = formSubmissionMode; + return this; + } + + public Builder formSubmissionMode(BruteForceProtectionFormSubmissionModeEnum formSubmissionMode) { + this.formSubmissionMode = Optional.ofNullable(formSubmissionMode); + return this; + } + /** *

                                                              Maximum number of unsuccessful attempts.

                                                              */ @@ -216,7 +241,7 @@ public Builder maxAttempts(Integer maxAttempts) { public GetBruteForceSettingsResponseContent build() { return new GetBruteForceSettingsResponseContent( - enabled, shields, allowlist, mode, maxAttempts, additionalProperties); + enabled, shields, allowlist, mode, formSubmissionMode, maxAttempts, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java index f2fe6238..95296975 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetClientRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java index 33b4da23..a99fc079 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,6 +27,10 @@ public final class GetClientResponseContent { private final Optional clientId; + private final Optional createdAt; + + private final Optional updatedAt; + private final Optional tenant; private final Optional name; @@ -132,10 +137,22 @@ public final class GetClientResponseContent { private final Optional expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional googleAccountLinking; + + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional thirdPartySecurityMode; + private final Optional oidcSupport; + private final Optional redirectionPolicy; private final Optional resourceServerIdentifier; @@ -146,6 +163,10 @@ public final class GetClientResponseContent { private final Optional externalMetadataCreatedBy; + private final Optional externalMetadataStatus; + + private final Optional agentId; + private final Optional externalClientId; private final Optional jwksUri; @@ -154,6 +175,8 @@ public final class GetClientResponseContent { private GetClientResponseContent( Optional clientId, + Optional createdAt, + Optional updatedAt, Optional tenant, Optional name, Optional description, @@ -207,17 +230,27 @@ private GetClientResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional b2BIntegrationConfiguration, Optional myOrganizationConfiguration, + Optional googleAccountLinking, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional thirdPartySecurityMode, + Optional oidcSupport, Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, Optional externalMetadataCreatedBy, + Optional externalMetadataStatus, + Optional agentId, Optional externalClientId, Optional jwksUri, Map additionalProperties) { this.clientId = clientId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; this.tenant = tenant; this.name = name; this.description = description; @@ -271,13 +304,21 @@ private GetClientResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.thirdPartySecurityMode = thirdPartySecurityMode; + this.oidcSupport = oidcSupport; this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.externalMetadataStatus = externalMetadataStatus; + this.agentId = agentId; this.externalClientId = externalClientId; this.jwksUri = jwksUri; this.additionalProperties = additionalProperties; @@ -291,6 +332,22 @@ public Optional getClientId() { return clientId; } + /** + * @return The ISO 8601 timestamp of when this client was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp of when this client was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + /** * @return Name of the tenant this client belongs to. */ @@ -680,16 +737,46 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonProperty("my_organization_configuration") public Optional getMyOrganizationConfiguration() { return myOrganizationConfiguration; } + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + @JsonProperty("third_party_security_mode") public Optional getThirdPartySecurityMode() { return thirdPartySecurityMode; } + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + @JsonProperty("redirection_policy") public Optional getRedirectionPolicy() { return redirectionPolicy; @@ -718,6 +805,19 @@ public Optional getExternalMetadataCreatedB return externalMetadataCreatedBy; } + @JsonProperty("external_metadata_status") + public Optional getExternalMetadataStatus() { + return externalMetadataStatus; + } + + /** + * @return ID of the agent associated with this client. + */ + @JsonProperty("agent_id") + public Optional getAgentId() { + return agentId; + } + /** * @return An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers. */ @@ -795,6 +895,8 @@ public Map getAdditionalProperties() { private boolean equalTo(GetClientResponseContent other) { return clientId.equals(other.clientId) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) && tenant.equals(other.tenant) && name.equals(other.name) && description.equals(other.description) @@ -849,13 +951,21 @@ private boolean equalTo(GetClientResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && oidcSupport.equals(other.oidcSupport) && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) + && externalMetadataStatus.equals(other.externalMetadataStatus) + && agentId.equals(other.agentId) && externalClientId.equals(other.externalClientId) && jwksUri.equals(other.jwksUri); } @@ -864,6 +974,8 @@ private boolean equalTo(GetClientResponseContent other) { public int hashCode() { return Objects.hash( this.clientId, + this.createdAt, + this.updatedAt, this.tenant, this.name, this.description, @@ -917,13 +1029,21 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, + this.googleAccountLinking, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.thirdPartySecurityMode, + this.oidcSupport, this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, this.externalMetadataCreatedBy, + this.externalMetadataStatus, + this.agentId, this.externalClientId, this.jwksUri); } @@ -941,6 +1061,10 @@ public static Builder builder() { public static final class Builder { private Optional clientId = Optional.empty(); + private Optional createdAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + private Optional tenant = Optional.empty(); private Optional name = Optional.empty(); @@ -1048,10 +1172,23 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional googleAccountLinking = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + private Optional thirdPartySecurityMode = Optional.empty(); + private Optional oidcSupport = Optional.empty(); + private Optional redirectionPolicy = Optional.empty(); private Optional resourceServerIdentifier = Optional.empty(); @@ -1063,6 +1200,10 @@ public static final class Builder { private Optional externalMetadataCreatedBy = Optional.empty(); + private Optional externalMetadataStatus = Optional.empty(); + + private Optional agentId = Optional.empty(); + private Optional externalClientId = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -1074,6 +1215,8 @@ private Builder() {} public Builder from(GetClientResponseContent other) { clientId(other.getClientId()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); tenant(other.getTenant()); name(other.getName()); description(other.getDescription()); @@ -1127,13 +1270,21 @@ public Builder from(GetClientResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); + oidcSupport(other.getOidcSupport()); redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + externalMetadataStatus(other.getExternalMetadataStatus()); + agentId(other.getAgentId()); externalClientId(other.getExternalClientId()); jwksUri(other.getJwksUri()); return this; @@ -1153,6 +1304,34 @@ public Builder clientId(String clientId) { return this; } + /** + *

                                                              The ISO 8601 timestamp of when this client was created.

                                                              + */ + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public Builder createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was last updated.

                                                              + */ + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public Builder updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + /** *

                                                              Name of the tenant this client belongs to.

                                                              */ @@ -2000,6 +2179,17 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) public Builder myOrganizationConfiguration( Optional myOrganizationConfiguration) { @@ -2013,6 +2203,55 @@ public Builder myOrganizationConfiguration( return this; } + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking(Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfiguration googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + IdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(AnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { this.thirdPartySecurityMode = thirdPartySecurityMode; @@ -2024,6 +2263,17 @@ public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPart return this; } + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) public Builder redirectionPolicy(Optional redirectionPolicy) { this.redirectionPolicy = redirectionPolicy; @@ -2085,6 +2335,31 @@ public Builder externalMetadataCreatedBy(ClientExternalMetadataCreatedByEnum ext return this; } + @JsonSetter(value = "external_metadata_status", nulls = Nulls.SKIP) + public Builder externalMetadataStatus(Optional externalMetadataStatus) { + this.externalMetadataStatus = externalMetadataStatus; + return this; + } + + public Builder externalMetadataStatus(ClientExternalMetadataStatusEnum externalMetadataStatus) { + this.externalMetadataStatus = Optional.ofNullable(externalMetadataStatus); + return this; + } + + /** + *

                                                              ID of the agent associated with this client.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(Optional agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = Optional.ofNullable(agentId); + return this; + } + /** *

                                                              An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers.

                                                              */ @@ -2116,6 +2391,8 @@ public Builder jwksUri(String jwksUri) { public GetClientResponseContent build() { return new GetClientResponseContent( clientId, + createdAt, + updatedAt, tenant, name, description, @@ -2169,13 +2446,21 @@ public GetClientResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, thirdPartySecurityMode, + oidcSupport, redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, externalMetadataCreatedBy, + externalMetadataStatus, + agentId, externalClientId, jwksUri, additionalProperties); 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 6faaeb5a..46ecb84e 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,10 @@ public final class GetConnectionProfileResponseContent { private final Optional strategyOverrides; + private final Optional provisioning; + + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private GetConnectionProfileResponseContent( @@ -45,6 +49,8 @@ private GetConnectionProfileResponseContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +59,8 @@ private GetConnectionProfileResponseContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +99,16 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @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 +128,9 @@ 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) + && provisioning.equals(other.provisioning) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -122,7 +142,9 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -150,6 +172,10 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional provisioning = Optional.empty(); + + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -163,6 +189,8 @@ public Builder from(GetConnectionProfileResponseContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -243,6 +271,29 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + 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 +303,8 @@ public GetConnectionProfileResponseContent build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetConnectionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionRequestParameters.java index 8d0c358d..104f1e58 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetConnectionRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetConnectionRequestParameters( /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return true if the fields specified are to be included in the result, false otherwise (defaults to true) */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java index b6f35694..de53c143 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java @@ -48,6 +48,8 @@ public final class GetConnectionResponseContent { private final Optional crossAppAccessRequestingApp; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private GetConnectionResponseContent( @@ -64,6 +66,7 @@ private GetConnectionResponseContent( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -78,6 +81,7 @@ private GetConnectionResponseContent( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -170,6 +174,11 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -194,7 +203,8 @@ private boolean equalTo(GetConnectionResponseContent other) { && metadata.equals(other.metadata) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) - && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -212,7 +222,8 @@ public int hashCode() { this.metadata, this.authentication, this.connectedAccounts, - this.crossAppAccessRequestingApp); + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -252,6 +263,8 @@ public static final class Builder { private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -271,6 +284,7 @@ public Builder from(GetConnectionResponseContent other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -441,6 +455,17 @@ public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppA 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(CrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public GetConnectionResponseContent build() { return new GetConnectionResponseContent( name, @@ -456,6 +481,7 @@ public GetConnectionResponseContent build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetCustomDomainResponseContent.java index 2b890744..26ebe035 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetCustomDomainResponseContent.java @@ -379,7 +379,6 @@ public Builder from(GetCustomDomainResponseContent other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -391,7 +390,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -403,7 +401,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

                                                              Whether this is a primary domain (true) or not (false).

                                                              *

                                                              Whether this is a primary domain (true) or not (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java index 4da8a652..b2a47cf6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private GetDailyStatsRequestParameters( /** * @return Optional first day of the date range (inclusive) in YYYYMMDD format. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Optional last day of the date range (inclusive) in YYYYMMDD format. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("to") public OptionalNullable getTo() { if (to == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTo() { return to; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("to") + private OptionalNullable _getTo() { + return to; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java index 007d88de..6dbc8dfe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCanonicalDomainResponseContent.java @@ -99,7 +99,6 @@ public Builder from(GetDefaultCanonicalDomainResponseContent other) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java index 9b94899c..11b17177 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDefaultCustomDomainResponseContent.java @@ -380,7 +380,6 @@ public Builder from(GetDefaultCustomDomainResponseContent other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -392,7 +391,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -404,7 +402,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

                                                              Whether this is a primary domain (true) or not (false).

                                                              *

                                                              Whether this is a primary domain (true) or not (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java index 09ed2315..e4c2251a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java @@ -350,7 +350,6 @@ public Builder from(GetDirectoryProvisioningResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -362,7 +361,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -374,7 +372,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -386,7 +383,6 @@ public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { } /** - *

                                                              Whether periodic automatic synchronization is enabled

                                                              *

                                                              Whether periodic automatic synchronization is enabled

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -398,7 +394,6 @@ public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) } /** - *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -410,7 +405,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEmailFactorSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEmailFactorSettingsResponseContent.java new file mode 100644 index 00000000..e304ae3a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetEmailFactorSettingsResponseContent.java @@ -0,0 +1,161 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetEmailFactorSettingsResponseContent.Builder.class) +public final class GetEmailFactorSettingsResponseContent { + private final int otpLength; + + private final int otpExpirationTime; + + private final Map additionalProperties; + + private GetEmailFactorSettingsResponseContent( + int otpLength, int otpExpirationTime, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public int getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public int getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetEmailFactorSettingsResponseContent + && equalTo((GetEmailFactorSettingsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetEmailFactorSettingsResponseContent other) { + return otpLength == other.otpLength && otpExpirationTime == other.otpExpirationTime; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OtpLengthStage builder() { + return new Builder(); + } + + public interface OtpLengthStage { + /** + *

                                                              The length of the OTP code.

                                                              + */ + OtpExpirationTimeStage otpLength(int otpLength); + + Builder from(GetEmailFactorSettingsResponseContent other); + } + + public interface OtpExpirationTimeStage { + /** + *

                                                              The OTP expiration time in seconds.

                                                              + */ + _FinalStage otpExpirationTime(int otpExpirationTime); + } + + public interface _FinalStage { + GetEmailFactorSettingsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OtpLengthStage, OtpExpirationTimeStage, _FinalStage { + private int otpLength; + + private int otpExpirationTime; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetEmailFactorSettingsResponseContent other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

                                                              The length of the OTP code.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_length") + public OtpExpirationTimeStage otpLength(int otpLength) { + this.otpLength = otpLength; + return this; + } + + /** + *

                                                              The OTP expiration time in seconds.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_expiration_time") + public _FinalStage otpExpirationTime(int otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + @java.lang.Override + public GetEmailFactorSettingsResponseContent build() { + return new GetEmailFactorSettingsResponseContent(otpLength, otpExpirationTime, 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/GetEncryptionKeyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEncryptionKeyResponseContent.java index 089e4474..9548c026 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetEncryptionKeyResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetEncryptionKeyResponseContent.java @@ -262,7 +262,6 @@ public Builder from(GetEncryptionKeyResponseContent other) { } /** - *

                                                              Key ID

                                                              *

                                                              Key ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -288,7 +287,6 @@ public CreatedAtStage state(@NotNull EncryptionKeyState state) { } /** - *

                                                              Key creation timestamp

                                                              *

                                                              Key creation timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -300,7 +298,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Key update timestamp

                                                              *

                                                              Key update timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java index b4c23a92..f2430a12 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java @@ -204,7 +204,6 @@ public Builder from(GetEventStreamDeliveryHistoryResponseContent other) { } /** - *

                                                              Unique identifier for the delivery

                                                              *

                                                              Unique identifier for the delivery

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -216,7 +215,6 @@ public EventStreamIdStage id(@NotNull String id) { } /** - *

                                                              Unique identifier for the event stream.

                                                              *

                                                              Unique identifier for the event stream.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetExperimentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetExperimentResponseContent.java new file mode 100644 index 00000000..752ccd6b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetExperimentResponseContent.java @@ -0,0 +1,829 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +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; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetExperimentResponseContent.Builder.class) +public final class GetExperimentResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final String featureFlagId; + + private final Optional featureFlagName; + + private final String authenticationFlow; + + private final AllocationStrategyEnum allocationStrategy; + + private final ExperimentStatusEnum status; + + private final boolean isValid; + + private final Optional defaultConfig; + + private final OptionalNullable> featureFlagSnapshot; + + private final List allocations; + + private final List editableFields; + + private final Optional> levels; + + private final OptionalNullable currentLevel; + + private final Optional startedAt; + + private final Optional endedAt; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private GetExperimentResponseContent( + String id, + String name, + Optional description, + String featureFlagId, + Optional featureFlagName, + String authenticationFlow, + AllocationStrategyEnum allocationStrategy, + ExperimentStatusEnum status, + boolean isValid, + Optional defaultConfig, + OptionalNullable> featureFlagSnapshot, + List allocations, + List editableFields, + Optional> levels, + OptionalNullable currentLevel, + Optional startedAt, + Optional endedAt, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.featureFlagId = featureFlagId; + this.featureFlagName = featureFlagName; + this.authenticationFlow = authenticationFlow; + this.allocationStrategy = allocationStrategy; + this.status = status; + this.isValid = isValid; + this.defaultConfig = defaultConfig; + this.featureFlagSnapshot = featureFlagSnapshot; + this.allocations = allocations; + this.editableFields = editableFields; + this.levels = levels; + this.currentLevel = currentLevel; + this.startedAt = startedAt; + this.endedAt = endedAt; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("feature_flag_name") + public Optional getFeatureFlagName() { + return featureFlagName; + } + + @JsonProperty("authentication_flow") + public String getAuthenticationFlow() { + return authenticationFlow; + } + + @JsonProperty("allocation_strategy") + public AllocationStrategyEnum getAllocationStrategy() { + return allocationStrategy; + } + + @JsonProperty("status") + public ExperimentStatusEnum getStatus() { + return status; + } + + /** + * @return Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result. + */ + @JsonProperty("is_valid") + public boolean getIsValid() { + return isValid; + } + + @JsonProperty("default_config") + public Optional getDefaultConfig() { + return defaultConfig; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + public OptionalNullable> getFeatureFlagSnapshot() { + if (featureFlagSnapshot == null) { + return OptionalNullable.absent(); + } + return featureFlagSnapshot; + } + + @JsonProperty("allocations") + public List getAllocations() { + return allocations; + } + + /** + * @return Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic. + */ + @JsonProperty("editable_fields") + public List getEditableFields() { + return editableFields; + } + + /** + * @return Ramp experiment levels configuration. + */ + @JsonProperty("levels") + public Optional> getLevels() { + return levels; + } + + /** + * @return Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + public OptionalNullable getCurrentLevel() { + if (currentLevel == null) { + return OptionalNullable.absent(); + } + return currentLevel; + } + + @JsonProperty("started_at") + public Optional getStartedAt() { + return startedAt; + } + + @JsonProperty("ended_at") + public Optional getEndedAt() { + return endedAt; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + private OptionalNullable> _getFeatureFlagSnapshot() { + return featureFlagSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + private OptionalNullable _getCurrentLevel() { + return currentLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetExperimentResponseContent && equalTo((GetExperimentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetExperimentResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && featureFlagId.equals(other.featureFlagId) + && featureFlagName.equals(other.featureFlagName) + && authenticationFlow.equals(other.authenticationFlow) + && allocationStrategy.equals(other.allocationStrategy) + && status.equals(other.status) + && isValid == other.isValid + && defaultConfig.equals(other.defaultConfig) + && featureFlagSnapshot.equals(other.featureFlagSnapshot) + && allocations.equals(other.allocations) + && editableFields.equals(other.editableFields) + && levels.equals(other.levels) + && currentLevel.equals(other.currentLevel) + && startedAt.equals(other.startedAt) + && endedAt.equals(other.endedAt) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.featureFlagId, + this.featureFlagName, + this.authenticationFlow, + this.allocationStrategy, + this.status, + this.isValid, + this.defaultConfig, + this.featureFlagSnapshot, + this.allocations, + this.editableFields, + this.levels, + this.currentLevel, + this.startedAt, + this.endedAt, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(GetExperimentResponseContent other); + } + + public interface NameStage { + FeatureFlagIdStage name(@NotNull String name); + } + + public interface FeatureFlagIdStage { + AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId); + } + + public interface AuthenticationFlowStage { + AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow); + } + + public interface AllocationStrategyStage { + StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy); + } + + public interface StatusStage { + IsValidStage status(@NotNull ExperimentStatusEnum status); + } + + public interface IsValidStage { + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + */ + CreatedAtStage isValid(boolean isValid); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + GetExperimentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage featureFlagName(Optional featureFlagName); + + _FinalStage featureFlagName(String featureFlagName); + + _FinalStage defaultConfig(Optional defaultConfig); + + _FinalStage defaultConfig(DefaultConfigEnum defaultConfig); + + _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Map featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot); + + _FinalStage allocations(List allocations); + + _FinalStage addAllocations(AllocationItem allocations); + + _FinalStage addAllAllocations(List allocations); + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + _FinalStage editableFields(List editableFields); + + _FinalStage addEditableFields(String editableFields); + + _FinalStage addAllEditableFields(List editableFields); + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + _FinalStage levels(Optional> levels); + + _FinalStage levels(List levels); + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + _FinalStage currentLevel(@Nullable OptionalNullable currentLevel); + + _FinalStage currentLevel(Integer currentLevel); + + _FinalStage currentLevel(Optional currentLevel); + + _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel); + + _FinalStage startedAt(Optional startedAt); + + _FinalStage startedAt(OffsetDateTime startedAt); + + _FinalStage endedAt(Optional endedAt); + + _FinalStage endedAt(OffsetDateTime endedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, + NameStage, + FeatureFlagIdStage, + AuthenticationFlowStage, + AllocationStrategyStage, + StatusStage, + IsValidStage, + CreatedAtStage, + UpdatedAtStage, + _FinalStage { + private String id; + + private String name; + + private String featureFlagId; + + private String authenticationFlow; + + private AllocationStrategyEnum allocationStrategy; + + private ExperimentStatusEnum status; + + private boolean isValid; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional endedAt = Optional.empty(); + + private Optional startedAt = Optional.empty(); + + private OptionalNullable currentLevel = OptionalNullable.absent(); + + private Optional> levels = Optional.empty(); + + private List editableFields = new ArrayList<>(); + + private List allocations = new ArrayList<>(); + + private OptionalNullable> featureFlagSnapshot = OptionalNullable.absent(); + + private Optional defaultConfig = Optional.empty(); + + private Optional featureFlagName = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetExperimentResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + featureFlagId(other.getFeatureFlagId()); + featureFlagName(other.getFeatureFlagName()); + authenticationFlow(other.getAuthenticationFlow()); + allocationStrategy(other.getAllocationStrategy()); + status(other.getStatus()); + isValid(other.getIsValid()); + defaultConfig(other.getDefaultConfig()); + featureFlagSnapshot(other.getFeatureFlagSnapshot()); + allocations(other.getAllocations()); + editableFields(other.getEditableFields()); + levels(other.getLevels()); + currentLevel(other.getCurrentLevel()); + startedAt(other.getStartedAt()); + endedAt(other.getEndedAt()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public FeatureFlagIdStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("authentication_flow") + public AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow) { + this.authenticationFlow = Objects.requireNonNull(authenticationFlow, "authenticationFlow must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("allocation_strategy") + public StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy) { + this.allocationStrategy = Objects.requireNonNull(allocationStrategy, "allocationStrategy must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public IsValidStage status(@NotNull ExperimentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_valid") + public CreatedAtStage isValid(boolean isValid) { + this.isValid = isValid; + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage endedAt(OffsetDateTime endedAt) { + this.endedAt = Optional.ofNullable(endedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) + public _FinalStage endedAt(Optional endedAt) { + this.endedAt = endedAt; + return this; + } + + @java.lang.Override + public _FinalStage startedAt(OffsetDateTime startedAt) { + this.startedAt = Optional.ofNullable(startedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "started_at", nulls = Nulls.SKIP) + public _FinalStage startedAt(Optional startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel) { + if (currentLevel.isNull()) { + this.currentLevel = OptionalNullable.ofNull(); + } else if (currentLevel.isEmpty()) { + this.currentLevel = OptionalNullable.absent(); + } else { + this.currentLevel = OptionalNullable.of(currentLevel.get()); + } + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(Optional currentLevel) { + if (currentLevel.isPresent()) { + this.currentLevel = OptionalNullable.of(currentLevel.get()); + } else { + this.currentLevel = OptionalNullable.absent(); + } + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(Integer currentLevel) { + this.currentLevel = OptionalNullable.of(currentLevel); + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "current_level", nulls = Nulls.SKIP) + public _FinalStage currentLevel(@Nullable OptionalNullable currentLevel) { + this.currentLevel = currentLevel; + return this; + } + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage levels(List levels) { + this.levels = Optional.ofNullable(levels); + return this; + } + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "levels", nulls = Nulls.SKIP) + public _FinalStage levels(Optional> levels) { + this.levels = levels; + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllEditableFields(List editableFields) { + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addEditableFields(String editableFields) { + this.editableFields.add(editableFields); + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "editable_fields", nulls = Nulls.SKIP) + public _FinalStage editableFields(List editableFields) { + this.editableFields.clear(); + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllAllocations(List allocations) { + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllocations(AllocationItem allocations) { + this.allocations.add(allocations); + return this; + } + + @java.lang.Override + @JsonSetter(value = "allocations", nulls = Nulls.SKIP) + public _FinalStage allocations(List allocations) { + this.allocations.clear(); + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot( + com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot) { + if (featureFlagSnapshot.isNull()) { + this.featureFlagSnapshot = OptionalNullable.ofNull(); + } else if (featureFlagSnapshot.isEmpty()) { + this.featureFlagSnapshot = OptionalNullable.absent(); + } else { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot) { + if (featureFlagSnapshot.isPresent()) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } else { + this.featureFlagSnapshot = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Map featureFlagSnapshot) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_snapshot", nulls = Nulls.SKIP) + public _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot) { + this.featureFlagSnapshot = featureFlagSnapshot; + return this; + } + + @java.lang.Override + public _FinalStage defaultConfig(DefaultConfigEnum defaultConfig) { + this.defaultConfig = Optional.ofNullable(defaultConfig); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default_config", nulls = Nulls.SKIP) + public _FinalStage defaultConfig(Optional defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + @java.lang.Override + public _FinalStage featureFlagName(String featureFlagName) { + this.featureFlagName = Optional.ofNullable(featureFlagName); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_name", nulls = Nulls.SKIP) + public _FinalStage featureFlagName(Optional featureFlagName) { + this.featureFlagName = featureFlagName; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public GetExperimentResponseContent build() { + return new GetExperimentResponseContent( + id, + name, + description, + featureFlagId, + featureFlagName, + authenticationFlow, + allocationStrategy, + status, + isValid, + defaultConfig, + featureFlagSnapshot, + allocations, + editableFields, + levels, + currentLevel, + startedAt, + endedAt, + 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/GetFeatureFlagResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFeatureFlagResponseContent.java new file mode 100644 index 00000000..8e4be0b7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetFeatureFlagResponseContent.java @@ -0,0 +1,313 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetFeatureFlagResponseContent.Builder.class) +public final class GetFeatureFlagResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final FeatureFlagTypeEnum type; + + private final FeatureFlagStatusEnum status; + + private final Optional> parameters; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private GetFeatureFlagResponseContent( + String id, + String name, + Optional description, + FeatureFlagTypeEnum type, + FeatureFlagStatusEnum status, + Optional> parameters, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.parameters = parameters; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public FeatureFlagTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public FeatureFlagStatusEnum getStatus() { + return status; + } + + @JsonProperty("parameters") + public Optional> getParameters() { + return parameters; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetFeatureFlagResponseContent && equalTo((GetFeatureFlagResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetFeatureFlagResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && parameters.equals(other.parameters) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.parameters, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(GetFeatureFlagResponseContent other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull FeatureFlagTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull FeatureFlagStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + GetFeatureFlagResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage parameters(Optional> parameters); + + _FinalStage parameters(Map parameters); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private FeatureFlagTypeEnum type; + + private FeatureFlagStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional> parameters = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetFeatureFlagResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + parameters(other.getParameters()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull FeatureFlagTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull FeatureFlagStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage parameters(Map parameters) { + this.parameters = Optional.ofNullable(parameters); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parameters", nulls = Nulls.SKIP) + public _FinalStage parameters(Optional> parameters) { + this.parameters = parameters; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public GetFeatureFlagResponseContent build() { + return new GetFeatureFlagResponseContent( + id, name, description, type, status, parameters, 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/GetFlowExecutionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionResponseContent.java index ca0f95f1..eaf0b707 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionResponseContent.java @@ -291,7 +291,6 @@ public Builder from(GetFlowExecutionResponseContent other) { } /** - *

                                                              Flow execution identifier

                                                              *

                                                              Flow execution identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -303,7 +302,6 @@ public TraceIdStage id(@NotNull String id) { } /** - *

                                                              Trace id

                                                              *

                                                              Trace id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -315,7 +313,6 @@ public StatusStage traceId(@NotNull String traceId) { } /** - *

                                                              Execution status

                                                              *

                                                              Execution status

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -327,7 +324,6 @@ public CreatedAtStage status(@NotNull String status) { } /** - *

                                                              The ISO 8601 formatted date when this flow execution was created.

                                                              *

                                                              The ISO 8601 formatted date when this flow execution was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -339,7 +335,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 formatted date when this flow execution was updated.

                                                              *

                                                              The ISO 8601 formatted date when this flow execution was updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java index 6e820c6b..96abbd4a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java @@ -3,12 +3,14 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -44,6 +46,12 @@ public Optional> getHydrate() { return hydrate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("hydrate") + private Optional> _getHydrate() { + return hydrate; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java index 3cb76b17..dc73c43f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java @@ -323,7 +323,6 @@ public Builder from(GetFlowsVaultConnectionResponseContent other) { } /** - *

                                                              Flows Vault Connection identifier.

                                                              *

                                                              Flows Vault Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -335,7 +334,6 @@ public AppIdStage id(@NotNull String id) { } /** - *

                                                              Flows Vault Connection app identifier.

                                                              *

                                                              Flows Vault Connection app identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -347,7 +345,6 @@ public NameStage appId(@NotNull String appId) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -359,7 +356,6 @@ public ReadyStage name(@NotNull String name) { } /** - *

                                                              Whether the Flows Vault Connection is configured.

                                                              *

                                                              Whether the Flows Vault Connection is configured.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -371,7 +367,6 @@ public CreatedAtStage ready(boolean ready) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -383,7 +378,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java index 01fd330a..91045dd6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java @@ -3,12 +3,14 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -44,6 +46,12 @@ public Optional> getHydrate() { return hydrate; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("hydrate") + private Optional> _getHydrate() { + return hydrate; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java index a3a53d51..f2e3c1eb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java @@ -249,7 +249,6 @@ public Builder from(GetGroupResponseContent other) { } /** - *

                                                              Unique identifier for the group (service-generated).

                                                              *

                                                              Unique identifier for the group (service-generated).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -261,7 +260,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

                                                              *

                                                              Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -273,7 +271,6 @@ public TenantNameStage name(@NotNull String name) { } /** - *

                                                              Identifier for the tenant this group belongs to.

                                                              *

                                                              Identifier for the tenant this group belongs to.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -285,7 +282,6 @@ public CreatedAtStage tenantName(@NotNull String tenantName) { } /** - *

                                                              Timestamp of when the group was created.

                                                              *

                                                              Timestamp of when the group was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -297,7 +293,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Timestamp of when the group was last updated.

                                                              *

                                                              Timestamp of when the group was last updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java index d03ad6a0..3e6ad5a5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java @@ -224,7 +224,6 @@ public Builder from(GetGuardianEnrollmentResponseContent other) { } /** - *

                                                              ID for this enrollment.

                                                              *

                                                              ID for this enrollment.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java index a884104b..bc58afe5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java @@ -122,7 +122,6 @@ public Builder from(GetGuardianFactorPhoneTemplatesResponseContent other) { } /** - *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMess } /** - *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java index 59b52b08..863ed1fd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java @@ -122,7 +122,6 @@ public Builder from(GetGuardianFactorSmsTemplatesResponseContent other) { } /** - *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMess } /** - *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianSettingsResponseContent.java new file mode 100644 index 00000000..a2caffe0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetGuardianSettingsResponseContent.java @@ -0,0 +1,246 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetGuardianSettingsResponseContent.Builder.class) +public final class GetGuardianSettingsResponseContent { + private final boolean displayRememberMeCheckbox; + + private final boolean rememberMeDefaultValue; + + private final int mfaSessionInactivityTimeout; + + private final int mfaSessionOverallTimeout; + + private final Map additionalProperties; + + private GetGuardianSettingsResponseContent( + boolean displayRememberMeCheckbox, + boolean rememberMeDefaultValue, + int mfaSessionInactivityTimeout, + int mfaSessionOverallTimeout, + Map additionalProperties) { + this.displayRememberMeCheckbox = displayRememberMeCheckbox; + this.rememberMeDefaultValue = rememberMeDefaultValue; + this.mfaSessionInactivityTimeout = mfaSessionInactivityTimeout; + this.mfaSessionOverallTimeout = mfaSessionOverallTimeout; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login. + */ + @JsonProperty("display_remember_me_checkbox") + public boolean getDisplayRememberMeCheckbox() { + return displayRememberMeCheckbox; + } + + /** + * @return Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login. + */ + @JsonProperty("remember_me_default_value") + public boolean getRememberMeDefaultValue() { + return rememberMeDefaultValue; + } + + /** + * @return Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout. + */ + @JsonProperty("mfa_session_inactivity_timeout") + public int getMfaSessionInactivityTimeout() { + return mfaSessionInactivityTimeout; + } + + /** + * @return Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days. + */ + @JsonProperty("mfa_session_overall_timeout") + public int getMfaSessionOverallTimeout() { + return mfaSessionOverallTimeout; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetGuardianSettingsResponseContent + && equalTo((GetGuardianSettingsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetGuardianSettingsResponseContent other) { + return displayRememberMeCheckbox == other.displayRememberMeCheckbox + && rememberMeDefaultValue == other.rememberMeDefaultValue + && mfaSessionInactivityTimeout == other.mfaSessionInactivityTimeout + && mfaSessionOverallTimeout == other.mfaSessionOverallTimeout; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.displayRememberMeCheckbox, + this.rememberMeDefaultValue, + this.mfaSessionInactivityTimeout, + this.mfaSessionOverallTimeout); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DisplayRememberMeCheckboxStage builder() { + return new Builder(); + } + + public interface DisplayRememberMeCheckboxStage { + /** + *

                                                              Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + */ + RememberMeDefaultValueStage displayRememberMeCheckbox(boolean displayRememberMeCheckbox); + + Builder from(GetGuardianSettingsResponseContent other); + } + + public interface RememberMeDefaultValueStage { + /** + *

                                                              Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + */ + MfaSessionInactivityTimeoutStage rememberMeDefaultValue(boolean rememberMeDefaultValue); + } + + public interface MfaSessionInactivityTimeoutStage { + /** + *

                                                              Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout.

                                                              + */ + MfaSessionOverallTimeoutStage mfaSessionInactivityTimeout(int mfaSessionInactivityTimeout); + } + + public interface MfaSessionOverallTimeoutStage { + /** + *

                                                              Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days.

                                                              + */ + _FinalStage mfaSessionOverallTimeout(int mfaSessionOverallTimeout); + } + + public interface _FinalStage { + GetGuardianSettingsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements DisplayRememberMeCheckboxStage, + RememberMeDefaultValueStage, + MfaSessionInactivityTimeoutStage, + MfaSessionOverallTimeoutStage, + _FinalStage { + private boolean displayRememberMeCheckbox; + + private boolean rememberMeDefaultValue; + + private int mfaSessionInactivityTimeout; + + private int mfaSessionOverallTimeout; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetGuardianSettingsResponseContent other) { + displayRememberMeCheckbox(other.getDisplayRememberMeCheckbox()); + rememberMeDefaultValue(other.getRememberMeDefaultValue()); + mfaSessionInactivityTimeout(other.getMfaSessionInactivityTimeout()); + mfaSessionOverallTimeout(other.getMfaSessionOverallTimeout()); + return this; + } + + /** + *

                                                              Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("display_remember_me_checkbox") + public RememberMeDefaultValueStage displayRememberMeCheckbox(boolean displayRememberMeCheckbox) { + this.displayRememberMeCheckbox = displayRememberMeCheckbox; + return this; + } + + /** + *

                                                              Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("remember_me_default_value") + public MfaSessionInactivityTimeoutStage rememberMeDefaultValue(boolean rememberMeDefaultValue) { + this.rememberMeDefaultValue = rememberMeDefaultValue; + return this; + } + + /** + *

                                                              Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("mfa_session_inactivity_timeout") + public MfaSessionOverallTimeoutStage mfaSessionInactivityTimeout(int mfaSessionInactivityTimeout) { + this.mfaSessionInactivityTimeout = mfaSessionInactivityTimeout; + return this; + } + + /** + *

                                                              Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("mfa_session_overall_timeout") + public _FinalStage mfaSessionOverallTimeout(int mfaSessionOverallTimeout) { + this.mfaSessionOverallTimeout = mfaSessionOverallTimeout; + return this; + } + + @java.lang.Override + public GetGuardianSettingsResponseContent build() { + return new GetGuardianSettingsResponseContent( + displayRememberMeCheckbox, + rememberMeDefaultValue, + mfaSessionInactivityTimeout, + mfaSessionOverallTimeout, + 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/GetHookRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetHookRequestParameters.java index 1e4c456f..0cd53c4b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetHookRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetHookRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -34,7 +35,8 @@ private GetHookRequestParameters(OptionalNullable fields, Map getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -42,6 +44,12 @@ public OptionalNullable getFields() { return fields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java index 7818cc5e..182ff201 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java @@ -217,7 +217,6 @@ public Builder from(GetJobGenericErrorResponseContent other) { } /** - *

                                                              Status of this job.

                                                              *

                                                              Status of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -229,7 +228,6 @@ public TypeStage status(@NotNull String status) { } /** - *

                                                              Type of job this is.

                                                              *

                                                              Type of job this is.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -241,7 +239,6 @@ public IdStage type(@NotNull String type) { } /** - *

                                                              ID of this job.

                                                              *

                                                              ID of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java index 9a9fa1ad..af550b46 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java @@ -331,7 +331,6 @@ public Builder from(GetJobResponseContent other) { } /** - *

                                                              Status of this job.

                                                              *

                                                              Status of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -343,7 +342,6 @@ public TypeStage status(@NotNull String status) { } /** - *

                                                              Type of job this is.

                                                              *

                                                              Type of job this is.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -355,7 +353,6 @@ public IdStage type(@NotNull String type) { } /** - *

                                                              ID of this job.

                                                              *

                                                              ID of this job.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java index 180a8775..4ccda713 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationAllConnectionResponseContent.java @@ -31,6 +31,8 @@ public final class GetOrganizationAllConnectionResponseContent { private final Optional organizationAccessLevel; + private final Optional organizationMemberAccessLevel; + private final Optional isEnabled; private final String connectionId; @@ -45,6 +47,7 @@ private GetOrganizationAllConnectionResponseContent( Optional showAsButton, Optional isSignupEnabled, Optional organizationAccessLevel, + Optional organizationMemberAccessLevel, Optional isEnabled, String connectionId, Optional connection, @@ -54,6 +57,7 @@ private GetOrganizationAllConnectionResponseContent( this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.isEnabled = isEnabled; this.connectionId = connectionId; this.connection = connection; @@ -97,6 +101,11 @@ public Optional getOrganizationAccessLevel() { return organizationAccessLevel; } + @JsonProperty("organization_member_access_level") + public Optional getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + /** * @return Whether the connection is enabled for the organization. */ @@ -136,6 +145,7 @@ private boolean equalTo(GetOrganizationAllConnectionResponseContent other) { && showAsButton.equals(other.showAsButton) && isSignupEnabled.equals(other.isSignupEnabled) && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel) && isEnabled.equals(other.isEnabled) && connectionId.equals(other.connectionId) && connection.equals(other.connection); @@ -149,6 +159,7 @@ public int hashCode() { this.showAsButton, this.isSignupEnabled, this.organizationAccessLevel, + this.organizationMemberAccessLevel, this.isEnabled, this.connectionId, this.connection); @@ -211,6 +222,11 @@ public interface _FinalStage { _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel(OrganizationMemberAccessLevelEnum organizationMemberAccessLevel); + /** *

                                                              Whether the connection is enabled for the organization.

                                                              */ @@ -231,6 +247,8 @@ public static final class Builder implements ConnectionIdStage, _FinalStage { private Optional isEnabled = Optional.empty(); + private Optional organizationMemberAccessLevel = Optional.empty(); + private Optional organizationAccessLevel = Optional.empty(); private Optional isSignupEnabled = Optional.empty(); @@ -253,6 +271,7 @@ public Builder from(GetOrganizationAllConnectionResponseContent other) { showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); isEnabled(other.getIsEnabled()); connectionId(other.getConnectionId()); connection(other.getConnection()); @@ -260,7 +279,6 @@ public Builder from(GetOrganizationAllConnectionResponseContent other) { } /** - *

                                                              Connection identifier.

                                                              *

                                                              Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -304,6 +322,21 @@ public _FinalStage isEnabled(Optional isEnabled) { return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + OrganizationMemberAccessLevelEnum organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + @java.lang.Override public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); @@ -405,6 +438,7 @@ public GetOrganizationAllConnectionResponseContent build() { showAsButton, isSignupEnabled, organizationAccessLevel, + organizationMemberAccessLevel, isEnabled, connectionId, connection, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java index 830fddfa..709f7de8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java @@ -33,6 +33,12 @@ public final class GetOrganizationByNameResponseContent { private final Optional tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + + private final Optional client; + private final Map additionalProperties; private GetOrganizationByNameResponseContent( @@ -42,6 +48,9 @@ private GetOrganizationByNameResponseContent( Optional branding, Optional>> metadata, Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, + Optional client, Map additionalProperties) { this.id = id; this.name = name; @@ -49,6 +58,9 @@ private GetOrganizationByNameResponseContent( this.branding = branding; this.metadata = metadata; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; + this.client = client; this.additionalProperties = additionalProperties; } @@ -91,6 +103,24 @@ public Optional getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -109,12 +139,24 @@ private boolean equalTo(GetOrganizationByNameResponseContent other) { && displayName.equals(other.displayName) && branding.equals(other.branding) && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive) + && client.equals(other.client); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); + return Objects.hash( + this.id, + this.name, + this.displayName, + this.branding, + this.metadata, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive, + this.client); } @java.lang.Override @@ -140,6 +182,12 @@ public static final class Builder { private Optional tokenQuota = Optional.empty(); + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + + private Optional client = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -152,6 +200,9 @@ public Builder from(GetOrganizationByNameResponseContent other) { branding(other.getBranding()); metadata(other.getMetadata()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); + client(other.getClient()); return this; } @@ -230,9 +281,54 @@ public Builder tokenQuota(TokenQuota tokenQuota) { return this; } + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public Builder client(Optional client) { + this.client = client; + return this; + } + + public Builder client(OrganizationClientAssociation client) { + this.client = Optional.ofNullable(client); + return this; + } + public GetOrganizationByNameResponseContent build() { return new GetOrganizationByNameResponseContent( - id, name, displayName, branding, metadata, tokenQuota, additionalProperties); + id, + name, + displayName, + branding, + metadata, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + client, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationClientResponseContent.java new file mode 100644 index 00000000..e05e9153 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationClientResponseContent.java @@ -0,0 +1,189 @@ +/** + * 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 = GetOrganizationClientResponseContent.Builder.class) +public final class GetOrganizationClientResponseContent { + private final String clientId; + + private final boolean useForMemberAccess; + + private final OrganizationClientMetadata client; + + private final Map additionalProperties; + + private GetOrganizationClientResponseContent( + String clientId, + boolean useForMemberAccess, + OrganizationClientMetadata client, + Map additionalProperties) { + this.clientId = clientId; + this.useForMemberAccess = useForMemberAccess; + this.client = client; + this.additionalProperties = additionalProperties; + } + + /** + * @return The identifier of the client associated with the organization. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Whether this client is used for member access to the organization. + */ + @JsonProperty("use_for_member_access") + public boolean getUseForMemberAccess() { + return useForMemberAccess; + } + + @JsonProperty("client") + public OrganizationClientMetadata getClient() { + return client; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetOrganizationClientResponseContent + && equalTo((GetOrganizationClientResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetOrganizationClientResponseContent other) { + return clientId.equals(other.clientId) + && useForMemberAccess == other.useForMemberAccess + && client.equals(other.client); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientId, this.useForMemberAccess, this.client); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              The identifier of the client associated with the organization.

                                                              + */ + UseForMemberAccessStage clientId(@NotNull String clientId); + + Builder from(GetOrganizationClientResponseContent other); + } + + public interface UseForMemberAccessStage { + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + */ + ClientStage useForMemberAccess(boolean useForMemberAccess); + } + + public interface ClientStage { + _FinalStage client(@NotNull OrganizationClientMetadata client); + } + + public interface _FinalStage { + GetOrganizationClientResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, UseForMemberAccessStage, ClientStage, _FinalStage { + private String clientId; + + private boolean useForMemberAccess; + + private OrganizationClientMetadata client; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetOrganizationClientResponseContent other) { + clientId(other.getClientId()); + useForMemberAccess(other.getUseForMemberAccess()); + client(other.getClient()); + return this; + } + + /** + *

                                                              The identifier of the client associated with the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public UseForMemberAccessStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("use_for_member_access") + public ClientStage useForMemberAccess(boolean useForMemberAccess) { + this.useForMemberAccess = useForMemberAccess; + return this; + } + + @java.lang.Override + @JsonSetter("client") + public _FinalStage client(@NotNull OrganizationClientMetadata client) { + this.client = Objects.requireNonNull(client, "client must not be null"); + return this; + } + + @java.lang.Override + public GetOrganizationClientResponseContent build() { + return new GetOrganizationClientResponseContent(clientId, useForMemberAccess, client, 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/GetOrganizationDiscoveryDomainByNameResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainByNameResponseContent.java index f5dfbd36..0100ba46 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainByNameResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainByNameResponseContent.java @@ -219,7 +219,6 @@ public Builder from(GetOrganizationDiscoveryDomainByNameResponseContent other) { } /** - *

                                                              Organization discovery domain identifier.

                                                              *

                                                              Organization discovery domain identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -231,7 +230,6 @@ public DomainStage id(@NotNull String id) { } /** - *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +248,6 @@ public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus st } /** - *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +259,6 @@ public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { } /** - *

                                                              The full domain where the TXT record should be added.

                                                              *

                                                              The full domain where the TXT record should be added.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java index c3d561e7..5f9c4145 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java @@ -219,7 +219,6 @@ public Builder from(GetOrganizationDiscoveryDomainResponseContent other) { } /** - *

                                                              Organization discovery domain identifier.

                                                              *

                                                              Organization discovery domain identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -231,7 +230,6 @@ public DomainStage id(@NotNull String id) { } /** - *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +248,6 @@ public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus st } /** - *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +259,6 @@ public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { } /** - *

                                                              The full domain where the TXT record should be added.

                                                              *

                                                              The full domain where the TXT record should be added.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java index ef3e0106..9eb5b5b4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java @@ -33,6 +33,12 @@ public final class GetOrganizationResponseContent { private final Optional tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + + private final Optional client; + private final Map additionalProperties; private GetOrganizationResponseContent( @@ -42,6 +48,9 @@ private GetOrganizationResponseContent( Optional branding, Optional>> metadata, Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, + Optional client, Map additionalProperties) { this.id = id; this.name = name; @@ -49,6 +58,9 @@ private GetOrganizationResponseContent( this.branding = branding; this.metadata = metadata; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; + this.client = client; this.additionalProperties = additionalProperties; } @@ -91,6 +103,24 @@ public Optional getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -108,12 +138,24 @@ private boolean equalTo(GetOrganizationResponseContent other) { && displayName.equals(other.displayName) && branding.equals(other.branding) && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive) + && client.equals(other.client); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); + return Objects.hash( + this.id, + this.name, + this.displayName, + this.branding, + this.metadata, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive, + this.client); } @java.lang.Override @@ -139,6 +181,12 @@ public static final class Builder { private Optional tokenQuota = Optional.empty(); + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + + private Optional client = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -151,6 +199,9 @@ public Builder from(GetOrganizationResponseContent other) { branding(other.getBranding()); metadata(other.getMetadata()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); + client(other.getClient()); return this; } @@ -229,9 +280,54 @@ public Builder tokenQuota(TokenQuota tokenQuota) { return this; } + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public Builder client(Optional client) { + this.client = client; + return this; + } + + public Builder client(OrganizationClientAssociation client) { + this.client = Optional.ofNullable(client); + return this; + } + public GetOrganizationResponseContent build() { return new GetOrganizationResponseContent( - id, name, displayName, branding, metadata, tokenQuota, additionalProperties); + id, + name, + displayName, + branding, + metadata, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + client, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/GetPhoneFactorSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetPhoneFactorSettingsResponseContent.java new file mode 100644 index 00000000..6f365389 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetPhoneFactorSettingsResponseContent.java @@ -0,0 +1,161 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetPhoneFactorSettingsResponseContent.Builder.class) +public final class GetPhoneFactorSettingsResponseContent { + private final int otpLength; + + private final int otpExpirationTime; + + private final Map additionalProperties; + + private GetPhoneFactorSettingsResponseContent( + int otpLength, int otpExpirationTime, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public int getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public int getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetPhoneFactorSettingsResponseContent + && equalTo((GetPhoneFactorSettingsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetPhoneFactorSettingsResponseContent other) { + return otpLength == other.otpLength && otpExpirationTime == other.otpExpirationTime; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OtpLengthStage builder() { + return new Builder(); + } + + public interface OtpLengthStage { + /** + *

                                                              The length of the OTP code.

                                                              + */ + OtpExpirationTimeStage otpLength(int otpLength); + + Builder from(GetPhoneFactorSettingsResponseContent other); + } + + public interface OtpExpirationTimeStage { + /** + *

                                                              The OTP expiration time in seconds.

                                                              + */ + _FinalStage otpExpirationTime(int otpExpirationTime); + } + + public interface _FinalStage { + GetPhoneFactorSettingsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OtpLengthStage, OtpExpirationTimeStage, _FinalStage { + private int otpLength; + + private int otpExpirationTime; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetPhoneFactorSettingsResponseContent other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

                                                              The length of the OTP code.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_length") + public OtpExpirationTimeStage otpLength(int otpLength) { + this.otpLength = otpLength; + return this; + } + + /** + *

                                                              The OTP expiration time in seconds.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_expiration_time") + public _FinalStage otpExpirationTime(int otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + @java.lang.Override + public GetPhoneFactorSettingsResponseContent build() { + return new GetPhoneFactorSettingsResponseContent(otpLength, otpExpirationTime, 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/GetPhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetPhoneTemplateResponseContent.java index 1220fbf5..b6e74879 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetPhoneTemplateResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetPhoneTemplateResponseContent.java @@ -219,7 +219,6 @@ public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { } /** - *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRateLimitPolicyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRateLimitPolicyResponseContent.java index fc4fa4f3..87fe4fc2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRateLimitPolicyResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRateLimitPolicyResponseContent.java @@ -231,7 +231,6 @@ public Builder from(GetRateLimitPolicyResponseContent other) { } /** - *

                                                              Unique identifier for the Rate Limit Policy.

                                                              *

                                                              Unique identifier for the Rate Limit Policy.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -257,7 +256,6 @@ public ConsumerSelectorStage consumer(@NotNull RateLimitPolicyConsumerEnum consu } /** - *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ 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 4656c48f..880bb9fd 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/GetRefreshTokensRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java index b9412492..c01d14ab 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokensRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -57,7 +58,7 @@ private GetRefreshTokensRequestParameters( /** * @return ID of the user whose refresh tokens to retrieve. Required. */ - @JsonIgnore + @JsonProperty("user_id") public String getUserId() { return userId; } @@ -65,7 +66,8 @@ public String getUserId() { /** * @return Filter results by client ID. Only valid when user_id is provided. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") public OptionalNullable getClientId() { if (clientId == null) { return OptionalNullable.absent(); @@ -76,7 +78,8 @@ public OptionalNullable getClientId() { /** * @return An opaque cursor from which to start the selection (exclusive). Expires after 24 hours. Obtained from the next property of a previous response. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -87,7 +90,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -98,7 +102,8 @@ public OptionalNullable getTake() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -109,7 +114,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -117,6 +123,36 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -254,7 +290,6 @@ public Builder from(GetRefreshTokensRequestParameters other) { } /** - *

                                                              ID of the user whose refresh tokens to retrieve. Required.

                                                              *

                                                              ID of the user whose refresh tokens to retrieve. Required.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java index 0066656f..2866dbaa 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -35,7 +36,8 @@ private GetResourceServerRequestParameters( /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -43,6 +45,12 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java index 0d1e7a15..43e216a0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java @@ -52,12 +52,18 @@ public final class GetResourceServerResponseContent { private final Optional enforcePolicies; + private final Optional tokenLifetimeForAnonymousAccessTokens; + private final Optional tokenDialect; + private final OptionalNullable accessToken; + private final OptionalNullable tokenEncryption; private final OptionalNullable consentPolicy; + private final Optional requireConsentNonRepudiation; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -68,6 +74,10 @@ public final class GetResourceServerResponseContent { private final Optional clientId; + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + private final Map additionalProperties; private GetResourceServerResponseContent( @@ -85,14 +95,19 @@ private GetResourceServerResponseContent( Optional tokenLifetime, Optional tokenLifetimeForWeb, Optional enforcePolicies, + Optional tokenLifetimeForAnonymousAccessTokens, Optional tokenDialect, + OptionalNullable accessToken, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, OptionalNullable authorizationPolicy, Optional clientId, + Optional agentSubjectClaims, + OptionalNullable type, Map additionalProperties) { this.id = id; this.name = name; @@ -108,14 +123,19 @@ private GetResourceServerResponseContent( this.tokenLifetime = tokenLifetime; this.tokenLifetimeForWeb = tokenLifetimeForWeb; this.enforcePolicies = enforcePolicies; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; this.tokenDialect = tokenDialect; + this.accessToken = accessToken; this.tokenEncryption = tokenEncryption; this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; this.additionalProperties = additionalProperties; } @@ -228,11 +248,28 @@ public Optional getEnforcePolicies() { return enforcePolicies; } + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public Optional getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + @JsonProperty("token_dialect") public Optional getTokenDialect() { return tokenDialect; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") public OptionalNullable getTokenEncryption() { @@ -251,6 +288,14 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") public OptionalNullable> getAuthorizationDetails() { @@ -291,6 +336,26 @@ public Optional getClientId() { return clientId; } + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -321,6 +386,12 @@ private OptionalNullable _getAuthorizationPol return authorizationPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -347,14 +418,19 @@ private boolean equalTo(GetResourceServerResponseContent other) { && tokenLifetime.equals(other.tokenLifetime) && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) && enforcePolicies.equals(other.enforcePolicies) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) && tokenDialect.equals(other.tokenDialect) + && accessToken.equals(other.accessToken) && tokenEncryption.equals(other.tokenEncryption) && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) && authorizationPolicy.equals(other.authorizationPolicy) - && clientId.equals(other.clientId); + && clientId.equals(other.clientId) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); } @java.lang.Override @@ -374,14 +450,19 @@ public int hashCode() { this.tokenLifetime, this.tokenLifetimeForWeb, this.enforcePolicies, + this.tokenLifetimeForAnonymousAccessTokens, this.tokenDialect, + this.accessToken, this.tokenEncryption, this.consentPolicy, + this.requireConsentNonRepudiation, this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, this.authorizationPolicy, - this.clientId); + this.clientId, + this.agentSubjectClaims, + this.type); } @java.lang.Override @@ -423,12 +504,18 @@ public static final class Builder { private Optional enforcePolicies = Optional.empty(); + private Optional tokenLifetimeForAnonymousAccessTokens = Optional.empty(); + private Optional tokenDialect = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable tokenEncryption = OptionalNullable.absent(); private OptionalNullable consentPolicy = OptionalNullable.absent(); + private Optional requireConsentNonRepudiation = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -439,6 +526,10 @@ public static final class Builder { private Optional clientId = Optional.empty(); + private Optional agentSubjectClaims = Optional.empty(); + + private OptionalNullable type = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -459,14 +550,19 @@ public Builder from(GetResourceServerResponseContent other) { tokenLifetime(other.getTokenLifetime()); tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); enforcePolicies(other.getEnforcePolicies()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); tokenDialect(other.getTokenDialect()); + accessToken(other.getAccessToken()); tokenEncryption(other.getTokenEncryption()); consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); return this; } @@ -666,6 +762,20 @@ public Builder enforcePolicies(Boolean enforcePolicies) { return this; } + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_anonymous_access_tokens", nulls = Nulls.SKIP) + public Builder tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = Optional.ofNullable(tokenLifetimeForAnonymousAccessTokens); + return this; + } + @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) public Builder tokenDialect(Optional tokenDialect) { this.tokenDialect = tokenDialect; @@ -677,6 +787,37 @@ public Builder tokenDialect(ResourceServerTokenDialectResponseEnum tokenDialect) return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) public Builder tokenEncryption(@Nullable OptionalNullable tokenEncryption) { this.tokenEncryption = tokenEncryption; @@ -741,6 +882,20 @@ public Builder consentPolicy( return this; } + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public Builder requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + + public Builder requireConsentNonRepudiation(Boolean requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = Optional.ofNullable(requireConsentNonRepudiation); + return this; + } + @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; @@ -864,6 +1019,48 @@ public Builder clientId(String clientId) { return this; } + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public Builder agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + + public Builder agentSubjectClaims(ResourceServerAgentSubjectClaimsResponseEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + public GetResourceServerResponseContent build() { return new GetResourceServerResponseContent( id, @@ -880,14 +1077,19 @@ public GetResourceServerResponseContent build() { tokenLifetime, tokenLifetimeForWeb, enforcePolicies, + tokenLifetimeForAnonymousAccessTokens, tokenDialect, + accessToken, tokenEncryption, consentPolicy, + requireConsentNonRepudiation, authorizationDetails, proofOfPossession, subjectTypeAuthorization, authorizationPolicy, clientId, + agentSubjectClaims, + type, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.java index 656f59a9..7279ba8e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.java @@ -99,7 +99,6 @@ public Builder from(GetRiskAssessmentsSettingsNewDeviceResponseContent other) { } /** - *

                                                              Length of time to remember devices for, in days.

                                                              *

                                                              Length of time to remember devices for, in days.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java index 4de912ff..fd0cb4a6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java @@ -98,7 +98,6 @@ public Builder from(GetRiskAssessmentsSettingsResponseContent other) { } /** - *

                                                              Whether or not risk assessment is enabled.

                                                              *

                                                              Whether or not risk assessment is enabled.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java index 0ead2bc8..ad9e7514 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java @@ -26,16 +26,24 @@ public final class GetRoleResponseContent { private final Optional description; + private final Optional type; + + private final Optional ownerId; + private final Map additionalProperties; private GetRoleResponseContent( Optional id, Optional name, Optional description, + Optional type, + Optional ownerId, Map additionalProperties) { this.id = id; this.name = name; this.description = description; + this.type = type; + this.ownerId = ownerId; this.additionalProperties = additionalProperties; } @@ -63,6 +71,16 @@ public Optional getDescription() { return description; } + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("owner_id") + public Optional getOwnerId() { + return ownerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -75,12 +93,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(GetRoleResponseContent other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && ownerId.equals(other.ownerId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.description); + return Objects.hash(this.id, this.name, this.description, this.type, this.ownerId); } @java.lang.Override @@ -100,6 +122,10 @@ public static final class Builder { private Optional description = Optional.empty(); + private Optional type = Optional.empty(); + + private Optional ownerId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -109,6 +135,8 @@ public Builder from(GetRoleResponseContent other) { id(other.getId()); name(other.getName()); description(other.getDescription()); + type(other.getType()); + ownerId(other.getOwnerId()); return this; } @@ -154,8 +182,30 @@ public Builder description(String description) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(RoleTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) + public Builder ownerId(Optional ownerId) { + this.ownerId = ownerId; + return this; + } + + public Builder ownerId(String ownerId) { + this.ownerId = Optional.ofNullable(ownerId); + return this; + } + public GetRoleResponseContent build() { - return new GetRoleResponseContent(id, name, description, additionalProperties); + return new GetRoleResponseContent(id, name, description, type, ownerId, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java index 259dd8ad..3f32553b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetRuleRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java index 9e45660e..74f8c418 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java @@ -284,7 +284,6 @@ public Builder from(GetScimConfigurationResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -296,7 +295,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -308,7 +306,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -320,7 +317,6 @@ public TenantNameStage strategy(@NotNull String strategy) { } /** - *

                                                              The tenant's name

                                                              *

                                                              The tenant's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -332,7 +328,6 @@ public UserIdAttributeStage tenantName(@NotNull String tenantName) { } /** - *

                                                              User ID attribute for generating unique user ids

                                                              *

                                                              User ID attribute for generating unique user ids

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -344,7 +339,6 @@ public CreatedAtStage userIdAttribute(@NotNull String userIdAttribute) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -356,7 +350,6 @@ public UpdatedOnStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSegmentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSegmentResponseContent.java new file mode 100644 index 00000000..71950876 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetSegmentResponseContent.java @@ -0,0 +1,328 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = GetSegmentResponseContent.Builder.class) +public final class GetSegmentResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final SegmentTypeEnum type; + + private final SegmentStatusEnum status; + + private final List rules; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private GetSegmentResponseContent( + String id, + String name, + Optional description, + SegmentTypeEnum type, + SegmentStatusEnum status, + List rules, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.rules = rules; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public SegmentTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public SegmentStatusEnum getStatus() { + return status; + } + + @JsonProperty("rules") + public List getRules() { + return rules; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetSegmentResponseContent && equalTo((GetSegmentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetSegmentResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && rules.equals(other.rules) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.rules, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(GetSegmentResponseContent other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull SegmentTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull SegmentStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + GetSegmentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage rules(List rules); + + _FinalStage addRules(SegmentRule rules); + + _FinalStage addAllRules(List rules); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private SegmentTypeEnum type; + + private SegmentStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private List rules = new ArrayList<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetSegmentResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + rules(other.getRules()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull SegmentTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull SegmentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllRules(List rules) { + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage addRules(SegmentRule rules) { + this.rules.add(rules); + return this; + } + + @java.lang.Override + @JsonSetter(value = "rules", nulls = Nulls.SKIP) + public _FinalStage rules(List rules) { + this.rules.clear(); + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public GetSegmentResponseContent build() { + return new GetSegmentResponseContent( + id, name, description, type, status, rules, 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/GetSessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java index 237791f1..13e7c013 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; @@ -50,22 +50,25 @@ public final class GetSessionResponseContent { private final OptionalNullable> sessionMetadata; + private final Optional actor; + private final Map additionalProperties; 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, Optional cookie, OptionalNullable> sessionMetadata, + Optional actor, Map additionalProperties) { this.id = id; this.userId = userId; @@ -80,6 +83,7 @@ private GetSessionResponseContent( this.authentication = authentication; this.cookie = cookie; this.sessionMetadata = sessionMetadata; + this.actor = actor; this.additionalProperties = additionalProperties; } @@ -99,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; } @@ -161,6 +189,47 @@ public OptionalNullable> getSessionMetadata() { return sessionMetadata; } + @JsonProperty("actor") + 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() { @@ -191,7 +260,8 @@ private boolean equalTo(GetSessionResponseContent other) { && clients.equals(other.clients) && authentication.equals(other.authentication) && cookie.equals(other.cookie) - && sessionMetadata.equals(other.sessionMetadata); + && sessionMetadata.equals(other.sessionMetadata) + && actor.equals(other.actor); } @java.lang.Override @@ -209,7 +279,8 @@ public int hashCode() { this.clients, this.authentication, this.cookie, - this.sessionMetadata); + this.sessionMetadata, + this.actor); } @java.lang.Override @@ -227,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(); @@ -249,6 +320,8 @@ public static final class Builder { private OptionalNullable> sessionMetadata = OptionalNullable.absent(); + private Optional actor = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -268,6 +341,7 @@ public Builder from(GetSessionResponseContent other) { authentication(other.getAuthentication()); cookie(other.getCookie()); sessionMetadata(other.getSessionMetadata()); + actor(other.getActor()); return this; } @@ -300,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; } @@ -443,6 +637,17 @@ public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable actor) { + this.actor = actor; + return this; + } + + public Builder actor(SessionActorMetadata actor) { + this.actor = Optional.ofNullable(actor); + return this; + } + public GetSessionResponseContent build() { return new GetSessionResponseContent( id, @@ -458,6 +663,7 @@ public GetSessionResponseContent build() { authentication, cookie, sessionMetadata, + actor, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSigningKeysResponseContent.java index 8e0d7419..9efbf8a9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetSigningKeysResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetSigningKeysResponseContent.java @@ -349,7 +349,6 @@ public Builder from(GetSigningKeysResponseContent other) { } /** - *

                                                              The key id of the signing key

                                                              *

                                                              The key id of the signing key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -361,7 +360,6 @@ public CertStage kid(@NotNull String kid) { } /** - *

                                                              The public certificate of the signing key

                                                              *

                                                              The public certificate of the signing key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -373,7 +371,6 @@ public FingerprintStage cert(@NotNull String cert) { } /** - *

                                                              The cert fingerprint

                                                              *

                                                              The cert fingerprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -385,7 +382,6 @@ public ThumbprintStage fingerprint(@NotNull String fingerprint) { } /** - *

                                                              The cert thumbprint

                                                              *

                                                              The cert thumbprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java index b731d4b2..c7f2977f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java @@ -68,6 +68,8 @@ public final class GetTenantSettingsResponseContent { private final Optional> enabledLocales; + private final OptionalNullable accessToken; + private final OptionalNullable securityHeaders; private final OptionalNullable sessionCookie; @@ -88,12 +90,16 @@ public final class GetTenantSettingsResponseContent { private final OptionalNullable authorizationResponseIssParameterSupported; + private final OptionalNullable dpopStrictRefreshTokenBinding; + private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; private final Optional resourceParameterProfile; private final Optional clientIdMetadataDocumentSupported; + private final Optional clientIdMetadataDocumentDynamicRegistrationSupported; + private final Optional phoneConsolidatedExperience; private final Optional enableAiGuide; @@ -129,6 +135,7 @@ private GetTenantSettingsResponseContent( Optional> sandboxVersionsAvailable, Optional defaultRedirectionUri, Optional> enabledLocales, + OptionalNullable accessToken, OptionalNullable securityHeaders, OptionalNullable sessionCookie, OptionalNullable sessions, @@ -139,9 +146,11 @@ private GetTenantSettingsResponseContent( OptionalNullable mtls, Optional pushedAuthorizationRequestsSupported, OptionalNullable authorizationResponseIssParameterSupported, + OptionalNullable dpopStrictRefreshTokenBinding, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, Optional resourceParameterProfile, Optional clientIdMetadataDocumentSupported, + Optional clientIdMetadataDocumentDynamicRegistrationSupported, Optional phoneConsolidatedExperience, Optional enableAiGuide, Optional includeSessionMetadataInTenantLogs, @@ -170,6 +179,7 @@ private GetTenantSettingsResponseContent( this.sandboxVersionsAvailable = sandboxVersionsAvailable; this.defaultRedirectionUri = defaultRedirectionUri; this.enabledLocales = enabledLocales; + this.accessToken = accessToken; this.securityHeaders = securityHeaders; this.sessionCookie = sessionCookie; this.sessions = sessions; @@ -180,9 +190,12 @@ private GetTenantSettingsResponseContent( this.mtls = mtls; this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; + this.dpopStrictRefreshTokenBinding = dpopStrictRefreshTokenBinding; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.resourceParameterProfile = resourceParameterProfile; this.clientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; + this.clientIdMetadataDocumentDynamicRegistrationSupported = + clientIdMetadataDocumentDynamicRegistrationSupported; this.phoneConsolidatedExperience = phoneConsolidatedExperience; this.enableAiGuide = enableAiGuide; this.includeSessionMetadataInTenantLogs = includeSessionMetadataInTenantLogs; @@ -369,6 +382,15 @@ public Optional> getEnabledLocales() { return enabledLocales; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("security_headers") public OptionalNullable getSecurityHeaders() { @@ -458,6 +480,18 @@ public OptionalNullable getAuthorizationResponseIssParameterSupported() return authorizationResponseIssParameterSupported; } + /** + * @return Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("dpop_strict_refresh_token_binding") + public OptionalNullable getDpopStrictRefreshTokenBinding() { + if (dpopStrictRefreshTokenBinding == null) { + return OptionalNullable.absent(); + } + return dpopStrictRefreshTokenBinding; + } + /** * @return Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. @@ -485,6 +519,14 @@ public Optional getClientIdMetadataDocumentSupported() { return clientIdMetadataDocumentSupported; } + /** + * @return Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled. + */ + @JsonProperty("client_id_metadata_document_dynamic_registration_supported") + public Optional getClientIdMetadataDocumentDynamicRegistrationSupported() { + return clientIdMetadataDocumentDynamicRegistrationSupported; + } + /** * @return Whether Phone Consolidated Experience is enabled for this tenant. */ @@ -549,6 +591,12 @@ private OptionalNullable _getDefaultTokenQuota() { return defaultTokenQuota; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("security_headers") private OptionalNullable _getSecurityHeaders() { @@ -585,6 +633,12 @@ private OptionalNullable _getAuthorizationResponseIssParameterSupported return authorizationResponseIssParameterSupported; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("dpop_strict_refresh_token_binding") + private OptionalNullable _getDpopStrictRefreshTokenBinding() { + return dpopStrictRefreshTokenBinding; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { @@ -625,6 +679,7 @@ private boolean equalTo(GetTenantSettingsResponseContent other) { && sandboxVersionsAvailable.equals(other.sandboxVersionsAvailable) && defaultRedirectionUri.equals(other.defaultRedirectionUri) && enabledLocales.equals(other.enabledLocales) + && accessToken.equals(other.accessToken) && securityHeaders.equals(other.securityHeaders) && sessionCookie.equals(other.sessionCookie) && sessions.equals(other.sessions) @@ -635,10 +690,13 @@ private boolean equalTo(GetTenantSettingsResponseContent other) { && mtls.equals(other.mtls) && pushedAuthorizationRequestsSupported.equals(other.pushedAuthorizationRequestsSupported) && authorizationResponseIssParameterSupported.equals(other.authorizationResponseIssParameterSupported) + && dpopStrictRefreshTokenBinding.equals(other.dpopStrictRefreshTokenBinding) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) && resourceParameterProfile.equals(other.resourceParameterProfile) && clientIdMetadataDocumentSupported.equals(other.clientIdMetadataDocumentSupported) + && clientIdMetadataDocumentDynamicRegistrationSupported.equals( + other.clientIdMetadataDocumentDynamicRegistrationSupported) && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) && enableAiGuide.equals(other.enableAiGuide) && includeSessionMetadataInTenantLogs.equals(other.includeSessionMetadataInTenantLogs) @@ -671,6 +729,7 @@ public int hashCode() { this.sandboxVersionsAvailable, this.defaultRedirectionUri, this.enabledLocales, + this.accessToken, this.securityHeaders, this.sessionCookie, this.sessions, @@ -681,9 +740,11 @@ public int hashCode() { this.mtls, this.pushedAuthorizationRequestsSupported, this.authorizationResponseIssParameterSupported, + this.dpopStrictRefreshTokenBinding, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.resourceParameterProfile, this.clientIdMetadataDocumentSupported, + this.clientIdMetadataDocumentDynamicRegistrationSupported, this.phoneConsolidatedExperience, this.enableAiGuide, this.includeSessionMetadataInTenantLogs, @@ -746,6 +807,8 @@ public static final class Builder { private Optional> enabledLocales = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable securityHeaders = OptionalNullable.absent(); private OptionalNullable sessionCookie = OptionalNullable.absent(); @@ -766,12 +829,16 @@ public static final class Builder { private OptionalNullable authorizationResponseIssParameterSupported = OptionalNullable.absent(); + private OptionalNullable dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); private Optional resourceParameterProfile = Optional.empty(); private Optional clientIdMetadataDocumentSupported = Optional.empty(); + private Optional clientIdMetadataDocumentDynamicRegistrationSupported = Optional.empty(); + private Optional phoneConsolidatedExperience = Optional.empty(); private Optional enableAiGuide = Optional.empty(); @@ -811,6 +878,7 @@ public Builder from(GetTenantSettingsResponseContent other) { sandboxVersionsAvailable(other.getSandboxVersionsAvailable()); defaultRedirectionUri(other.getDefaultRedirectionUri()); enabledLocales(other.getEnabledLocales()); + accessToken(other.getAccessToken()); securityHeaders(other.getSecurityHeaders()); sessionCookie(other.getSessionCookie()); sessions(other.getSessions()); @@ -821,9 +889,12 @@ public Builder from(GetTenantSettingsResponseContent other) { mtls(other.getMtls()); pushedAuthorizationRequestsSupported(other.getPushedAuthorizationRequestsSupported()); authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); + dpopStrictRefreshTokenBinding(other.getDpopStrictRefreshTokenBinding()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); resourceParameterProfile(other.getResourceParameterProfile()); clientIdMetadataDocumentSupported(other.getClientIdMetadataDocumentSupported()); + clientIdMetadataDocumentDynamicRegistrationSupported( + other.getClientIdMetadataDocumentDynamicRegistrationSupported()); phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); enableAiGuide(other.getEnableAiGuide()); includeSessionMetadataInTenantLogs(other.getIncludeSessionMetadataInTenantLogs()); @@ -1223,6 +1294,37 @@ public Builder enabledLocales(List enabledLocales) { return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "security_headers", nulls = Nulls.SKIP) public Builder securityHeaders( @Nullable OptionalNullable securityHeaders) { @@ -1478,6 +1580,42 @@ public Builder authorizationResponseIssParameterSupported( return this; } + /** + *

                                                              Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility.

                                                              + */ + @JsonSetter(value = "dpop_strict_refresh_token_binding", nulls = Nulls.SKIP) + public Builder dpopStrictRefreshTokenBinding( + @Nullable OptionalNullable dpopStrictRefreshTokenBinding) { + this.dpopStrictRefreshTokenBinding = dpopStrictRefreshTokenBinding; + return this; + } + + public Builder dpopStrictRefreshTokenBinding(Boolean dpopStrictRefreshTokenBinding) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.of(dpopStrictRefreshTokenBinding); + return this; + } + + public Builder dpopStrictRefreshTokenBinding(Optional dpopStrictRefreshTokenBinding) { + if (dpopStrictRefreshTokenBinding.isPresent()) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.of(dpopStrictRefreshTokenBinding.get()); + } else { + this.dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + } + return this; + } + + public Builder dpopStrictRefreshTokenBinding( + com.auth0.client.mgmt.core.Nullable dpopStrictRefreshTokenBinding) { + if (dpopStrictRefreshTokenBinding.isNull()) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.ofNull(); + } else if (dpopStrictRefreshTokenBinding.isEmpty()) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + } else { + this.dpopStrictRefreshTokenBinding = OptionalNullable.of(dpopStrictRefreshTokenBinding.get()); + } + return this; + } + /** *

                                                              Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. @@ -1547,6 +1685,24 @@ public Builder clientIdMetadataDocumentSupported(Boolean clientIdMetadataDocumen return this; } + /** + *

                                                              Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled.

                                                              + */ + @JsonSetter(value = "client_id_metadata_document_dynamic_registration_supported", nulls = Nulls.SKIP) + public Builder clientIdMetadataDocumentDynamicRegistrationSupported( + Optional clientIdMetadataDocumentDynamicRegistrationSupported) { + this.clientIdMetadataDocumentDynamicRegistrationSupported = + clientIdMetadataDocumentDynamicRegistrationSupported; + return this; + } + + public Builder clientIdMetadataDocumentDynamicRegistrationSupported( + Boolean clientIdMetadataDocumentDynamicRegistrationSupported) { + this.clientIdMetadataDocumentDynamicRegistrationSupported = + Optional.ofNullable(clientIdMetadataDocumentDynamicRegistrationSupported); + return this; + } + /** *

                                                              Whether Phone Consolidated Experience is enabled for this tenant.

                                                              */ @@ -1637,6 +1793,7 @@ public GetTenantSettingsResponseContent build() { sandboxVersionsAvailable, defaultRedirectionUri, enabledLocales, + accessToken, securityHeaders, sessionCookie, sessions, @@ -1647,9 +1804,11 @@ public GetTenantSettingsResponseContent build() { mtls, pushedAuthorizationRequestsSupported, authorizationResponseIssParameterSupported, + dpopStrictRefreshTokenBinding, skipNonVerifiableCallbackUriConfirmationPrompt, resourceParameterProfile, clientIdMetadataDocumentSupported, + clientIdMetadataDocumentDynamicRegistrationSupported, phoneConsolidatedExperience, enableAiGuide, includeSessionMetadataInTenantLogs, diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java index 7ef40212..29d2e135 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java @@ -593,7 +593,6 @@ public Builder from(GetUserAuthenticationMethodResponseContent other) { } /** - *

                                                              The ID of the authentication method (auto generated)

                                                              *

                                                              The ID of the authentication method (auto generated)

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -612,7 +611,6 @@ public CreatedAtStage type(@NotNull AuthenticationMethodTypeEnum type) { } /** - *

                                                              Authenticator creation date

                                                              *

                                                              Authenticator creation date

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java index 78f35b02..b7cd5485 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -40,7 +41,8 @@ private GetUserRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -51,7 +53,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -59,6 +62,18 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/GetVariationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetVariationResponseContent.java new file mode 100644 index 00000000..e6533cb4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GetVariationResponseContent.java @@ -0,0 +1,302 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GetVariationResponseContent.Builder.class) +public final class GetVariationResponseContent { + private final String id; + + private final String featureFlagId; + + private final String name; + + private final Optional description; + + private final Map overrides; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private GetVariationResponseContent( + String id, + String featureFlagId, + String name, + Optional description, + Map overrides, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.featureFlagId = featureFlagId; + this.name = name; + this.description = description; + this.overrides = overrides; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("overrides") + public Map getOverrides() { + return overrides; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GetVariationResponseContent && equalTo((GetVariationResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GetVariationResponseContent other) { + return id.equals(other.id) + && featureFlagId.equals(other.featureFlagId) + && name.equals(other.name) + && description.equals(other.description) + && overrides.equals(other.overrides) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.featureFlagId, + this.name, + this.description, + this.overrides, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + FeatureFlagIdStage id(@NotNull String id); + + Builder from(GetVariationResponseContent other); + } + + public interface FeatureFlagIdStage { + NameStage featureFlagId(@NotNull String featureFlagId); + } + + public interface NameStage { + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + GetVariationResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage overrides(Map overrides); + + _FinalStage putAllOverrides(Map overrides); + + _FinalStage overrides(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, FeatureFlagIdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String featureFlagId; + + private String name; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Map overrides = new LinkedHashMap<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GetVariationResponseContent other) { + id(other.getId()); + featureFlagId(other.getFeatureFlagId()); + name(other.getName()); + description(other.getDescription()); + overrides(other.getOverrides()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public FeatureFlagIdStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public NameStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage overrides(String key, Object value) { + this.overrides.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllOverrides(Map overrides) { + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "overrides", nulls = Nulls.SKIP) + public _FinalStage overrides(Map overrides) { + this.overrides.clear(); + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public GetVariationResponseContent build() { + return new GetVariationResponseContent( + id, featureFlagId, name, description, overrides, 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/GoogleAccountLinkingConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/GoogleAccountLinkingConfiguration.java new file mode 100644 index 00000000..631fb3b7 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GoogleAccountLinkingConfiguration.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GoogleAccountLinkingConfiguration.Builder.class) +public final class GoogleAccountLinkingConfiguration { + private final Optional allowStreamlinedLinking; + + private final Map additionalProperties; + + private GoogleAccountLinkingConfiguration( + Optional allowStreamlinedLinking, Map additionalProperties) { + this.allowStreamlinedLinking = allowStreamlinedLinking; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables the Google streamlined account linking flow for this client. + */ + @JsonProperty("allow_streamlined_linking") + public Optional getAllowStreamlinedLinking() { + return allowStreamlinedLinking; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GoogleAccountLinkingConfiguration && equalTo((GoogleAccountLinkingConfiguration) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GoogleAccountLinkingConfiguration other) { + return allowStreamlinedLinking.equals(other.allowStreamlinedLinking); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.allowStreamlinedLinking); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional allowStreamlinedLinking = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(GoogleAccountLinkingConfiguration other) { + allowStreamlinedLinking(other.getAllowStreamlinedLinking()); + return this; + } + + /** + *

                                                              Enables the Google streamlined account linking flow for this client.

                                                              + */ + @JsonSetter(value = "allow_streamlined_linking", nulls = Nulls.SKIP) + public Builder allowStreamlinedLinking(Optional allowStreamlinedLinking) { + this.allowStreamlinedLinking = allowStreamlinedLinking; + return this; + } + + public Builder allowStreamlinedLinking(Boolean allowStreamlinedLinking) { + this.allowStreamlinedLinking = Optional.ofNullable(allowStreamlinedLinking); + return this; + } + + public GoogleAccountLinkingConfiguration build() { + return new GoogleAccountLinkingConfiguration(allowStreamlinedLinking, 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/GoogleAccountLinkingConfigurationCreate.java b/src/main/java/com/auth0/client/mgmt/types/GoogleAccountLinkingConfigurationCreate.java new file mode 100644 index 00000000..f9b62258 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GoogleAccountLinkingConfigurationCreate.java @@ -0,0 +1,113 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GoogleAccountLinkingConfigurationCreate.Builder.class) +public final class GoogleAccountLinkingConfigurationCreate { + private final Optional allowStreamlinedLinking; + + private final Map additionalProperties; + + private GoogleAccountLinkingConfigurationCreate( + Optional allowStreamlinedLinking, Map additionalProperties) { + this.allowStreamlinedLinking = allowStreamlinedLinking; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables the Google streamlined account linking flow for this client. + */ + @JsonProperty("allow_streamlined_linking") + public Optional getAllowStreamlinedLinking() { + return allowStreamlinedLinking; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GoogleAccountLinkingConfigurationCreate + && equalTo((GoogleAccountLinkingConfigurationCreate) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GoogleAccountLinkingConfigurationCreate other) { + return allowStreamlinedLinking.equals(other.allowStreamlinedLinking); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.allowStreamlinedLinking); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional allowStreamlinedLinking = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(GoogleAccountLinkingConfigurationCreate other) { + allowStreamlinedLinking(other.getAllowStreamlinedLinking()); + return this; + } + + /** + *

                                                              Enables the Google streamlined account linking flow for this client.

                                                              + */ + @JsonSetter(value = "allow_streamlined_linking", nulls = Nulls.SKIP) + public Builder allowStreamlinedLinking(Optional allowStreamlinedLinking) { + this.allowStreamlinedLinking = allowStreamlinedLinking; + return this; + } + + public Builder allowStreamlinedLinking(Boolean allowStreamlinedLinking) { + this.allowStreamlinedLinking = Optional.ofNullable(allowStreamlinedLinking); + return this; + } + + public GoogleAccountLinkingConfigurationCreate build() { + return new GoogleAccountLinkingConfigurationCreate(allowStreamlinedLinking, 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/GoogleAccountLinkingConfigurationOrNull.java b/src/main/java/com/auth0/client/mgmt/types/GoogleAccountLinkingConfigurationOrNull.java new file mode 100644 index 00000000..33094ebc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GoogleAccountLinkingConfigurationOrNull.java @@ -0,0 +1,113 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GoogleAccountLinkingConfigurationOrNull.Builder.class) +public final class GoogleAccountLinkingConfigurationOrNull { + private final Optional allowStreamlinedLinking; + + private final Map additionalProperties; + + private GoogleAccountLinkingConfigurationOrNull( + Optional allowStreamlinedLinking, Map additionalProperties) { + this.allowStreamlinedLinking = allowStreamlinedLinking; + this.additionalProperties = additionalProperties; + } + + /** + * @return Enables the Google streamlined account linking flow for this client. + */ + @JsonProperty("allow_streamlined_linking") + public Optional getAllowStreamlinedLinking() { + return allowStreamlinedLinking; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GoogleAccountLinkingConfigurationOrNull + && equalTo((GoogleAccountLinkingConfigurationOrNull) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GoogleAccountLinkingConfigurationOrNull other) { + return allowStreamlinedLinking.equals(other.allowStreamlinedLinking); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.allowStreamlinedLinking); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional allowStreamlinedLinking = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(GoogleAccountLinkingConfigurationOrNull other) { + allowStreamlinedLinking(other.getAllowStreamlinedLinking()); + return this; + } + + /** + *

                                                              Enables the Google streamlined account linking flow for this client.

                                                              + */ + @JsonSetter(value = "allow_streamlined_linking", nulls = Nulls.SKIP) + public Builder allowStreamlinedLinking(Optional allowStreamlinedLinking) { + this.allowStreamlinedLinking = allowStreamlinedLinking; + return this; + } + + public Builder allowStreamlinedLinking(Boolean allowStreamlinedLinking) { + this.allowStreamlinedLinking = Optional.ofNullable(allowStreamlinedLinking); + return this; + } + + public GoogleAccountLinkingConfigurationOrNull build() { + return new GoogleAccountLinkingConfigurationOrNull(allowStreamlinedLinking, 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/GuardianFactor.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactor.java index b7dd8900..64428a84 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactor.java +++ b/src/main/java/com/auth0/client/mgmt/types/GuardianFactor.java @@ -26,16 +26,20 @@ public final class GuardianFactor { private final Optional name; + private final Optional settings; + private final Map additionalProperties; private GuardianFactor( boolean enabled, Optional trialExpired, Optional name, + Optional settings, Map additionalProperties) { this.enabled = enabled; this.trialExpired = trialExpired; this.name = name; + this.settings = settings; this.additionalProperties = additionalProperties; } @@ -60,6 +64,11 @@ public Optional getName() { return name; } + @JsonProperty("settings") + public Optional getSettings() { + return settings; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -72,12 +81,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(GuardianFactor other) { - return enabled == other.enabled && trialExpired.equals(other.trialExpired) && name.equals(other.name); + return enabled == other.enabled + && trialExpired.equals(other.trialExpired) + && name.equals(other.name) + && settings.equals(other.settings); } @java.lang.Override public int hashCode() { - return Objects.hash(this.enabled, this.trialExpired, this.name); + return Objects.hash(this.enabled, this.trialExpired, this.name, this.settings); } @java.lang.Override @@ -115,12 +127,18 @@ public interface _FinalStage { _FinalStage name(Optional name); _FinalStage name(GuardianFactorNameEnum name); + + _FinalStage settings(Optional settings); + + _FinalStage settings(GuardianFactorSettings settings); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements EnabledStage, _FinalStage { private boolean enabled; + private Optional settings = Optional.empty(); + private Optional name = Optional.empty(); private Optional trialExpired = Optional.empty(); @@ -135,11 +153,11 @@ public Builder from(GuardianFactor other) { enabled(other.getEnabled()); trialExpired(other.getTrialExpired()); name(other.getName()); + settings(other.getSettings()); return this; } /** - *

                                                              Whether this factor is enabled (true) or disabled (false).

                                                              *

                                                              Whether this factor is enabled (true) or disabled (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -150,6 +168,19 @@ public _FinalStage enabled(boolean enabled) { return this; } + @java.lang.Override + public _FinalStage settings(GuardianFactorSettings settings) { + this.settings = Optional.ofNullable(settings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "settings", nulls = Nulls.SKIP) + public _FinalStage settings(Optional settings) { + this.settings = settings; + return this; + } + @java.lang.Override public _FinalStage name(GuardianFactorNameEnum name) { this.name = Optional.ofNullable(name); @@ -185,7 +216,7 @@ public _FinalStage trialExpired(Optional trialExpired) { @java.lang.Override public GuardianFactor build() { - return new GuardianFactor(enabled, trialExpired, name, additionalProperties); + return new GuardianFactor(enabled, trialExpired, name, settings, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java index f5209486..bf634e3f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java @@ -19,6 +19,8 @@ public final class GuardianFactorNameEnum { public static final GuardianFactorNameEnum WEBAUTHN_ROAMING = new GuardianFactorNameEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); + public static final GuardianFactorNameEnum PASSKEY = new GuardianFactorNameEnum(Value.PASSKEY, "passkey"); + public static final GuardianFactorNameEnum RECOVERY_CODE = new GuardianFactorNameEnum(Value.RECOVERY_CODE, "recovery-code"); @@ -70,6 +72,8 @@ public T visit(Visitor visitor) { return visitor.visitDuo(); case WEBAUTHN_ROAMING: return visitor.visitWebauthnRoaming(); + case PASSKEY: + return visitor.visitPasskey(); case RECOVERY_CODE: return visitor.visitRecoveryCode(); case SMS: @@ -95,6 +99,8 @@ public static GuardianFactorNameEnum valueOf(String value) { return DUO; case "webauthn-roaming": return WEBAUTHN_ROAMING; + case "passkey": + return PASSKEY; case "recovery-code": return RECOVERY_CODE; case "sms": @@ -123,6 +129,8 @@ public enum Value { RECOVERY_CODE, + PASSKEY, + UNKNOWN } @@ -143,6 +151,8 @@ public interface Visitor { T visitRecoveryCode(); + T visitPasskey(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorSettings.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorSettings.java new file mode 100644 index 00000000..f09b823d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorSettings.java @@ -0,0 +1,142 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = GuardianFactorSettings.Builder.class) +public final class GuardianFactorSettings { + private final Optional otpLength; + + private final Optional otpExpirationTime; + + private final Map additionalProperties; + + private GuardianFactorSettings( + Optional otpLength, + Optional otpExpirationTime, + Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public Optional getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public Optional getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GuardianFactorSettings && equalTo((GuardianFactorSettings) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(GuardianFactorSettings other) { + return otpLength.equals(other.otpLength) && otpExpirationTime.equals(other.otpExpirationTime); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional otpLength = Optional.empty(); + + private Optional otpExpirationTime = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(GuardianFactorSettings other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

                                                              The length of the OTP code.

                                                              + */ + @JsonSetter(value = "otp_length", nulls = Nulls.SKIP) + public Builder otpLength(Optional otpLength) { + this.otpLength = otpLength; + return this; + } + + public Builder otpLength(Integer otpLength) { + this.otpLength = Optional.ofNullable(otpLength); + return this; + } + + /** + *

                                                              The OTP expiration time in seconds.

                                                              + */ + @JsonSetter(value = "otp_expiration_time", nulls = Nulls.SKIP) + public Builder otpExpirationTime(Optional otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + public Builder otpExpirationTime(Integer otpExpirationTime) { + this.otpExpirationTime = Optional.ofNullable(otpExpirationTime); + return this; + } + + public GuardianFactorSettings build() { + return new GuardianFactorSettings(otpLength, otpExpirationTime, 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/IConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java index 6aa13b97..59e77acc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java @@ -21,7 +21,7 @@ public interface IConnectionOptionsCommonOidc { Optional getDpopSigningAlg(); - OptionalNullable getFederatedConnectionsAccessTokens(); + Optional getEnablePushedAuthorizationRequests(); Optional getIconUrl(); @@ -35,6 +35,8 @@ public interface IConnectionOptionsCommonOidc { Optional getOidcMetadata(); + Optional getPushedAuthorizationRequestEndpoint(); + Optional getScope(); Optional getSendBackChannelNonce(); @@ -54,4 +56,6 @@ public interface IConnectionOptionsCommonOidc { OptionalNullable>> getUpstreamParams(); Optional getUserinfoEndpoint(); + + Optional getUseOauthSpecScope(); } diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java index 6550f1e0..e33cc2bf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java @@ -39,5 +39,7 @@ public interface IConnectionOptionsCommonSaml { Optional> getThumbprints(); + Optional> getThumbprintsSha384(); + OptionalNullable>> getUpstreamParams(); } diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java index 841aa2ae..4cd6b577 100644 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java +++ b/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java @@ -3,11 +3,23 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.OptionalNullable; import java.util.List; +import java.util.Map; import java.util.Optional; -public interface IConnectionResponseCommon extends ICreateConnectionCommon { +public interface IConnectionResponseCommon { + String getDisplayName(); + String getId(); Optional> getRealms(); + + String getName(); + + Optional> getEnabledClients(); + + Optional getIsDomainConnection(); + + Optional>> getMetadata(); } diff --git a/src/main/java/com/auth0/client/mgmt/types/Identity.java b/src/main/java/com/auth0/client/mgmt/types/Identity.java index 361ff932..6a14e526 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Identity.java +++ b/src/main/java/com/auth0/client/mgmt/types/Identity.java @@ -142,7 +142,6 @@ public Builder from(Identity other) { } /** - *

                                                              user_id of the identity to be verified.

                                                              *

                                                              user_id of the identity to be verified.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/IdentityAssertionAuthorizationGrant.java b/src/main/java/com/auth0/client/mgmt/types/IdentityAssertionAuthorizationGrant.java new file mode 100644 index 00000000..08ab976d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/IdentityAssertionAuthorizationGrant.java @@ -0,0 +1,128 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = IdentityAssertionAuthorizationGrant.Builder.class) +public final class IdentityAssertionAuthorizationGrant { + private final boolean active; + + private final Map additionalProperties; + + private IdentityAssertionAuthorizationGrant(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return If set to true, the client can exchange ID-JAGs for access tokens. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IdentityAssertionAuthorizationGrant + && equalTo((IdentityAssertionAuthorizationGrant) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(IdentityAssertionAuthorizationGrant other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              If set to true, the client can exchange ID-JAGs for access tokens.

                                                              + */ + _FinalStage active(boolean active); + + Builder from(IdentityAssertionAuthorizationGrant other); + } + + public interface _FinalStage { + IdentityAssertionAuthorizationGrant build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(IdentityAssertionAuthorizationGrant other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              If set to true, the client can exchange ID-JAGs for access tokens.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public IdentityAssertionAuthorizationGrant build() { + return new IdentityAssertionAuthorizationGrant(active, 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/ImportEncryptionKeyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ImportEncryptionKeyResponseContent.java index a7ca3b07..aa3bb3dd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ImportEncryptionKeyResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/ImportEncryptionKeyResponseContent.java @@ -263,7 +263,6 @@ public Builder from(ImportEncryptionKeyResponseContent other) { } /** - *

                                                              Key ID

                                                              *

                                                              Key ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -289,7 +288,6 @@ public CreatedAtStage state(@NotNull EncryptionKeyState state) { } /** - *

                                                              Key creation timestamp

                                                              *

                                                              Key creation timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -301,7 +299,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              Key update timestamp

                                                              *

                                                              Key update timestamp

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/IncludeUserProfileSizeHeaderEnum.java b/src/main/java/com/auth0/client/mgmt/types/IncludeUserProfileSizeHeaderEnum.java new file mode 100644 index 00000000..b2f32a98 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/IncludeUserProfileSizeHeaderEnum.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 IncludeUserProfileSizeHeaderEnum { + public static final IncludeUserProfileSizeHeaderEnum TRUE = + new IncludeUserProfileSizeHeaderEnum(Value.TRUE, "true"); + + private final Value value; + + private final String string; + + IncludeUserProfileSizeHeaderEnum(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 IncludeUserProfileSizeHeaderEnum + && this.string.equals(((IncludeUserProfileSizeHeaderEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TRUE: + return visitor.visitTrue(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static IncludeUserProfileSizeHeaderEnum valueOf(String value) { + switch (value) { + case "true": + return TRUE; + default: + return new IncludeUserProfileSizeHeaderEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TRUE, + + UNKNOWN + } + + public interface Visitor { + T visitTrue(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/InternalServerErrorBody.java b/src/main/java/com/auth0/client/mgmt/types/InternalServerErrorBody.java new file mode 100644 index 00000000..55f2d066 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/InternalServerErrorBody.java @@ -0,0 +1,166 @@ +/** + * 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 = InternalServerErrorBody.Builder.class) +public final class InternalServerErrorBody { + private final String message; + + private final String statusCode; + + private final InternalServerErrorBodyError error; + + private final Map additionalProperties; + + private InternalServerErrorBody( + String message, + String statusCode, + InternalServerErrorBodyError error, + Map additionalProperties) { + this.message = message; + this.statusCode = statusCode; + this.error = error; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("message") + public String getMessage() { + return message; + } + + @JsonProperty("statusCode") + public String getStatusCode() { + return statusCode; + } + + @JsonProperty("error") + public InternalServerErrorBodyError getError() { + return error; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InternalServerErrorBody && equalTo((InternalServerErrorBody) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(InternalServerErrorBody other) { + return message.equals(other.message) && statusCode.equals(other.statusCode) && error.equals(other.error); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.message, this.statusCode, this.error); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MessageStage builder() { + return new Builder(); + } + + public interface MessageStage { + StatusCodeStage message(@NotNull String message); + + Builder from(InternalServerErrorBody other); + } + + public interface StatusCodeStage { + ErrorStage statusCode(@NotNull String statusCode); + } + + public interface ErrorStage { + _FinalStage error(@NotNull InternalServerErrorBodyError error); + } + + public interface _FinalStage { + InternalServerErrorBody build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MessageStage, StatusCodeStage, ErrorStage, _FinalStage { + private String message; + + private String statusCode; + + private InternalServerErrorBodyError error; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(InternalServerErrorBody other) { + message(other.getMessage()); + statusCode(other.getStatusCode()); + error(other.getError()); + return this; + } + + @java.lang.Override + @JsonSetter("message") + public StatusCodeStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("statusCode") + public ErrorStage statusCode(@NotNull String statusCode) { + this.statusCode = Objects.requireNonNull(statusCode, "statusCode must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("error") + public _FinalStage error(@NotNull InternalServerErrorBodyError error) { + this.error = Objects.requireNonNull(error, "error must not be null"); + return this; + } + + @java.lang.Override + public InternalServerErrorBody build() { + return new InternalServerErrorBody(message, statusCode, error, 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/InternalServerErrorBodyError.java b/src/main/java/com/auth0/client/mgmt/types/InternalServerErrorBodyError.java new file mode 100644 index 00000000..d27f70b9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/InternalServerErrorBodyError.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 InternalServerErrorBodyError { + public static final InternalServerErrorBodyError INTERNAL_SERVER_ERROR = + new InternalServerErrorBodyError(Value.INTERNAL_SERVER_ERROR, "Internal Server Error"); + + private final Value value; + + private final String string; + + InternalServerErrorBodyError(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 InternalServerErrorBodyError + && this.string.equals(((InternalServerErrorBodyError) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case INTERNAL_SERVER_ERROR: + return visitor.visitInternalServerError(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static InternalServerErrorBodyError valueOf(String value) { + switch (value) { + case "Internal Server Error": + return INTERNAL_SERVER_ERROR; + default: + return new InternalServerErrorBodyError(Value.UNKNOWN, value); + } + } + + public enum Value { + INTERNAL_SERVER_ERROR, + + UNKNOWN + } + + public interface Visitor { + T visitInternalServerError(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/LinkedClientConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/LinkedClientConfiguration.java index 53965b74..71b17a0f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LinkedClientConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/LinkedClientConfiguration.java @@ -98,7 +98,6 @@ public Builder from(LinkedClientConfiguration other) { } /** - *

                                                              The ID of the linked client.

                                                              *

                                                              The ID of the linked client.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java index 96ae64a1..dee72554 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -56,7 +57,8 @@ private ListActionsRequestParameters( /** * @return An actions extensibility point. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("triggerId") public OptionalNullable getTriggerId() { if (triggerId == null) { return OptionalNullable.absent(); @@ -67,7 +69,8 @@ public OptionalNullable getTriggerId() { /** * @return The name of the action to retrieve. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("actionName") public OptionalNullable getActionName() { if (actionName == null) { return OptionalNullable.absent(); @@ -78,7 +81,8 @@ public OptionalNullable getActionName() { /** * @return Optional filter to only retrieve actions that are deployed. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("deployed") public OptionalNullable getDeployed() { if (deployed == null) { return OptionalNullable.absent(); @@ -89,7 +93,8 @@ public OptionalNullable getDeployed() { /** * @return Use this field to request a specific page of the list results. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -100,7 +105,8 @@ public OptionalNullable getPage() { /** * @return The maximum number of results to be returned by the server in single response. 20 by default */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -111,7 +117,8 @@ public OptionalNullable getPerPage() { /** * @return Optional. When true, return only installed actions. When false, return only custom actions. Returns all actions by default. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("installed") public OptionalNullable getInstalled() { if (installed == null) { return OptionalNullable.absent(); @@ -119,6 +126,42 @@ public OptionalNullable getInstalled() { return installed; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("triggerId") + private OptionalNullable _getTriggerId() { + return triggerId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("actionName") + private OptionalNullable _getActionName() { + return actionName; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("deployed") + private OptionalNullable _getDeployed() { + return deployed; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("installed") + private OptionalNullable _getInstalled() { + return installed; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListAgentsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListAgentsRequestParameters.java new file mode 100644 index 00000000..280d717d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListAgentsRequestParameters.java @@ -0,0 +1,203 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListAgentsRequestParameters.Builder.class) +public final class ListAgentsRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final Map additionalProperties; + + private ListAgentsRequestParameters( + OptionalNullable from, OptionalNullable take, Map additionalProperties) { + this.from = from; + this.take = take; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of results per page. Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListAgentsRequestParameters && equalTo((ListAgentsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListAgentsRequestParameters other) { + return from.equals(other.from) && take.equals(other.take); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListAgentsRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + return this; + } + + /** + *

                                                              Optional Id from which to start selection.

                                                              + */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

                                                              Number of results per page. Defaults to 50.

                                                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + public ListAgentsRequestParameters build() { + return new ListAgentsRequestParameters(from, take, 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/ListAgentsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListAgentsResponseContent.java new file mode 100644 index 00000000..3ae3bd04 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListAgentsResponseContent.java @@ -0,0 +1,146 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListAgentsResponseContent.Builder.class) +public final class ListAgentsResponseContent { + private final List agents; + + private final Optional next; + + private final Map additionalProperties; + + private ListAgentsResponseContent( + List agents, Optional next, Map additionalProperties) { + this.agents = agents; + this.next = next; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("agents") + public List getAgents() { + return agents; + } + + /** + * @return A cursor to be used as the "from" query parameter for the next page of results. Omitted when there are no further results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListAgentsResponseContent && equalTo((ListAgentsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListAgentsResponseContent other) { + return agents.equals(other.agents) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.agents, this.next); + } + + @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 agents = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListAgentsResponseContent other) { + agents(other.getAgents()); + next(other.getNext()); + return this; + } + + @JsonSetter(value = "agents", nulls = Nulls.SKIP) + public Builder agents(List agents) { + this.agents.clear(); + if (agents != null) { + this.agents.addAll(agents); + } + return this; + } + + public Builder addAgents(AgentResponseContent agents) { + this.agents.add(agents); + return this; + } + + public Builder addAllAgents(List agents) { + if (agents != null) { + this.agents.addAll(agents); + } + return this; + } + + /** + *

                                                              A cursor to be used as the "from" query parameter for the next page of results. Omitted when there are no further results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListAgentsResponseContent build() { + return new ListAgentsResponseContent(agents, next, 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/ListClientGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java index 0e14a982..912aba78 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListClientGrantsRequestParameters.Builder.class) public final class ListClientGrantsRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -39,6 +42,7 @@ public final class ListClientGrantsRequestParameters { private final Map additionalProperties; private ListClientGrantsRequestParameters( + OptionalNullable includeTotals, OptionalNullable from, OptionalNullable take, OptionalNullable audience, @@ -47,6 +51,7 @@ private ListClientGrantsRequestParameters( OptionalNullable subjectType, OptionalNullable defaultFor, Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.audience = audience; @@ -57,10 +62,23 @@ private ListClientGrantsRequestParameters( this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -71,7 +89,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -82,7 +101,8 @@ public OptionalNullable getTake() { /** * @return Optional filter on audience. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("audience") public OptionalNullable getAudience() { if (audience == null) { return OptionalNullable.absent(); @@ -93,7 +113,8 @@ public OptionalNullable getAudience() { /** * @return Optional filter on client_id. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") public OptionalNullable getClientId() { if (clientId == null) { return OptionalNullable.absent(); @@ -104,7 +125,8 @@ public OptionalNullable getClientId() { /** * @return Optional filter on allow_any_organization. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allow_any_organization") public OptionalNullable getAllowAnyOrganization() { if (allowAnyOrganization == null) { return OptionalNullable.absent(); @@ -115,7 +137,8 @@ public OptionalNullable getAllowAnyOrganization() { /** * @return The type of application access the client grant allows. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("subject_type") public OptionalNullable getSubjectType() { if (subjectType == null) { return OptionalNullable.absent(); @@ -126,7 +149,8 @@ public OptionalNullable getSubjectType() { /** * @return Applies this client grant as the default for all clients in the specified group. The only accepted value is third_party_clients, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with client_id. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_for") public OptionalNullable getDefaultFor() { if (defaultFor == null) { return OptionalNullable.absent(); @@ -134,6 +158,54 @@ public OptionalNullable getDefaultFor() { return defaultFor; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("audience") + private OptionalNullable _getAudience() { + return audience; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allow_any_organization") + private OptionalNullable _getAllowAnyOrganization() { + return allowAnyOrganization; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("subject_type") + private OptionalNullable _getSubjectType() { + return subjectType; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("default_for") + private OptionalNullable _getDefaultFor() { + return defaultFor; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -146,7 +218,8 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListClientGrantsRequestParameters other) { - return from.equals(other.from) + return includeTotals.equals(other.includeTotals) + && from.equals(other.from) && take.equals(other.take) && audience.equals(other.audience) && clientId.equals(other.clientId) @@ -158,6 +231,7 @@ private boolean equalTo(ListClientGrantsRequestParameters other) { @java.lang.Override public int hashCode() { return Objects.hash( + this.includeTotals, this.from, this.take, this.audience, @@ -178,6 +252,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -198,6 +274,7 @@ public static final class Builder { private Builder() {} public Builder from(ListClientGrantsRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); audience(other.getAudience()); @@ -208,6 +285,40 @@ public Builder from(ListClientGrantsRequestParameters other) { return this; } + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + /** *

                                                              Optional Id from which to start selection.

                                                              */ @@ -448,6 +559,7 @@ public Builder defaultFor(com.auth0.client.mgmt.core.Nullable next; + + private final List clientProfiles; + + private final Map additionalProperties; + + private ListClientProfilesPaginatedResponseContent( + Optional next, List clientProfiles, Map additionalProperties) { + this.next = next; + this.clientProfiles = clientProfiles; + this.additionalProperties = additionalProperties; + } + + /** + * @return A cursor to be used as the "from" query parameter for the next page of results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @JsonProperty("client_profiles") + public List getClientProfiles() { + return clientProfiles; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListClientProfilesPaginatedResponseContent + && equalTo((ListClientProfilesPaginatedResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListClientProfilesPaginatedResponseContent other) { + return next.equals(other.next) && clientProfiles.equals(other.clientProfiles); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.next, this.clientProfiles); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional next = Optional.empty(); + + private List clientProfiles = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListClientProfilesPaginatedResponseContent other) { + next(other.getNext()); + clientProfiles(other.getClientProfiles()); + return this; + } + + /** + *

                                                              A cursor to be used as the "from" query parameter for the next page of results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + @JsonSetter(value = "client_profiles", nulls = Nulls.SKIP) + public Builder clientProfiles(List clientProfiles) { + this.clientProfiles.clear(); + if (clientProfiles != null) { + this.clientProfiles.addAll(clientProfiles); + } + return this; + } + + public Builder addClientProfiles(ClientProfile clientProfiles) { + this.clientProfiles.add(clientProfiles); + return this; + } + + public Builder addAllClientProfiles(List clientProfiles) { + if (clientProfiles != null) { + this.clientProfiles.addAll(clientProfiles); + } + return this; + } + + public ListClientProfilesPaginatedResponseContent build() { + return new ListClientProfilesPaginatedResponseContent(next, clientProfiles, 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/ListClientProfilesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientProfilesRequestParameters.java new file mode 100644 index 00000000..1266bf8f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientProfilesRequestParameters.java @@ -0,0 +1,204 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListClientProfilesRequestParameters.Builder.class) +public final class ListClientProfilesRequestParameters { + private final OptionalNullable from; + + private final OptionalNullable take; + + private final Map additionalProperties; + + private ListClientProfilesRequestParameters( + OptionalNullable from, OptionalNullable take, Map additionalProperties) { + this.from = from; + this.take = take; + this.additionalProperties = additionalProperties; + } + + /** + * @return Optional Id from which to start selection. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Number of results per page. Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListClientProfilesRequestParameters + && equalTo((ListClientProfilesRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListClientProfilesRequestParameters other) { + return from.equals(other.from) && take.equals(other.take); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.from, this.take); + } + + @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 OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListClientProfilesRequestParameters other) { + from(other.getFrom()); + take(other.getTake()); + return this; + } + + /** + *

                                                              Optional Id from which to start selection.

                                                              + */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

                                                              Number of results per page. Defaults to 50.

                                                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + public ListClientProfilesRequestParameters build() { + return new ListClientProfilesRequestParameters(from, take, 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/ListClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java index 117c634b..f09bb98e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -40,6 +41,8 @@ public final class ListClientsRequestParameters { private final OptionalNullable externalClientId; + private final OptionalNullable agentId; + private final OptionalNullable q; private final Map additionalProperties; @@ -54,6 +57,7 @@ private ListClientsRequestParameters( OptionalNullable isFirstParty, OptionalNullable appType, OptionalNullable externalClientId, + OptionalNullable agentId, OptionalNullable q, Map additionalProperties) { this.fields = fields; @@ -65,6 +69,7 @@ private ListClientsRequestParameters( this.isFirstParty = isFirstParty; this.appType = appType; this.externalClientId = externalClientId; + this.agentId = agentId; this.q = q; this.additionalProperties = additionalProperties; } @@ -72,7 +77,8 @@ private ListClientsRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -83,7 +89,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -94,7 +101,8 @@ public OptionalNullable getIncludeFields() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -105,7 +113,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Default value is 50, maximum value is 100 */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -116,7 +125,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -127,7 +137,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Optional filter on the global client parameter. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_global") public OptionalNullable getIsGlobal() { if (isGlobal == null) { return OptionalNullable.absent(); @@ -138,7 +149,8 @@ public OptionalNullable getIsGlobal() { /** * @return Optional filter on whether or not a client is a first-party client. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_first_party") public OptionalNullable getIsFirstParty() { if (isFirstParty == null) { return OptionalNullable.absent(); @@ -149,7 +161,8 @@ public OptionalNullable getIsFirstParty() { /** * @return Optional filter by a comma-separated list of application types. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("app_type") public OptionalNullable getAppType() { if (appType == null) { return OptionalNullable.absent(); @@ -158,9 +171,10 @@ public OptionalNullable getAppType() { } /** - * @return Optional filter by the Client ID Metadata Document URI for CIMD-registered clients. + * @return Optional filter by the Client ID Metadata Document URI for CIMD-registered clients. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("external_client_id") public OptionalNullable getExternalClientId() { if (externalClientId == null) { return OptionalNullable.absent(); @@ -168,10 +182,23 @@ public OptionalNullable getExternalClientId() { return externalClientId; } + /** + * @return Optional filter by the agent associated with the client.Additional Restrictions:
                                                              • Cannot be used in combination with other filters
                                                              • Only fields, include_fields, page, per_page, and include_totals are supported alongside it
                                                              • Checkpoint pagination (from, take) is not supported
                                                              + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("agent_id") + public OptionalNullable getAgentId() { + if (agentId == null) { + return OptionalNullable.absent(); + } + return agentId; + } + /** * @return Advanced Query in Lucene syntax.Permitted Queries:
                                                              • client_grant.organization_id:{organization_id}
                                                              • client_grant.allow_any_organization:true
                                                              Additional Restrictions:
                                                              • Cannot be used in combination with other filters
                                                              • Requires use of the from and take paging parameters (checkpoint paginatinon)
                                                              • Reduced rate limits apply. See Rate Limit Configurations
                                                              Note: Recent updates may not be immediately reflected in query results */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") public OptionalNullable getQ() { if (q == null) { return OptionalNullable.absent(); @@ -179,6 +206,72 @@ public OptionalNullable getQ() { return q; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_global") + private OptionalNullable _getIsGlobal() { + return isGlobal; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("is_first_party") + private OptionalNullable _getIsFirstParty() { + return isFirstParty; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("app_type") + private OptionalNullable _getAppType() { + return appType; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("external_client_id") + private OptionalNullable _getExternalClientId() { + return externalClientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("agent_id") + private OptionalNullable _getAgentId() { + return agentId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -200,6 +293,7 @@ private boolean equalTo(ListClientsRequestParameters other) { && isFirstParty.equals(other.isFirstParty) && appType.equals(other.appType) && externalClientId.equals(other.externalClientId) + && agentId.equals(other.agentId) && q.equals(other.q); } @@ -215,6 +309,7 @@ public int hashCode() { this.isFirstParty, this.appType, this.externalClientId, + this.agentId, this.q); } @@ -247,6 +342,8 @@ public static final class Builder { private OptionalNullable externalClientId = OptionalNullable.absent(); + private OptionalNullable agentId = OptionalNullable.absent(); + private OptionalNullable q = OptionalNullable.absent(); @JsonAnySetter @@ -264,6 +361,7 @@ public Builder from(ListClientsRequestParameters other) { isFirstParty(other.getIsFirstParty()); appType(other.getAppType()); externalClientId(other.getExternalClientId()); + agentId(other.getAgentId()); q(other.getQ()); return this; } @@ -541,7 +639,7 @@ public Builder appType(com.auth0.client.mgmt.core.Nullable appType) { } /** - *

                                                              Optional filter by the Client ID Metadata Document URI for CIMD-registered clients.

                                                              + *

                                                              Optional filter by the Client ID Metadata Document URI for CIMD-registered clients.

                                                              */ @JsonSetter(value = "external_client_id", nulls = Nulls.SKIP) public Builder externalClientId(@Nullable OptionalNullable externalClientId) { @@ -574,6 +672,40 @@ public Builder externalClientId(com.auth0.client.mgmt.core.Nullable exte return this; } + /** + *

                                                              Optional filter by the agent associated with the client.Additional Restrictions:

                                                              • Cannot be used in combination with other filters
                                                              • Only fields, include_fields, page, per_page, and include_totals are supported alongside it
                                                              • Checkpoint pagination (from, take) is not supported

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(@Nullable OptionalNullable agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = OptionalNullable.of(agentId); + return this; + } + + public Builder agentId(Optional agentId) { + if (agentId.isPresent()) { + this.agentId = OptionalNullable.of(agentId.get()); + } else { + this.agentId = OptionalNullable.absent(); + } + return this; + } + + public Builder agentId(com.auth0.client.mgmt.core.Nullable agentId) { + if (agentId.isNull()) { + this.agentId = OptionalNullable.ofNull(); + } else if (agentId.isEmpty()) { + this.agentId = OptionalNullable.absent(); + } else { + this.agentId = OptionalNullable.of(agentId.get()); + } + return this; + } + /** *

                                                              Advanced Query in Lucene syntax.Permitted Queries:

                                                              • client_grant.organization_id:{organization_id}
                                                              • client_grant.allow_any_organization:true
                                                              Additional Restrictions:
                                                              • Cannot be used in combination with other filters
                                                              • Requires use of the from and take paging parameters (checkpoint paginatinon)
                                                              • Reduced rate limits apply. See Rate Limit Configurations
                                                              Note: Recent updates may not be immediately reflected in query results

                                                              */ @@ -619,6 +751,7 @@ public ListClientsRequestParameters build() { isFirstParty, appType, externalClientId, + agentId, q, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java index ae2a5143..211dd722 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListConnectionProfileRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 5. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java index 87865336..f512ce7b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -26,6 +28,8 @@ public final class ListConnectionsQueryParameters { private final Optional> strategy; + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -40,6 +44,7 @@ public final class ListConnectionsQueryParameters { private ListConnectionsQueryParameters( Optional> strategy, + OptionalNullable includeTotals, OptionalNullable from, OptionalNullable take, OptionalNullable name, @@ -47,6 +52,7 @@ private ListConnectionsQueryParameters( OptionalNullable includeFields, Map additionalProperties) { this.strategy = strategy; + this.includeTotals = includeTotals; this.from = from; this.take = take; this.name = name; @@ -66,10 +72,23 @@ public Optional> getStrategy() { return strategy; } + /** + * @return true if a query summary must be included in the result, false otherwise. Not returned when using checkpoint pagination. Default false. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -80,7 +99,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -91,7 +111,8 @@ public OptionalNullable getTake() { /** * @return Provide the name of the connection to retrieve */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("name") public OptionalNullable getName() { if (name == null) { return OptionalNullable.absent(); @@ -102,7 +123,8 @@ public OptionalNullable getName() { /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -113,7 +135,8 @@ public OptionalNullable getFields() { /** * @return true if the fields specified are to be included in the result, false otherwise (defaults to true) */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -121,6 +144,48 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("strategy") + private Optional> _getStrategy() { + return strategy; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("name") + private OptionalNullable _getName() { + return name; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -134,6 +199,7 @@ public Map getAdditionalProperties() { private boolean equalTo(ListConnectionsQueryParameters other) { return strategy.equals(other.strategy) + && includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take) && name.equals(other.name) @@ -143,7 +209,8 @@ private boolean equalTo(ListConnectionsQueryParameters other) { @java.lang.Override public int hashCode() { - return Objects.hash(this.strategy, this.from, this.take, this.name, this.fields, this.includeFields); + return Objects.hash( + this.strategy, this.includeTotals, this.from, this.take, this.name, this.fields, this.includeFields); } @java.lang.Override @@ -159,6 +226,8 @@ public static Builder builder() { public static final class Builder { private Optional> strategy = Optional.empty(); + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -176,6 +245,7 @@ private Builder() {} public Builder from(ListConnectionsQueryParameters other) { strategy(other.getStrategy()); + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); name(other.getName()); @@ -214,6 +284,40 @@ public Builder strategy(ConnectionStrategyEnum strategy) { return this; } + /** + *

                                                              true if a query summary must be included in the result, false otherwise. Not returned when using checkpoint pagination. Default false.

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + /** *

                                                              Optional Id from which to start selection.

                                                              */ @@ -386,7 +490,7 @@ public Builder includeFields(com.auth0.client.mgmt.core.Nullable includ public ListConnectionsQueryParameters build() { return new ListConnectionsQueryParameters( - strategy, from, take, name, fields, includeFields, additionalProperties); + strategy, includeTotals, from, take, name, fields, includeFields, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java index 3ea7c855..0d559cc3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -48,7 +49,8 @@ private ListCustomDomainsRequestParameters( /** * @return Query in Lucene query string syntax. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") public OptionalNullable getQ() { if (q == null) { return OptionalNullable.absent(); @@ -59,7 +61,8 @@ public OptionalNullable getQ() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -70,7 +73,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -81,7 +85,8 @@ public OptionalNullable getIncludeFields() { /** * @return Field to sort by. Only domain:1 (ascending order by domain) is supported at this time. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") public OptionalNullable getSort() { if (sort == null) { return OptionalNullable.absent(); @@ -89,6 +94,30 @@ public OptionalNullable getSort() { return sort; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java index c20cc93c..be3edfa2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -64,7 +65,8 @@ private ListDeviceCredentialsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -75,7 +77,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. There is a maximum of 1000 results allowed from this endpoint. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -86,7 +89,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -97,7 +101,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -108,7 +113,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -119,7 +125,8 @@ public OptionalNullable getIncludeFields() { /** * @return user_id of the devices to retrieve. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("user_id") public OptionalNullable getUserId() { if (userId == null) { return OptionalNullable.absent(); @@ -130,7 +137,8 @@ public OptionalNullable getUserId() { /** * @return client_id of the devices to retrieve. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") public OptionalNullable getClientId() { if (clientId == null) { return OptionalNullable.absent(); @@ -139,9 +147,10 @@ public OptionalNullable getClientId() { } /** - * @return Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. The property will default to refresh_token when paging is requested + * @return Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. If none is provided a combined list of refresh_tokens and public_keys will be returned (and no rotating_refresh_token), in this case page, per_page and include_totals will be ignored. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") public OptionalNullable getType() { if (type == null) { return OptionalNullable.absent(); @@ -149,6 +158,54 @@ public OptionalNullable getType() { return type; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("user_id") + private OptionalNullable _getUserId() { + return userId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -468,7 +525,7 @@ public Builder clientId(com.auth0.client.mgmt.core.Nullable clientId) { } /** - *

                                                              Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. The property will default to refresh_token when paging is requested

                                                              + *

                                                              Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. If none is provided a combined list of refresh_tokens and public_keys will be returned (and no rotating_refresh_token), in this case page, per_page and include_totals will be ignored.

                                                              */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(@Nullable OptionalNullable type) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamDeliveriesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamDeliveriesResponseContent.java new file mode 100644 index 00000000..10721e0a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamDeliveriesResponseContent.java @@ -0,0 +1,153 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListEventStreamDeliveriesResponseContent.Builder.class) +public final class ListEventStreamDeliveriesResponseContent { + private final List deliveries; + + private final Optional next; + + private final Map additionalProperties; + + private ListEventStreamDeliveriesResponseContent( + List deliveries, Optional next, Map additionalProperties) { + this.deliveries = deliveries; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return List of event stream deliveries + */ + @JsonProperty("deliveries") + public List getDeliveries() { + return deliveries; + } + + /** + * @return The cursor to be used as the "from" query parameter for the next page of results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListEventStreamDeliveriesResponseContent + && equalTo((ListEventStreamDeliveriesResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListEventStreamDeliveriesResponseContent other) { + return deliveries.equals(other.deliveries) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.deliveries, this.next); + } + + @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 deliveries = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListEventStreamDeliveriesResponseContent other) { + deliveries(other.getDeliveries()); + next(other.getNext()); + return this; + } + + /** + *

                                                              List of event stream deliveries

                                                              + */ + @JsonSetter(value = "deliveries", nulls = Nulls.SKIP) + public Builder deliveries(List deliveries) { + this.deliveries.clear(); + if (deliveries != null) { + this.deliveries.addAll(deliveries); + } + return this; + } + + public Builder addDeliveries(EventStreamDelivery deliveries) { + this.deliveries.add(deliveries); + return this; + } + + public Builder addAllDeliveries(List deliveries) { + if (deliveries != null) { + this.deliveries.addAll(deliveries); + } + return this; + } + + /** + *

                                                              The cursor to be used as the "from" query parameter for the next page of results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListEventStreamDeliveriesResponseContent build() { + return new ListEventStreamDeliveriesResponseContent(deliveries, next, 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/ListEventStreamsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java index 4a2c0d72..13b5ef65 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListEventStreamsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListExperimentsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListExperimentsResponseContent.java new file mode 100644 index 00000000..a33c33ae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListExperimentsResponseContent.java @@ -0,0 +1,146 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListExperimentsResponseContent.Builder.class) +public final class ListExperimentsResponseContent { + private final List experiments; + + private final Optional next; + + private final Map additionalProperties; + + private ListExperimentsResponseContent( + List experiments, Optional next, Map additionalProperties) { + this.experiments = experiments; + this.next = next; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("experiments") + public List getExperiments() { + return experiments; + } + + /** + * @return Checkpoint token for the next page. Omitted when there are no further results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListExperimentsResponseContent && equalTo((ListExperimentsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListExperimentsResponseContent other) { + return experiments.equals(other.experiments) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.experiments, this.next); + } + + @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 experiments = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListExperimentsResponseContent other) { + experiments(other.getExperiments()); + next(other.getNext()); + return this; + } + + @JsonSetter(value = "experiments", nulls = Nulls.SKIP) + public Builder experiments(List experiments) { + this.experiments.clear(); + if (experiments != null) { + this.experiments.addAll(experiments); + } + return this; + } + + public Builder addExperiments(ExperimentListItem experiments) { + this.experiments.add(experiments); + return this; + } + + public Builder addAllExperiments(List experiments) { + if (experiments != null) { + this.experiments.addAll(experiments); + } + return this; + } + + /** + *

                                                              Checkpoint token for the next page. Omitted when there are no further results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListExperimentsResponseContent build() { + return new ListExperimentsResponseContent(experiments, next, 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/ListFeatureFlagsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListFeatureFlagsResponseContent.java new file mode 100644 index 00000000..3e75f3cb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListFeatureFlagsResponseContent.java @@ -0,0 +1,146 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListFeatureFlagsResponseContent.Builder.class) +public final class ListFeatureFlagsResponseContent { + private final List featureFlags; + + private final Optional next; + + private final Map additionalProperties; + + private ListFeatureFlagsResponseContent( + List featureFlags, Optional next, Map additionalProperties) { + this.featureFlags = featureFlags; + this.next = next; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("feature_flags") + public List getFeatureFlags() { + return featureFlags; + } + + /** + * @return Checkpoint token for the next page. Omitted when there are no further results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListFeatureFlagsResponseContent && equalTo((ListFeatureFlagsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListFeatureFlagsResponseContent other) { + return featureFlags.equals(other.featureFlags) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.featureFlags, this.next); + } + + @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 featureFlags = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListFeatureFlagsResponseContent other) { + featureFlags(other.getFeatureFlags()); + next(other.getNext()); + return this; + } + + @JsonSetter(value = "feature_flags", nulls = Nulls.SKIP) + public Builder featureFlags(List featureFlags) { + this.featureFlags.clear(); + if (featureFlags != null) { + this.featureFlags.addAll(featureFlags); + } + return this; + } + + public Builder addFeatureFlags(FeatureFlag featureFlags) { + this.featureFlags.add(featureFlags); + return this; + } + + public Builder addAllFeatureFlags(List featureFlags) { + if (featureFlags != null) { + this.featureFlags.addAll(featureFlags); + } + return this; + } + + /** + *

                                                              Checkpoint token for the next page. Omitted when there are no further results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListFeatureFlagsResponseContent build() { + return new ListFeatureFlagsResponseContent(featureFlags, next, 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/ListFlowsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java index 7eb33783..6c63b57f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -65,7 +67,8 @@ public Optional> getHydrate() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -76,7 +79,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -87,7 +91,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -98,7 +103,8 @@ public OptionalNullable getIncludeTotals() { /** * @return flag to filter by sync/async flows */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("synchronous") public OptionalNullable getSynchronous() { if (synchronous == null) { return OptionalNullable.absent(); @@ -106,6 +112,36 @@ public OptionalNullable getSynchronous() { return synchronous; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("hydrate") + private Optional> _getHydrate() { + return hydrate; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("synchronous") + private OptionalNullable _getSynchronous() { + return synchronous; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java index 42e90823..fc4c1085 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -61,7 +63,8 @@ public Optional> getHydrate() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -72,7 +75,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -83,7 +87,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -91,6 +96,30 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("hydrate") + private Optional> _getHydrate() { + return hydrate; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java index 1357e3dc..41f6823b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -34,6 +35,8 @@ public final class ListGroupsRequestParameters { private final OptionalNullable includeFields; + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -47,6 +50,7 @@ private ListGroupsRequestParameters( OptionalNullable search, OptionalNullable fields, OptionalNullable includeFields, + OptionalNullable includeTotals, OptionalNullable from, OptionalNullable take, Map additionalProperties) { @@ -56,6 +60,7 @@ private ListGroupsRequestParameters( this.search = search; this.fields = fields; this.includeFields = includeFields; + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; @@ -64,7 +69,8 @@ private ListGroupsRequestParameters( /** * @return Filter groups by connection ID. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("connection_id") public OptionalNullable getConnectionId() { if (connectionId == null) { return OptionalNullable.absent(); @@ -75,7 +81,8 @@ public OptionalNullable getConnectionId() { /** * @return Filter groups by name. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("name") public OptionalNullable getName() { if (name == null) { return OptionalNullable.absent(); @@ -86,7 +93,8 @@ public OptionalNullable getName() { /** * @return Filter groups by external ID. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("external_id") public OptionalNullable getExternalId() { if (externalId == null) { return OptionalNullable.absent(); @@ -97,7 +105,8 @@ public OptionalNullable getExternalId() { /** * @return Search for groups by name or external ID. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("search") public OptionalNullable getSearch() { if (search == null) { return OptionalNullable.absent(); @@ -108,7 +117,8 @@ public OptionalNullable getSearch() { /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -119,7 +129,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -127,10 +138,23 @@ public OptionalNullable getIncludeFields() { return includeFields; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). The returned total reflects at most 1,000 results. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -141,7 +165,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -149,6 +174,60 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("connection_id") + private OptionalNullable _getConnectionId() { + return connectionId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("name") + private OptionalNullable _getName() { + return name; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("external_id") + private OptionalNullable _getExternalId() { + return externalId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("search") + private OptionalNullable _getSearch() { + return search; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -167,6 +246,7 @@ private boolean equalTo(ListGroupsRequestParameters other) { && search.equals(other.search) && fields.equals(other.fields) && includeFields.equals(other.includeFields) + && includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @@ -180,6 +260,7 @@ public int hashCode() { this.search, this.fields, this.includeFields, + this.includeTotals, this.from, this.take); } @@ -207,6 +288,8 @@ public static final class Builder { private OptionalNullable includeFields = OptionalNullable.absent(); + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -223,6 +306,7 @@ public Builder from(ListGroupsRequestParameters other) { search(other.getSearch()); fields(other.getFields()); includeFields(other.getIncludeFields()); + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; @@ -432,6 +516,40 @@ public Builder includeFields(com.auth0.client.mgmt.core.Nullable includ return this; } + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). The returned total reflects at most 1,000 results.

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + /** *

                                                              Optional Id from which to start selection.

                                                              */ @@ -502,7 +620,16 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { public ListGroupsRequestParameters build() { return new ListGroupsRequestParameters( - connectionId, name, externalId, search, fields, includeFields, from, take, additionalProperties); + connectionId, + name, + externalId, + search, + fields, + includeFields, + includeTotals, + from, + take, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java index ed25b078..d6245fcd 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -56,7 +57,8 @@ private ListHooksRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -67,7 +69,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -78,7 +81,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -89,7 +93,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Optional filter on whether a hook is enabled (true) or disabled (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("enabled") public OptionalNullable getEnabled() { if (enabled == null) { return OptionalNullable.absent(); @@ -100,7 +105,8 @@ public OptionalNullable getEnabled() { /** * @return Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -111,7 +117,8 @@ public OptionalNullable getFields() { /** * @return Retrieves hooks that match the trigger */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("triggerId") public OptionalNullable getTriggerId() { if (triggerId == null) { return OptionalNullable.absent(); @@ -119,6 +126,42 @@ public OptionalNullable getTriggerId() { return triggerId; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("enabled") + private OptionalNullable _getEnabled() { + return enabled; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("triggerId") + private OptionalNullable _getTriggerId() { + return triggerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java index ba25c6f2..b31f9c6e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -60,7 +61,8 @@ private ListLogsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -71,7 +73,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Paging is disabled if parameter not sent. Default: 50. Max value: 100 */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -82,7 +85,8 @@ public OptionalNullable getPerPage() { /** * @return Field to use for sorting appended with :1 for ascending and :-1 for descending. e.g. date:-1 */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") public OptionalNullable getSort() { if (sort == null) { return OptionalNullable.absent(); @@ -93,7 +97,8 @@ public OptionalNullable getSort() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -104,7 +109,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false) */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -115,7 +121,8 @@ public OptionalNullable getIncludeFields() { /** * @return Return results as an array when false (default). Return results inside an object that also contains a total result count when true. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -128,7 +135,8 @@ public OptionalNullable getIncludeTotals() { * If no fields are provided a case insensitive 'starts with' search is performed on all of the following fields: client_name, connection, user_name. Otherwise, you can specify multiple fields and specify the search using the %field%:%search%, for example: application:node user:"John@contoso.com". * Values specified without quotes are matched using a case insensitive 'starts with' search. If quotes are used a case insensitve exact search is used. If multiple fields are used, the AND operator is used to join the clauses. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("search") public OptionalNullable getSearch() { if (search == null) { return OptionalNullable.absent(); @@ -136,6 +144,48 @@ public OptionalNullable getSearch() { return search; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("search") + private OptionalNullable _getSearch() { + return search; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java index 022fbef6..e24889d0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListNetworkAclsRequestParameters( /** * @return Use this field to request a specific page of the list results. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return The amount of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationClientsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationClientsResponseContent.java new file mode 100644 index 00000000..85a89497 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationClientsResponseContent.java @@ -0,0 +1,153 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationClientsResponseContent.Builder.class) +public final class ListOrganizationClientsResponseContent { + private final List clients; + + private final Optional next; + + private final Map additionalProperties; + + private ListOrganizationClientsResponseContent( + List clients, Optional next, Map additionalProperties) { + this.clients = clients; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return The list of clients associated with the organization. + */ + @JsonProperty("clients") + public List getClients() { + return clients; + } + + /** + * @return An opaque token that, when present, can be passed as the from query parameter to retrieve the next page of results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationClientsResponseContent + && equalTo((ListOrganizationClientsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationClientsResponseContent other) { + return clients.equals(other.clients) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clients, this.next); + } + + @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 clients = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationClientsResponseContent other) { + clients(other.getClients()); + next(other.getNext()); + return this; + } + + /** + *

                                                              The list of clients associated with the organization.

                                                              + */ + @JsonSetter(value = "clients", nulls = Nulls.SKIP) + public Builder clients(List clients) { + this.clients.clear(); + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + public Builder addClients(OrganizationClient clients) { + this.clients.add(clients); + return this; + } + + public Builder addAllClients(List clients) { + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + /** + *

                                                              An opaque token that, when present, can be passed as the from query parameter to retrieve the next page of results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListOrganizationClientsResponseContent build() { + return new ListOrganizationClientsResponseContent(clients, next, 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/ListOrganizationRoleGroupsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationRoleGroupsResponseContent.java new file mode 100644 index 00000000..98315592 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationRoleGroupsResponseContent.java @@ -0,0 +1,147 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationRoleGroupsResponseContent.Builder.class) +public final class ListOrganizationRoleGroupsResponseContent { + private final List groups; + + private final Optional next; + + private final Map additionalProperties; + + private ListOrganizationRoleGroupsResponseContent( + List groups, Optional next, Map additionalProperties) { + this.groups = groups; + this.next = next; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("groups") + public List getGroups() { + return groups; + } + + /** + * @return A cursor to be used as the "from" query parameter for the next page of results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationRoleGroupsResponseContent + && equalTo((ListOrganizationRoleGroupsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationRoleGroupsResponseContent other) { + return groups.equals(other.groups) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.groups, this.next); + } + + @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 groups = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationRoleGroupsResponseContent other) { + groups(other.getGroups()); + next(other.getNext()); + return this; + } + + @JsonSetter(value = "groups", nulls = Nulls.SKIP) + public Builder groups(List groups) { + this.groups.clear(); + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + public Builder addGroups(RoleGroup groups) { + this.groups.add(groups); + return this; + } + + public Builder addAllGroups(List groups) { + if (groups != null) { + this.groups.addAll(groups); + } + return this; + } + + /** + *

                                                              A cursor to be used as the "from" query parameter for the next page of results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListOrganizationRoleGroupsResponseContent build() { + return new ListOrganizationRoleGroupsResponseContent(groups, next, 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/ListOrganizationRoleMembersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationRoleMembersResponseContent.java new file mode 100644 index 00000000..6ae09718 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationRoleMembersResponseContent.java @@ -0,0 +1,153 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListOrganizationRoleMembersResponseContent.Builder.class) +public final class ListOrganizationRoleMembersResponseContent { + private final List members; + + private final Optional next; + + private final Map additionalProperties; + + private ListOrganizationRoleMembersResponseContent( + List members, Optional next, Map additionalProperties) { + this.members = members; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return List of members assigned to the role within the organization. + */ + @JsonProperty("members") + public List getMembers() { + return members; + } + + /** + * @return Cursor for the next page of results. Absent when there are no more results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListOrganizationRoleMembersResponseContent + && equalTo((ListOrganizationRoleMembersResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListOrganizationRoleMembersResponseContent other) { + return members.equals(other.members) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.members, this.next); + } + + @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 members = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListOrganizationRoleMembersResponseContent other) { + members(other.getMembers()); + next(other.getNext()); + return this; + } + + /** + *

                                                              List of members assigned to the role within the organization.

                                                              + */ + @JsonSetter(value = "members", nulls = Nulls.SKIP) + public Builder members(List members) { + this.members.clear(); + if (members != null) { + this.members.addAll(members); + } + return this; + } + + public Builder addMembers(RoleMember members) { + this.members.add(members); + return this; + } + + public Builder addAllMembers(List members) { + if (members != null) { + this.members.addAll(members); + } + return this; + } + + /** + *

                                                              Cursor for the next page of results. Absent when there are no more results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListOrganizationRoleMembersResponseContent build() { + return new ListOrganizationRoleMembersResponseContent(members, next, 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/ListOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java index 17ae4f5b..8a8e0475 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -22,29 +23,50 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListOrganizationsRequestParameters.Builder.class) public final class ListOrganizationsRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; private final OptionalNullable sort; + private final OptionalNullable includeClientAssociationFor; + private final Map additionalProperties; private ListOrganizationsRequestParameters( + OptionalNullable includeTotals, OptionalNullable from, OptionalNullable take, OptionalNullable sort, + OptionalNullable includeClientAssociationFor, Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.sort = sort; + this.includeClientAssociationFor = includeClientAssociationFor; this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -55,7 +77,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -66,7 +89,8 @@ public OptionalNullable getTake() { /** * @return Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1. We currently support sorting by the following fields: name, display_name and created_at. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") public OptionalNullable getSort() { if (sort == null) { return OptionalNullable.absent(); @@ -74,6 +98,48 @@ public OptionalNullable getSort() { return sort; } + /** + * @return Client ID. When set, each returned organization that has an association with this client gains a client object describing it; organizations without one omit the field. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_client_association_for") + public OptionalNullable getIncludeClientAssociationFor() { + if (includeClientAssociationFor == null) { + return OptionalNullable.absent(); + } + return includeClientAssociationFor; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_client_association_for") + private OptionalNullable _getIncludeClientAssociationFor() { + return includeClientAssociationFor; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -87,12 +153,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListOrganizationsRequestParameters other) { - return from.equals(other.from) && take.equals(other.take) && sort.equals(other.sort); + return includeTotals.equals(other.includeTotals) + && from.equals(other.from) + && take.equals(other.take) + && sort.equals(other.sort) + && includeClientAssociationFor.equals(other.includeClientAssociationFor); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take, this.sort); + return Objects.hash(this.includeTotals, this.from, this.take, this.sort, this.includeClientAssociationFor); } @java.lang.Override @@ -106,21 +176,61 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); private OptionalNullable sort = OptionalNullable.absent(); + private OptionalNullable includeClientAssociationFor = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} public Builder from(ListOrganizationsRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); sort(other.getSort()); + includeClientAssociationFor(other.getIncludeClientAssociationFor()); + return this; + } + + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } return this; } @@ -226,8 +336,44 @@ public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { return this; } + /** + *

                                                              Client ID. When set, each returned organization that has an association with this client gains a client object describing it; organizations without one omit the field.

                                                              + */ + @JsonSetter(value = "include_client_association_for", nulls = Nulls.SKIP) + public Builder includeClientAssociationFor(@Nullable OptionalNullable includeClientAssociationFor) { + this.includeClientAssociationFor = includeClientAssociationFor; + return this; + } + + public Builder includeClientAssociationFor(String includeClientAssociationFor) { + this.includeClientAssociationFor = OptionalNullable.of(includeClientAssociationFor); + return this; + } + + public Builder includeClientAssociationFor(Optional includeClientAssociationFor) { + if (includeClientAssociationFor.isPresent()) { + this.includeClientAssociationFor = OptionalNullable.of(includeClientAssociationFor.get()); + } else { + this.includeClientAssociationFor = OptionalNullable.absent(); + } + return this; + } + + public Builder includeClientAssociationFor( + com.auth0.client.mgmt.core.Nullable includeClientAssociationFor) { + if (includeClientAssociationFor.isNull()) { + this.includeClientAssociationFor = OptionalNullable.ofNull(); + } else if (includeClientAssociationFor.isEmpty()) { + this.includeClientAssociationFor = OptionalNullable.absent(); + } else { + this.includeClientAssociationFor = OptionalNullable.of(includeClientAssociationFor.get()); + } + return this; + } + public ListOrganizationsRequestParameters build() { - return new ListOrganizationsRequestParameters(from, take, sort, additionalProperties); + return new ListOrganizationsRequestParameters( + includeTotals, from, take, sort, includeClientAssociationFor, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListPortalsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListPortalsResponseContent.java new file mode 100644 index 00000000..f6c28578 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListPortalsResponseContent.java @@ -0,0 +1,116 @@ +/** + * 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 = ListPortalsResponseContent.Builder.class) +public final class ListPortalsResponseContent { + private final List portals; + + private final Map additionalProperties; + + private ListPortalsResponseContent(List portals, Map additionalProperties) { + this.portals = portals; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("portals") + public List getPortals() { + return portals; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListPortalsResponseContent && equalTo((ListPortalsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListPortalsResponseContent other) { + return portals.equals(other.portals); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.portals); + } + + @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 portals = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListPortalsResponseContent other) { + portals(other.getPortals()); + return this; + } + + @JsonSetter(value = "portals", nulls = Nulls.SKIP) + public Builder portals(List portals) { + this.portals.clear(); + if (portals != null) { + this.portals.addAll(portals); + } + return this; + } + + public Builder addPortals(PortalSummary portals) { + this.portals.add(portals); + return this; + } + + public Builder addAllPortals(List portals) { + if (portals != null) { + this.portals.addAll(portals); + } + return this; + } + + public ListPortalsResponseContent build() { + return new ListPortalsResponseContent(portals, 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/ListRateLimitPoliciesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRateLimitPoliciesRequestParameters.java index 4cbdca96..54412055 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListRateLimitPoliciesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListRateLimitPoliciesRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -52,7 +53,8 @@ private ListRateLimitPoliciesRequestParameters( /** * @return The API protected by the Rate Limit Policy. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("resource") public OptionalNullable getResource() { if (resource == null) { return OptionalNullable.absent(); @@ -63,7 +65,8 @@ public OptionalNullable getResource() { /** * @return The consumer to which the rate limit policy applies. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consumer") public OptionalNullable getConsumer() { if (consumer == null) { return OptionalNullable.absent(); @@ -74,7 +77,8 @@ public OptionalNullable getConsumer() { /** * @return Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consumer_selector") public OptionalNullable getConsumerSelector() { if (consumerSelector == null) { return OptionalNullable.absent(); @@ -85,7 +89,8 @@ public OptionalNullable getConsumerSelector() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -96,7 +101,8 @@ public OptionalNullable getTake() { /** * @return Cursor for pagination. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -104,6 +110,36 @@ public OptionalNullable getFrom() { return from; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("resource") + private OptionalNullable _getResource() { + return resource; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consumer") + private OptionalNullable _getConsumer() { + return consumer; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consumer_selector") + private OptionalNullable _getConsumerSelector() { + return consumerSelector; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java index 40f6d3a7..333a1d8d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -65,7 +67,8 @@ public Optional> getIdentifiers() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -76,7 +79,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -87,7 +91,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -98,7 +103,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -106,6 +112,36 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("identifiers") + private Optional> _getIdentifiers() { + return identifiers; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java index 17f27c3d..956ffe08 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java @@ -21,20 +21,20 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListRolesOffsetPaginatedResponseContent.Builder.class) public final class ListRolesOffsetPaginatedResponseContent { - private final Optional start; + private final double start; - private final Optional limit; + private final double limit; - private final Optional total; + private final double total; private final Optional> roles; private final Map additionalProperties; private ListRolesOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, + double start, + double limit, + double total, Optional> roles, Map additionalProperties) { this.start = start; @@ -45,17 +45,17 @@ private ListRolesOffsetPaginatedResponseContent( } @JsonProperty("start") - public Optional getStart() { + public double getStart() { return start; } @JsonProperty("limit") - public Optional getLimit() { + public double getLimit() { return limit; } @JsonProperty("total") - public Optional getTotal() { + public double getTotal() { return total; } @@ -77,10 +77,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListRolesOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && roles.equals(other.roles); + return start == other.start && limit == other.limit && total == other.total && roles.equals(other.roles); } @java.lang.Override @@ -93,17 +90,43 @@ public String toString() { return ObjectMappers.stringify(this); } - public static Builder builder() { + public static StartStage builder() { return new Builder(); } + public interface StartStage { + LimitStage start(double start); + + Builder from(ListRolesOffsetPaginatedResponseContent other); + } + + public interface LimitStage { + TotalStage limit(double limit); + } + + public interface TotalStage { + _FinalStage total(double total); + } + + public interface _FinalStage { + ListRolesOffsetPaginatedResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage roles(Optional> roles); + + _FinalStage roles(List roles); + } + @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional start = Optional.empty(); + public static final class Builder implements StartStage, LimitStage, TotalStage, _FinalStage { + private double start; - private Optional limit = Optional.empty(); + private double limit; - private Optional total = Optional.empty(); + private double total; private Optional> roles = Optional.empty(); @@ -112,6 +135,7 @@ public static final class Builder { private Builder() {} + @java.lang.Override public Builder from(ListRolesOffsetPaginatedResponseContent other) { start(other.getStart()); limit(other.getLimit()); @@ -120,59 +144,52 @@ public Builder from(ListRolesOffsetPaginatedResponseContent other) { return this; } - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional start) { + @java.lang.Override + @JsonSetter("start") + public LimitStage start(double start) { this.start = start; return this; } - public Builder start(Double start) { - this.start = Optional.ofNullable(start); - return this; - } - - @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public Builder limit(Optional limit) { + @java.lang.Override + @JsonSetter("limit") + public TotalStage limit(double limit) { this.limit = limit; return this; } - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { + @java.lang.Override + @JsonSetter("total") + public _FinalStage total(double total) { this.total = total; return this; } - public Builder total(Double total) { - this.total = Optional.ofNullable(total); + @java.lang.Override + public _FinalStage roles(List roles) { + this.roles = Optional.ofNullable(roles); return this; } + @java.lang.Override @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { + public _FinalStage roles(Optional> roles) { this.roles = roles; return this; } - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - + @java.lang.Override public ListRolesOffsetPaginatedResponseContent build() { return new ListRolesOffsetPaginatedResponseContent(start, limit, total, roles, 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/ListRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java index 7dd16a6d..2ca4e5b2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -30,6 +31,10 @@ public final class ListRolesRequestParameters { private final OptionalNullable nameFilter; + private final OptionalNullable type; + + private final OptionalNullable ownerId; + private final Map additionalProperties; private ListRolesRequestParameters( @@ -37,18 +42,23 @@ private ListRolesRequestParameters( OptionalNullable page, OptionalNullable includeTotals, OptionalNullable nameFilter, + OptionalNullable type, + OptionalNullable ownerId, Map additionalProperties) { this.perPage = perPage; this.page = page; this.includeTotals = includeTotals; this.nameFilter = nameFilter; + this.type = type; + this.ownerId = ownerId; this.additionalProperties = additionalProperties; } /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -59,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -70,7 +81,8 @@ public OptionalNullable getPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -81,7 +93,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Optional filter on name (case-insensitive). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("name_filter") public OptionalNullable getNameFilter() { if (nameFilter == null) { return OptionalNullable.absent(); @@ -89,6 +102,66 @@ public OptionalNullable getNameFilter() { return nameFilter; } + /** + * @return Optional filter on the type of the role + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + /** + * @return Filter organization-level roles by owner ID. Use an organization ID to filter that organization's roles, or "auth0" to retrieve Auth0-managed System Roles. Required when type is "organization". + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("owner_id") + public OptionalNullable getOwnerId() { + if (ownerId == null) { + return OptionalNullable.absent(); + } + return ownerId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("name_filter") + private OptionalNullable _getNameFilter() { + return nameFilter; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("owner_id") + private OptionalNullable _getOwnerId() { + return ownerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -104,12 +177,14 @@ private boolean equalTo(ListRolesRequestParameters other) { return perPage.equals(other.perPage) && page.equals(other.page) && includeTotals.equals(other.includeTotals) - && nameFilter.equals(other.nameFilter); + && nameFilter.equals(other.nameFilter) + && type.equals(other.type) + && ownerId.equals(other.ownerId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.perPage, this.page, this.includeTotals, this.nameFilter); + return Objects.hash(this.perPage, this.page, this.includeTotals, this.nameFilter, this.type, this.ownerId); } @java.lang.Override @@ -131,6 +206,10 @@ public static final class Builder { private OptionalNullable nameFilter = OptionalNullable.absent(); + private OptionalNullable type = OptionalNullable.absent(); + + private OptionalNullable ownerId = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -141,6 +220,8 @@ public Builder from(ListRolesRequestParameters other) { page(other.getPage()); includeTotals(other.getIncludeTotals()); nameFilter(other.getNameFilter()); + type(other.getType()); + ownerId(other.getOwnerId()); return this; } @@ -280,8 +361,77 @@ public Builder nameFilter(com.auth0.client.mgmt.core.Nullable nameFilter return this; } + /** + *

                                                              Optional filter on the type of the role

                                                              + */ + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(RoleTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + + /** + *

                                                              Filter organization-level roles by owner ID. Use an organization ID to filter that organization's roles, or "auth0" to retrieve Auth0-managed System Roles. Required when type is "organization".

                                                              + */ + @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) + public Builder ownerId(@Nullable OptionalNullable ownerId) { + this.ownerId = ownerId; + return this; + } + + public Builder ownerId(String ownerId) { + this.ownerId = OptionalNullable.of(ownerId); + return this; + } + + public Builder ownerId(Optional ownerId) { + if (ownerId.isPresent()) { + this.ownerId = OptionalNullable.of(ownerId.get()); + } else { + this.ownerId = OptionalNullable.absent(); + } + return this; + } + + public Builder ownerId(com.auth0.client.mgmt.core.Nullable ownerId) { + if (ownerId.isNull()) { + this.ownerId = OptionalNullable.ofNull(); + } else if (ownerId.isEmpty()) { + this.ownerId = OptionalNullable.absent(); + } else { + this.ownerId = OptionalNullable.of(ownerId.get()); + } + return this; + } + public ListRolesRequestParameters build() { - return new ListRolesRequestParameters(perPage, page, includeTotals, nameFilter, additionalProperties); + return new ListRolesRequestParameters( + perPage, page, includeTotals, nameFilter, type, ownerId, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java index 821adfc6..381a3a66 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -56,7 +57,8 @@ private ListRulesRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -67,7 +69,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -78,7 +81,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -89,7 +93,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Optional filter on whether a rule is enabled (true) or disabled (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("enabled") public OptionalNullable getEnabled() { if (enabled == null) { return OptionalNullable.absent(); @@ -100,7 +105,8 @@ public OptionalNullable getEnabled() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -111,7 +117,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -119,6 +126,42 @@ public OptionalNullable getIncludeFields() { return includeFields; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("enabled") + private OptionalNullable _getEnabled() { + return enabled; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListSegmentsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListSegmentsResponseContent.java new file mode 100644 index 00000000..25039c25 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListSegmentsResponseContent.java @@ -0,0 +1,146 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListSegmentsResponseContent.Builder.class) +public final class ListSegmentsResponseContent { + private final List segments; + + private final Optional next; + + private final Map additionalProperties; + + private ListSegmentsResponseContent( + List segments, Optional next, Map additionalProperties) { + this.segments = segments; + this.next = next; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("segments") + public List getSegments() { + return segments; + } + + /** + * @return Checkpoint token for the next page. Omitted when there are no further results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListSegmentsResponseContent && equalTo((ListSegmentsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListSegmentsResponseContent other) { + return segments.equals(other.segments) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.segments, this.next); + } + + @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 segments = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListSegmentsResponseContent other) { + segments(other.getSegments()); + next(other.getNext()); + return this; + } + + @JsonSetter(value = "segments", nulls = Nulls.SKIP) + public Builder segments(List segments) { + this.segments.clear(); + if (segments != null) { + this.segments.addAll(segments); + } + return this; + } + + public Builder addSegments(Segment segments) { + this.segments.add(segments); + return this; + } + + public Builder addAllSegments(List segments) { + if (segments != null) { + this.segments.addAll(segments); + } + return this; + } + + /** + *

                                                              Checkpoint token for the next page. Omitted when there are no further results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public ListSegmentsResponseContent build() { + return new ListSegmentsResponseContent(segments, next, 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/ListSelfServiceProfilesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java index ebd851fd..c0ba0e71 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListSelfServiceProfilesRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java index d4c57394..dbc25ae6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListUserAttributeProfileRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 5. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java index 27971209..8cf8bc85 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -41,16 +42,17 @@ private ListUserBlocksByIdentifierRequestParameters( /** * @return Should be any of a username, phone number, or email. */ - @JsonIgnore + @JsonProperty("identifier") public String getIdentifier() { return identifier; } /** - * @return If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list. + * @return If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consider_brute_force_enablement") public OptionalNullable getConsiderBruteForceEnablement() { if (considerBruteForceEnablement == null) { return OptionalNullable.absent(); @@ -58,6 +60,12 @@ public OptionalNullable getConsiderBruteForceEnablement() { return considerBruteForceEnablement; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consider_brute_force_enablement") + private OptionalNullable _getConsiderBruteForceEnablement() { + return considerBruteForceEnablement; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -106,8 +114,8 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); /** - *

                                                              If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list.

                                                              + *

                                                              If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state.

                                                              */ _FinalStage considerBruteForceEnablement(@Nullable OptionalNullable considerBruteForceEnablement); @@ -138,7 +146,6 @@ public Builder from(ListUserBlocksByIdentifierRequestParameters other) { } /** - *

                                                              Should be any of a username, phone number, or email.

                                                              *

                                                              Should be any of a username, phone number, or email.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -150,8 +157,8 @@ public _FinalStage identifier(@NotNull String identifier) { } /** - *

                                                              If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list.

                                                              + *

                                                              If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -168,8 +175,8 @@ public _FinalStage considerBruteForceEnablement( } /** - *

                                                              If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list.

                                                              + *

                                                              If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -183,8 +190,8 @@ public _FinalStage considerBruteForceEnablement(Optional considerBruteF } /** - *

                                                              If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list.

                                                              + *

                                                              If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -194,8 +201,8 @@ public _FinalStage considerBruteForceEnablement(Boolean considerBruteForceEnable } /** - *

                                                              If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list.

                                                              + *

                                                              If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state.

                                                              */ @java.lang.Override @JsonSetter(value = "consider_brute_force_enablement", nulls = Nulls.SKIP) diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java index 6e0a7a17..0f92c9e3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -33,10 +34,11 @@ private ListUserBlocksRequestParameters( } /** - * @return If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list. + * @return If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consider_brute_force_enablement") public OptionalNullable getConsiderBruteForceEnablement() { if (considerBruteForceEnablement == null) { return OptionalNullable.absent(); @@ -44,6 +46,12 @@ public OptionalNullable getConsiderBruteForceEnablement() { return considerBruteForceEnablement; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consider_brute_force_enablement") + private OptionalNullable _getConsiderBruteForceEnablement() { + return considerBruteForceEnablement; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -88,8 +96,8 @@ public Builder from(ListUserBlocksRequestParameters other) { } /** - *

                                                              If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list.

                                                              + *

                                                              If true, returns only blocks that are currently enforced (e.g. subject to protection status, IP allowlist, etc.). + * If false or omitted, returns all blocks regardless of enforcement state.

                                                              */ @JsonSetter(value = "consider_brute_force_enablement", nulls = Nulls.SKIP) public Builder considerBruteForceEnablement(@Nullable OptionalNullable considerBruteForceEnablement) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserConsentSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserConsentSigningKeysResponseContent.java new file mode 100644 index 00000000..1c625bce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserConsentSigningKeysResponseContent.java @@ -0,0 +1,124 @@ +/** + * 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 = ListUserConsentSigningKeysResponseContent.Builder.class) +public final class ListUserConsentSigningKeysResponseContent { + private final List keys; + + private final Map additionalProperties; + + private ListUserConsentSigningKeysResponseContent( + List keys, Map additionalProperties) { + this.keys = keys; + this.additionalProperties = additionalProperties; + } + + /** + * @return The consent signing keys registered for the user. + */ + @JsonProperty("keys") + public List getKeys() { + return keys; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListUserConsentSigningKeysResponseContent + && equalTo((ListUserConsentSigningKeysResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListUserConsentSigningKeysResponseContent 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(ListUserConsentSigningKeysResponseContent other) { + keys(other.getKeys()); + return this; + } + + /** + *

                                                              The consent signing keys registered for the user.

                                                              + */ + @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(ConsentSigningKey keys) { + this.keys.add(keys); + return this; + } + + public Builder addAllKeys(List keys) { + if (keys != null) { + this.keys.addAll(keys); + } + return this; + } + + public ListUserConsentSigningKeysResponseContent build() { + return new ListUserConsentSigningKeysResponseContent(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/ListUserGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java index df0d014e..7af9de12 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -56,7 +57,8 @@ private ListUserGrantsRequestParameters( /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -67,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -78,7 +81,8 @@ public OptionalNullable getPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -89,7 +93,8 @@ public OptionalNullable getIncludeTotals() { /** * @return user_id of the grants to retrieve. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("user_id") public OptionalNullable getUserId() { if (userId == null) { return OptionalNullable.absent(); @@ -100,7 +105,8 @@ public OptionalNullable getUserId() { /** * @return client_id of the grants to retrieve. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") public OptionalNullable getClientId() { if (clientId == null) { return OptionalNullable.absent(); @@ -111,7 +117,8 @@ public OptionalNullable getClientId() { /** * @return audience of the grants to retrieve. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("audience") public OptionalNullable getAudience() { if (audience == null) { return OptionalNullable.absent(); @@ -119,6 +126,42 @@ public OptionalNullable getAudience() { return audience; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("user_id") + private OptionalNullable _getUserId() { + return userId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("audience") + private OptionalNullable _getAudience() { + return audience; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.java index 4d1448bb..e42404bc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -45,7 +46,8 @@ private ListUsersByEmailRequestParameters( /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -56,7 +58,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -67,11 +70,23 @@ public OptionalNullable getIncludeFields() { /** * @return Email address to search for (case-sensitive). */ - @JsonIgnore + @JsonProperty("email") public String getEmail() { return email; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -162,7 +177,6 @@ public Builder from(ListUsersByEmailRequestParameters other) { } /** - *

                                                              Email address to search for (case-sensitive).

                                                              *

                                                              Email address to search for (case-sensitive).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java index 4e737df5..41d6d07b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -72,7 +73,8 @@ private ListUsersRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -83,7 +85,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -94,7 +97,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -105,7 +109,8 @@ public OptionalNullable getIncludeTotals() { /** * @return Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1 */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") public OptionalNullable getSort() { if (sort == null) { return OptionalNullable.absent(); @@ -116,7 +121,8 @@ public OptionalNullable getSort() { /** * @return Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name" */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("connection") public OptionalNullable getConnection() { if (connection == null) { return OptionalNullable.absent(); @@ -127,7 +133,8 @@ public OptionalNullable getConnection() { /** * @return Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -138,7 +145,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -149,7 +157,8 @@ public OptionalNullable getIncludeFields() { /** * @return Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") public OptionalNullable getQ() { if (q == null) { return OptionalNullable.absent(); @@ -160,7 +169,8 @@ public OptionalNullable getQ() { /** * @return The version of the search engine */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("search_engine") public OptionalNullable getSearchEngine() { if (searchEngine == null) { return OptionalNullable.absent(); @@ -171,7 +181,8 @@ public OptionalNullable getSearchEngine() { /** * @return If true (default), results are returned in a deterministic order. If false, results may be returned in a non-deterministic order, which can enhance performance for complex queries targeting a small number of users. Set to false only when consistent ordering and pagination is not required. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("primary_order") public OptionalNullable getPrimaryOrder() { if (primaryOrder == null) { return OptionalNullable.absent(); @@ -179,6 +190,66 @@ public OptionalNullable getPrimaryOrder() { return primaryOrder; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("connection") + private OptionalNullable _getConnection() { + return connection; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("search_engine") + private OptionalNullable _getSearchEngine() { + return searchEngine; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("primary_order") + private OptionalNullable _getPrimaryOrder() { + return primaryOrder; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/ListVariationsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListVariationsResponseContent.java new file mode 100644 index 00000000..be4fb19c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ListVariationsResponseContent.java @@ -0,0 +1,116 @@ +/** + * 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 = ListVariationsResponseContent.Builder.class) +public final class ListVariationsResponseContent { + private final List variations; + + private final Map additionalProperties; + + private ListVariationsResponseContent(List variations, Map additionalProperties) { + this.variations = variations; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("variations") + public List getVariations() { + return variations; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListVariationsResponseContent && equalTo((ListVariationsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListVariationsResponseContent other) { + return variations.equals(other.variations); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.variations); + } + + @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 variations = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListVariationsResponseContent other) { + variations(other.getVariations()); + return this; + } + + @JsonSetter(value = "variations", nulls = Nulls.SKIP) + public Builder variations(List variations) { + this.variations.clear(); + if (variations != null) { + this.variations.addAll(variations); + } + return this; + } + + public Builder addVariations(Variation variations) { + this.variations.add(variations); + return this; + } + + public Builder addAllVariations(List variations) { + if (variations != null) { + this.variations.addAll(variations); + } + return this; + } + + public ListVariationsResponseContent build() { + return new ListVariationsResponseContent(variations, 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/LogStreamDatadogSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogSink.java index 3aec249f..caf2f7ba 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogSink.java @@ -114,7 +114,6 @@ public Builder from(LogStreamDatadogSink other) { } /** - *

                                                              Datadog API Key

                                                              *

                                                              Datadog API Key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java index 9bb5bad1..73a8dca7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java @@ -142,7 +142,6 @@ public Builder from(LogStreamEventBridgeSink other) { } /** - *

                                                              AWS account ID

                                                              *

                                                              AWS account ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java index b77dd9f8..160a01a3 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java @@ -167,7 +167,6 @@ public Builder from(LogStreamEventGridSink other) { } /** - *

                                                              Subscription ID

                                                              *

                                                              Subscription ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -187,7 +186,6 @@ public AzureResourceGroupStage azureRegion(@NotNull LogStreamEventGridRegionEnum } /** - *

                                                              Resource Group

                                                              *

                                                              Resource Group

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java index 7b844f15..c631a9db 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java @@ -25,9 +25,15 @@ public final class LogStreamFilterGroupNameEnum { public static final LogStreamFilterGroupNameEnum AUTH_SILENT_AUTH_FAIL = new LogStreamFilterGroupNameEnum(Value.AUTH_SILENT_AUTH_FAIL, "auth.silent_auth.fail"); + public static final LogStreamFilterGroupNameEnum AGENT_GATEWAY_OPERATION_FAIL = + new LogStreamFilterGroupNameEnum(Value.AGENT_GATEWAY_OPERATION_FAIL, "agent_gateway.operation.fail"); + public static final LogStreamFilterGroupNameEnum AUTH_LOGOUT_FAIL = new LogStreamFilterGroupNameEnum(Value.AUTH_LOGOUT_FAIL, "auth.logout.fail"); + public static final LogStreamFilterGroupNameEnum AGENT_GATEWAY_OPERATION_SUCCESS = + new LogStreamFilterGroupNameEnum(Value.AGENT_GATEWAY_OPERATION_SUCCESS, "agent_gateway.operation.success"); + public static final LogStreamFilterGroupNameEnum AUTH_TOKEN_EXCHANGE_SUCCESS = new LogStreamFilterGroupNameEnum(Value.AUTH_TOKEN_EXCHANGE_SUCCESS, "auth.token_exchange.success"); @@ -63,6 +69,10 @@ public final class LogStreamFilterGroupNameEnum { public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_NOTIFICATION = new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_NOTIFICATION, "auth.login.notification"); + public static final LogStreamFilterGroupNameEnum AGENT_GATEWAY_AUTHENTICATION_FAIL = + new LogStreamFilterGroupNameEnum( + Value.AGENT_GATEWAY_AUTHENTICATION_FAIL, "agent_gateway.authentication.fail"); + public static final LogStreamFilterGroupNameEnum USER_SUCCESS = new LogStreamFilterGroupNameEnum(Value.USER_SUCCESS, "user.success"); @@ -111,8 +121,12 @@ public T visit(Visitor visitor) { return visitor.visitActions(); case AUTH_SILENT_AUTH_FAIL: return visitor.visitAuthSilentAuthFail(); + case AGENT_GATEWAY_OPERATION_FAIL: + return visitor.visitAgentGatewayOperationFail(); case AUTH_LOGOUT_FAIL: return visitor.visitAuthLogoutFail(); + case AGENT_GATEWAY_OPERATION_SUCCESS: + return visitor.visitAgentGatewayOperationSuccess(); case AUTH_TOKEN_EXCHANGE_SUCCESS: return visitor.visitAuthTokenExchangeSuccess(); case USER_NOTIFICATION: @@ -137,6 +151,8 @@ public T visit(Visitor visitor) { return visitor.visitAuthLoginFail(); case AUTH_LOGIN_NOTIFICATION: return visitor.visitAuthLoginNotification(); + case AGENT_GATEWAY_AUTHENTICATION_FAIL: + return visitor.visitAgentGatewayAuthenticationFail(); case USER_SUCCESS: return visitor.visitUserSuccess(); case UNKNOWN: @@ -160,8 +176,12 @@ public static LogStreamFilterGroupNameEnum valueOf(String value) { return ACTIONS; case "auth.silent_auth.fail": return AUTH_SILENT_AUTH_FAIL; + case "agent_gateway.operation.fail": + return AGENT_GATEWAY_OPERATION_FAIL; case "auth.logout.fail": return AUTH_LOGOUT_FAIL; + case "agent_gateway.operation.success": + return AGENT_GATEWAY_OPERATION_SUCCESS; case "auth.token_exchange.success": return AUTH_TOKEN_EXCHANGE_SUCCESS; case "user.notification": @@ -186,6 +206,8 @@ public static LogStreamFilterGroupNameEnum valueOf(String value) { return AUTH_LOGIN_FAIL; case "auth.login.notification": return AUTH_LOGIN_NOTIFICATION; + case "agent_gateway.authentication.fail": + return AGENT_GATEWAY_AUTHENTICATION_FAIL; case "user.success": return USER_SUCCESS; default: @@ -232,6 +254,12 @@ public enum Value { ACTIONS, + AGENT_GATEWAY_AUTHENTICATION_FAIL, + + AGENT_GATEWAY_OPERATION_FAIL, + + AGENT_GATEWAY_OPERATION_SUCCESS, + OTHER, UNKNOWN @@ -276,6 +304,12 @@ public interface Visitor { T visitActions(); + T visitAgentGatewayAuthenticationFail(); + + T visitAgentGatewayOperationFail(); + + T visitAgentGatewayOperationSuccess(); + T visitOther(); T visitUnknown(String unknownType); diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java index 2101e54c..75149816 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java @@ -194,7 +194,6 @@ public Builder from(LogStreamHttpSink other) { } /** - *

                                                              HTTP endpoint

                                                              *

                                                              HTTP endpoint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java index 27482603..74cfcc73 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java @@ -180,7 +180,6 @@ public MixpanelProjectIdStage mixpanelRegion(@NotNull LogStreamMixpanelRegionEnu } /** - *

                                                              Mixpanel Project Id

                                                              *

                                                              Mixpanel Project Id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -192,7 +191,6 @@ public MixpanelServiceAccountUsernameStage mixpanelProjectId(@NotNull String mix } /** - *

                                                              Mixpanel Service Account Username

                                                              *

                                                              Mixpanel Service Account Username

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -206,7 +204,6 @@ public MixpanelServiceAccountPasswordStage mixpanelServiceAccountUsername( } /** - *

                                                              Mixpanel Service Account Password

                                                              *

                                                              Mixpanel Service Account Password

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java index b1e5e7b5..abf0be0f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java @@ -177,7 +177,6 @@ public MixpanelProjectIdStage mixpanelRegion(@NotNull LogStreamMixpanelRegionEnu } /** - *

                                                              Mixpanel Project Id

                                                              *

                                                              Mixpanel Project Id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -189,7 +188,6 @@ public MixpanelServiceAccountUsernameStage mixpanelProjectId(@NotNull String mix } /** - *

                                                              Mixpanel Service Account Username

                                                              *

                                                              Mixpanel Service Account Username

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java index 7ec6a306..7fec818b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java @@ -98,7 +98,6 @@ public Builder from(LogStreamSegmentSinkWriteKey other) { } /** - *

                                                              Segment write key

                                                              *

                                                              Segment write key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java index 8cb1a4cb..4288b911 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java @@ -144,10 +144,6 @@ public LogStreamSinkPatch deserialize(JsonParser p, DeserializationContext conte } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentSink.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("mixpanelRegion") && ((Map) value).containsKey("mixpanelProjectId") @@ -157,6 +153,10 @@ public LogStreamSinkPatch deserialize(JsonParser p, DeserializationContext conte } catch (RuntimeException e) { } } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentSink.class)); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java index 6d099dbd..1c4a03fc 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java @@ -170,7 +170,6 @@ public Builder from(LogStreamSplunkSink other) { } /** - *

                                                              Splunk URL Endpoint

                                                              *

                                                              Splunk URL Endpoint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -182,7 +181,6 @@ public SplunkPortStage splunkDomain(@NotNull String splunkDomain) { } /** - *

                                                              Port

                                                              *

                                                              Port

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -194,7 +192,6 @@ public SplunkTokenStage splunkPort(@NotNull String splunkPort) { } /** - *

                                                              Splunk token

                                                              *

                                                              Splunk token

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -206,7 +203,6 @@ public SplunkSecureStage splunkToken(@NotNull String splunkToken) { } /** - *

                                                              Verify TLS certificate

                                                              *

                                                              Verify TLS certificate

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java index 8c8bcaea..9e70ac49 100644 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java +++ b/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java @@ -98,7 +98,6 @@ public Builder from(LogStreamSumoSink other) { } /** - *

                                                              HTTP Source Address

                                                              *

                                                              HTTP Source Address

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclHttpMessageSignature.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclHttpMessageSignature.java new file mode 100644 index 00000000..5eade5c5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclHttpMessageSignature.java @@ -0,0 +1,117 @@ +/** + * 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 = NetworkAclHttpMessageSignature.Builder.class) +public final class NetworkAclHttpMessageSignature { + private final List keys; + + private final Map additionalProperties; + + private NetworkAclHttpMessageSignature( + List keys, Map additionalProperties) { + this.keys = keys; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("keys") + public List getKeys() { + return keys; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NetworkAclHttpMessageSignature && equalTo((NetworkAclHttpMessageSignature) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NetworkAclHttpMessageSignature 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(NetworkAclHttpMessageSignature other) { + keys(other.getKeys()); + return this; + } + + @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(NetworkAclHttpMessageSignatureKey keys) { + this.keys.add(keys); + return this; + } + + public Builder addAllKeys(List keys) { + if (keys != null) { + this.keys.addAll(keys); + } + return this; + } + + public NetworkAclHttpMessageSignature build() { + return new NetworkAclHttpMessageSignature(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/NetworkAclHttpMessageSignatureKey.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclHttpMessageSignatureKey.java new file mode 100644 index 00000000..55474b94 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclHttpMessageSignatureKey.java @@ -0,0 +1,128 @@ +/** + * 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 = NetworkAclHttpMessageSignatureKey.Builder.class) +public final class NetworkAclHttpMessageSignatureKey { + private final String id; + + private final Map additionalProperties; + + private NetworkAclHttpMessageSignatureKey(String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return Auth0-generated identifier for the key, as returned by POST /api/v2/keys/network-acls. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NetworkAclHttpMessageSignatureKey && equalTo((NetworkAclHttpMessageSignatureKey) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NetworkAclHttpMessageSignatureKey other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @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, as returned by POST /api/v2/keys/network-acls.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(NetworkAclHttpMessageSignatureKey other); + } + + public interface _FinalStage { + NetworkAclHttpMessageSignatureKey build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(NetworkAclHttpMessageSignatureKey other) { + id(other.getId()); + return this; + } + + /** + *

                                                              Auth0-generated identifier for the key, as returned by POST /api/v2/keys/network-acls.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public NetworkAclHttpMessageSignatureKey build() { + return new NetworkAclHttpMessageSignatureKey(id, 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/NetworkAclKey.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclKey.java new file mode 100644 index 00000000..6761560d --- /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 00000000..ab9ed958 --- /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/NetworkAclMatch.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java index 5ba55c50..517b92e2 100644 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java +++ b/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java @@ -23,6 +23,8 @@ public final class NetworkAclMatch { private final Optional> asns; + private final Optional> auth0Managed; + private final Optional> geoCountryCodes; private final Optional> geoSubdivisionCodes; @@ -43,10 +45,13 @@ public final class NetworkAclMatch { private final Optional> connectingIpv6Cidrs; + private final Optional httpMessageSignature; + private final Map additionalProperties; private NetworkAclMatch( Optional> asns, + Optional> auth0Managed, Optional> geoCountryCodes, Optional> geoSubdivisionCodes, Optional> ipv4Cidrs, @@ -57,8 +62,10 @@ private NetworkAclMatch( Optional> hostnames, Optional> connectingIpv4Cidrs, Optional> connectingIpv6Cidrs, + Optional httpMessageSignature, Map additionalProperties) { this.asns = asns; + this.auth0Managed = auth0Managed; this.geoCountryCodes = geoCountryCodes; this.geoSubdivisionCodes = geoSubdivisionCodes; this.ipv4Cidrs = ipv4Cidrs; @@ -69,6 +76,7 @@ private NetworkAclMatch( this.hostnames = hostnames; this.connectingIpv4Cidrs = connectingIpv4Cidrs; this.connectingIpv6Cidrs = connectingIpv6Cidrs; + this.httpMessageSignature = httpMessageSignature; this.additionalProperties = additionalProperties; } @@ -77,6 +85,11 @@ public Optional> getAsns() { return asns; } + @JsonProperty("auth0_managed") + public Optional> getAuth0Managed() { + return auth0Managed; + } + @JsonProperty("geo_country_codes") public Optional> getGeoCountryCodes() { return geoCountryCodes; @@ -127,6 +140,11 @@ public Optional> getConnectingIpv6Cidrs() { return connectingIpv6Cidrs; } + @JsonProperty("http_message_signature") + public Optional getHttpMessageSignature() { + return httpMessageSignature; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -140,6 +158,7 @@ public Map getAdditionalProperties() { private boolean equalTo(NetworkAclMatch other) { return asns.equals(other.asns) + && auth0Managed.equals(other.auth0Managed) && geoCountryCodes.equals(other.geoCountryCodes) && geoSubdivisionCodes.equals(other.geoSubdivisionCodes) && ipv4Cidrs.equals(other.ipv4Cidrs) @@ -149,13 +168,15 @@ private boolean equalTo(NetworkAclMatch other) { && userAgents.equals(other.userAgents) && hostnames.equals(other.hostnames) && connectingIpv4Cidrs.equals(other.connectingIpv4Cidrs) - && connectingIpv6Cidrs.equals(other.connectingIpv6Cidrs); + && connectingIpv6Cidrs.equals(other.connectingIpv6Cidrs) + && httpMessageSignature.equals(other.httpMessageSignature); } @java.lang.Override public int hashCode() { return Objects.hash( this.asns, + this.auth0Managed, this.geoCountryCodes, this.geoSubdivisionCodes, this.ipv4Cidrs, @@ -165,7 +186,8 @@ public int hashCode() { this.userAgents, this.hostnames, this.connectingIpv4Cidrs, - this.connectingIpv6Cidrs); + this.connectingIpv6Cidrs, + this.httpMessageSignature); } @java.lang.Override @@ -181,6 +203,8 @@ public static Builder builder() { public static final class Builder { private Optional> asns = Optional.empty(); + private Optional> auth0Managed = Optional.empty(); + private Optional> geoCountryCodes = Optional.empty(); private Optional> geoSubdivisionCodes = Optional.empty(); @@ -201,6 +225,8 @@ public static final class Builder { private Optional> connectingIpv6Cidrs = Optional.empty(); + private Optional httpMessageSignature = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -208,6 +234,7 @@ private Builder() {} public Builder from(NetworkAclMatch other) { asns(other.getAsns()); + auth0Managed(other.getAuth0Managed()); geoCountryCodes(other.getGeoCountryCodes()); geoSubdivisionCodes(other.getGeoSubdivisionCodes()); ipv4Cidrs(other.getIpv4Cidrs()); @@ -218,6 +245,7 @@ public Builder from(NetworkAclMatch other) { hostnames(other.getHostnames()); connectingIpv4Cidrs(other.getConnectingIpv4Cidrs()); connectingIpv6Cidrs(other.getConnectingIpv6Cidrs()); + httpMessageSignature(other.getHttpMessageSignature()); return this; } @@ -232,6 +260,17 @@ public Builder asns(List asns) { return this; } + @JsonSetter(value = "auth0_managed", nulls = Nulls.SKIP) + public Builder auth0Managed(Optional> auth0Managed) { + this.auth0Managed = auth0Managed; + return this; + } + + public Builder auth0Managed(List auth0Managed) { + this.auth0Managed = Optional.ofNullable(auth0Managed); + return this; + } + @JsonSetter(value = "geo_country_codes", nulls = Nulls.SKIP) public Builder geoCountryCodes(Optional> geoCountryCodes) { this.geoCountryCodes = geoCountryCodes; @@ -342,9 +381,21 @@ public Builder connectingIpv6Cidrs(List connectingIpv6Cidrs) { return this; } + @JsonSetter(value = "http_message_signature", nulls = Nulls.SKIP) + public Builder httpMessageSignature(Optional httpMessageSignature) { + this.httpMessageSignature = httpMessageSignature; + return this; + } + + public Builder httpMessageSignature(NetworkAclHttpMessageSignature httpMessageSignature) { + this.httpMessageSignature = Optional.ofNullable(httpMessageSignature); + return this; + } + public NetworkAclMatch build() { return new NetworkAclMatch( asns, + auth0Managed, geoCountryCodes, geoSubdivisionCodes, ipv4Cidrs, @@ -355,6 +406,7 @@ public NetworkAclMatch build() { hostnames, connectingIpv4Cidrs, connectingIpv6Cidrs, + httpMessageSignature, additionalProperties); } 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 b32ca5bc..dd67941d 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/NotFoundErrorBody.java b/src/main/java/com/auth0/client/mgmt/types/NotFoundErrorBody.java new file mode 100644 index 00000000..22f929a9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NotFoundErrorBody.java @@ -0,0 +1,163 @@ +/** + * 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 = NotFoundErrorBody.Builder.class) +public final class NotFoundErrorBody { + private final String message; + + private final String statusCode; + + private final NotFoundErrorBodyError error; + + private final Map additionalProperties; + + private NotFoundErrorBody( + String message, String statusCode, NotFoundErrorBodyError error, Map additionalProperties) { + this.message = message; + this.statusCode = statusCode; + this.error = error; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("message") + public String getMessage() { + return message; + } + + @JsonProperty("statusCode") + public String getStatusCode() { + return statusCode; + } + + @JsonProperty("error") + public NotFoundErrorBodyError getError() { + return error; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NotFoundErrorBody && equalTo((NotFoundErrorBody) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NotFoundErrorBody other) { + return message.equals(other.message) && statusCode.equals(other.statusCode) && error.equals(other.error); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.message, this.statusCode, this.error); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MessageStage builder() { + return new Builder(); + } + + public interface MessageStage { + StatusCodeStage message(@NotNull String message); + + Builder from(NotFoundErrorBody other); + } + + public interface StatusCodeStage { + ErrorStage statusCode(@NotNull String statusCode); + } + + public interface ErrorStage { + _FinalStage error(@NotNull NotFoundErrorBodyError error); + } + + public interface _FinalStage { + NotFoundErrorBody build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MessageStage, StatusCodeStage, ErrorStage, _FinalStage { + private String message; + + private String statusCode; + + private NotFoundErrorBodyError error; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(NotFoundErrorBody other) { + message(other.getMessage()); + statusCode(other.getStatusCode()); + error(other.getError()); + return this; + } + + @java.lang.Override + @JsonSetter("message") + public StatusCodeStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("statusCode") + public ErrorStage statusCode(@NotNull String statusCode) { + this.statusCode = Objects.requireNonNull(statusCode, "statusCode must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("error") + public _FinalStage error(@NotNull NotFoundErrorBodyError error) { + this.error = Objects.requireNonNull(error, "error must not be null"); + return this; + } + + @java.lang.Override + public NotFoundErrorBody build() { + return new NotFoundErrorBody(message, statusCode, error, 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/NotFoundErrorBodyError.java b/src/main/java/com/auth0/client/mgmt/types/NotFoundErrorBodyError.java new file mode 100644 index 00000000..b4929ff5 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NotFoundErrorBodyError.java @@ -0,0 +1,74 @@ +/** + * 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 NotFoundErrorBodyError { + public static final NotFoundErrorBodyError NOT_FOUND = new NotFoundErrorBodyError(Value.NOT_FOUND, "Not Found"); + + private final Value value; + + private final String string; + + NotFoundErrorBodyError(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 NotFoundErrorBodyError + && this.string.equals(((NotFoundErrorBodyError) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NOT_FOUND: + return visitor.visitNotFound(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static NotFoundErrorBodyError valueOf(String value) { + switch (value) { + case "Not Found": + return NOT_FOUND; + default: + return new NotFoundErrorBodyError(Value.UNKNOWN, value); + } + } + + public enum Value { + NOT_FOUND, + + UNKNOWN + } + + public interface Visitor { + T visitNotFound(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/NotFoundSchema.java b/src/main/java/com/auth0/client/mgmt/types/NotFoundSchema.java new file mode 100644 index 00000000..02a474ca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NotFoundSchema.java @@ -0,0 +1,163 @@ +/** + * 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 = NotFoundSchema.Builder.class) +public final class NotFoundSchema { + private final String message; + + private final String statusCode; + + private final NotFoundSchemaError error; + + private final Map additionalProperties; + + private NotFoundSchema( + String message, String statusCode, NotFoundSchemaError error, Map additionalProperties) { + this.message = message; + this.statusCode = statusCode; + this.error = error; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("message") + public String getMessage() { + return message; + } + + @JsonProperty("statusCode") + public String getStatusCode() { + return statusCode; + } + + @JsonProperty("error") + public NotFoundSchemaError getError() { + return error; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof NotFoundSchema && equalTo((NotFoundSchema) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(NotFoundSchema other) { + return message.equals(other.message) && statusCode.equals(other.statusCode) && error.equals(other.error); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.message, this.statusCode, this.error); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MessageStage builder() { + return new Builder(); + } + + public interface MessageStage { + StatusCodeStage message(@NotNull String message); + + Builder from(NotFoundSchema other); + } + + public interface StatusCodeStage { + ErrorStage statusCode(@NotNull String statusCode); + } + + public interface ErrorStage { + _FinalStage error(@NotNull NotFoundSchemaError error); + } + + public interface _FinalStage { + NotFoundSchema build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MessageStage, StatusCodeStage, ErrorStage, _FinalStage { + private String message; + + private String statusCode; + + private NotFoundSchemaError error; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(NotFoundSchema other) { + message(other.getMessage()); + statusCode(other.getStatusCode()); + error(other.getError()); + return this; + } + + @java.lang.Override + @JsonSetter("message") + public StatusCodeStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("statusCode") + public ErrorStage statusCode(@NotNull String statusCode) { + this.statusCode = Objects.requireNonNull(statusCode, "statusCode must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("error") + public _FinalStage error(@NotNull NotFoundSchemaError error) { + this.error = Objects.requireNonNull(error, "error must not be null"); + return this; + } + + @java.lang.Override + public NotFoundSchema build() { + return new NotFoundSchema(message, statusCode, error, 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/NotFoundSchemaError.java b/src/main/java/com/auth0/client/mgmt/types/NotFoundSchemaError.java new file mode 100644 index 00000000..0274325c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/NotFoundSchemaError.java @@ -0,0 +1,73 @@ +/** + * 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 NotFoundSchemaError { + public static final NotFoundSchemaError NOT_FOUND = new NotFoundSchemaError(Value.NOT_FOUND, "Not Found"); + + private final Value value; + + private final String string; + + NotFoundSchemaError(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 NotFoundSchemaError && this.string.equals(((NotFoundSchemaError) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case NOT_FOUND: + return visitor.visitNotFound(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static NotFoundSchemaError valueOf(String value) { + switch (value) { + case "Not Found": + return NOT_FOUND; + default: + return new NotFoundSchemaError(Value.UNKNOWN, value); + } + } + + public enum Value { + NOT_FOUND, + + UNKNOWN + } + + public interface Visitor { + T visitNotFound(); + + T visitUnknown(String unknownType); + } +} 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 2c613614..792734fe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java +++ b/src/main/java/com/auth0/client/mgmt/types/OauthScope.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class OauthScope { + public static final OauthScope UPDATE_EXPERIMENTATION = + new OauthScope(Value.UPDATE_EXPERIMENTATION, "update:experimentation"); + public static final OauthScope DELETE_ACTIONS = new OauthScope(Value.DELETE_ACTIONS, "delete:actions"); public static final OauthScope READ_CONNECTIONS_KEYS = @@ -22,6 +25,9 @@ public final class OauthScope { public static final OauthScope DELETE_ROLE_MEMBERS = new OauthScope(Value.DELETE_ROLE_MEMBERS, "delete:role_members"); + public static final OauthScope READ_EXPERIMENTATION = + new OauthScope(Value.READ_EXPERIMENTATION, "read:experimentation"); + public static final OauthScope CREATE_CLIENT_GRANTS = new OauthScope(Value.CREATE_CLIENT_GRANTS, "create:client_grants"); @@ -30,6 +36,8 @@ public final class OauthScope { public static final OauthScope READ_CURRENT_USER = new OauthScope(Value.READ_CURRENT_USER, "read:current_user"); + public static final OauthScope DELETE_AGENTS = new OauthScope(Value.DELETE_AGENTS, "delete:agents"); + public static final OauthScope READ_SCIM_TOKEN = new OauthScope(Value.READ_SCIM_TOKEN, "read:scim_token"); public static final OauthScope UPDATE_ROLES = new OauthScope(Value.UPDATE_ROLES, "update:roles"); @@ -48,6 +56,9 @@ public final class OauthScope { public static final OauthScope DELETE_ORGANIZATIONS = new OauthScope(Value.DELETE_ORGANIZATIONS, "delete:organizations"); + public static final OauthScope DELETE_NETWORK_ACL_KEYS = + new OauthScope(Value.DELETE_NETWORK_ACL_KEYS, "delete:network_acl_keys"); + public static final OauthScope READ_USER_EFFECTIVE_ROLES = new OauthScope(Value.READ_USER_EFFECTIVE_ROLES, "read:user_effective_roles"); @@ -77,6 +88,8 @@ public final class OauthScope { public static final OauthScope CREATE_SSO_ACCESS_TICKETS = new OauthScope(Value.CREATE_SSO_ACCESS_TICKETS, "create:sso_access_tickets"); + public static final OauthScope READ_PORTALS = new OauthScope(Value.READ_PORTALS, "read:portals"); + public static final OauthScope UPDATE_EMAIL_TEMPLATES = new OauthScope(Value.UPDATE_EMAIL_TEMPLATES, "update:email_templates"); @@ -92,9 +105,6 @@ public final class OauthScope { public static final OauthScope READ_ROLE_MEMBERS = new OauthScope(Value.READ_ROLE_MEMBERS, "read:role_members"); - public static final OauthScope DELETE_FEDERATED_CONNECTIONS_TOKENS = - new OauthScope(Value.DELETE_FEDERATED_CONNECTIONS_TOKENS, "delete:federated_connections_tokens"); - public static final OauthScope READ_SELF_SERVICE_PROFILES = new OauthScope(Value.READ_SELF_SERVICE_PROFILES, "read:self_service_profiles"); @@ -129,6 +139,8 @@ public final class OauthScope { public static final OauthScope CREATE_ROLES = new OauthScope(Value.CREATE_ROLES, "create:roles"); + public static final OauthScope CREATE_PORTALS = new OauthScope(Value.CREATE_PORTALS, "create:portals"); + public static final OauthScope CREATE_SIGNING_KEYS = new OauthScope(Value.CREATE_SIGNING_KEYS, "create:signing_keys"); @@ -153,6 +165,12 @@ public final class OauthScope { public static final OauthScope DELETE_ORGANIZATION_INVITATIONS = new OauthScope(Value.DELETE_ORGANIZATION_INVITATIONS, "delete:organization_invitations"); + public static final OauthScope DELETE_CLIENT_PROFILES = + new OauthScope(Value.DELETE_CLIENT_PROFILES, "delete:client_profiles"); + + 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"); @@ -177,6 +195,9 @@ public final class OauthScope { public static final OauthScope READ_ORGANIZATION_DISCOVERY_DOMAINS = new OauthScope(Value.READ_ORGANIZATION_DISCOVERY_DOMAINS, "read:organization_discovery_domains"); + public static final OauthScope UPDATE_ORGANIZATION_CLIENTS = + new OauthScope(Value.UPDATE_ORGANIZATION_CLIENTS, "update:organization_clients"); + public static final OauthScope DELETE_DIRECTORY_PROVISIONINGS = new OauthScope(Value.DELETE_DIRECTORY_PROVISIONINGS, "delete:directory_provisionings"); @@ -227,6 +248,9 @@ public final class OauthScope { public static final OauthScope CREATE_ENCRYPTION_KEYS = new OauthScope(Value.CREATE_ENCRYPTION_KEYS, "create:encryption_keys"); + public static final OauthScope UPDATE_CLIENT_PROFILES = + new OauthScope(Value.UPDATE_CLIENT_PROFILES, "update:client_profiles"); + public static final OauthScope UPDATE_CURRENT_USER_IDENTITIES = new OauthScope(Value.UPDATE_CURRENT_USER_IDENTITIES, "update:current_user_identities"); @@ -241,6 +265,11 @@ public final class OauthScope { public static final OauthScope UPDATE_ORGANIZATION_DISCOVERY_DOMAINS = new OauthScope(Value.UPDATE_ORGANIZATION_DISCOVERY_DOMAINS, "update:organization_discovery_domains"); + public static final OauthScope UPDATE_AGENTS = new OauthScope(Value.UPDATE_AGENTS, "update:agents"); + + public static final OauthScope DELETE_EXPERIMENTATION = + new OauthScope(Value.DELETE_EXPERIMENTATION, "delete:experimentation"); + public static final OauthScope READ_ANOMALY_BLOCKS = new OauthScope(Value.READ_ANOMALY_BLOCKS, "read:anomaly_blocks"); @@ -293,6 +322,8 @@ public final class OauthScope { public static final OauthScope READ_GROUP_ROLES = new OauthScope(Value.READ_GROUP_ROLES, "read:group_roles"); + public static final OauthScope READ_AGENTS = new OauthScope(Value.READ_AGENTS, "read:agents"); + public static final OauthScope READ_GRANTS = new OauthScope(Value.READ_GRANTS, "read:grants"); public static final OauthScope UPDATE_SIGNING_KEYS = @@ -374,15 +405,15 @@ public final class OauthScope { public static final OauthScope UPDATE_SESSIONS = new OauthScope(Value.UPDATE_SESSIONS, "update:sessions"); + public static final OauthScope READ_CLIENT_PROFILES = + new OauthScope(Value.READ_CLIENT_PROFILES, "read:client_profiles"); + public static final OauthScope CREATE_HOOKS = new OauthScope(Value.CREATE_HOOKS, "create:hooks"); public static final OauthScope READ_CLIENT_KEYS = new OauthScope(Value.READ_CLIENT_KEYS, "read:client_keys"); public static final OauthScope CREATE_LOG_STREAMS = new OauthScope(Value.CREATE_LOG_STREAMS, "create:log_streams"); - public static final OauthScope READ_FEDERATED_CONNECTIONS_TOKENS = - new OauthScope(Value.READ_FEDERATED_CONNECTIONS_TOKENS, "read:federated_connections_tokens"); - public static final OauthScope DELETE_ORGANIZATION_MEMBERS = new OauthScope(Value.DELETE_ORGANIZATION_MEMBERS, "delete:organization_members"); @@ -411,9 +442,17 @@ public final class OauthScope { public static final OauthScope READ_FLOWS_VAULT_CONNECTIONS = new OauthScope(Value.READ_FLOWS_VAULT_CONNECTIONS, "read:flows_vault_connections"); + public static final OauthScope CREATE_CLIENT_PROFILES = + new OauthScope(Value.CREATE_CLIENT_PROFILES, "create:client_profiles"); + + public static final OauthScope CREATE_AGENTS = new OauthScope(Value.CREATE_AGENTS, "create:agents"); + public static final OauthScope UPDATE_ENCRYPTION_KEYS = new OauthScope(Value.UPDATE_ENCRYPTION_KEYS, "update:encryption_keys"); + public static final OauthScope READ_ORGANIZATION_CLIENTS = + new OauthScope(Value.READ_ORGANIZATION_CLIENTS, "read:organization_clients"); + public static final OauthScope UPDATE_CLIENT_KEYS = new OauthScope(Value.UPDATE_CLIENT_KEYS, "update:client_keys"); public static final OauthScope DELETE_GUARDIAN_ENROLLMENTS = @@ -425,6 +464,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"); @@ -454,6 +496,9 @@ public final class OauthScope { public static final OauthScope READ_ORGANIZATIONS = new OauthScope(Value.READ_ORGANIZATIONS, "read:organizations"); + public static final OauthScope CREATE_ORGANIZATION_CLIENTS = + new OauthScope(Value.CREATE_ORGANIZATION_CLIENTS, "create:organization_clients"); + public static final OauthScope READ_CUSTOM_DOMAINS = new OauthScope(Value.READ_CUSTOM_DOMAINS, "read:custom_domains"); @@ -486,6 +531,9 @@ public final class OauthScope { public static final OauthScope DELETE_CURRENT_USER_DEVICE_CREDENTIALS = new OauthScope(Value.DELETE_CURRENT_USER_DEVICE_CREDENTIALS, "delete:current_user_device_credentials"); + public static final OauthScope CREATE_EXPERIMENTATION = + new OauthScope(Value.CREATE_EXPERIMENTATION, "create:experimentation"); + public static final OauthScope READ_EVENT_STREAMS = new OauthScope(Value.READ_EVENT_STREAMS, "read:event_streams"); public static final OauthScope CREATE_ORGANIZATION_GROUP_ROLES = @@ -508,8 +556,13 @@ public final class OauthScope { public static final OauthScope READ_ORGANIZATION_CONNECTIONS = new OauthScope(Value.READ_ORGANIZATION_CONNECTIONS, "read:organization_connections"); + public static final OauthScope DELETE_ORGANIZATION_CLIENTS = + new OauthScope(Value.DELETE_ORGANIZATION_CLIENTS, "delete:organization_clients"); + public static final OauthScope CREATE_CONNECTIONS = new OauthScope(Value.CREATE_CONNECTIONS, "create:connections"); + public static final OauthScope UPDATE_PORTALS = new OauthScope(Value.UPDATE_PORTALS, "update:portals"); + public static final OauthScope DELETE_DEVICE_CREDENTIALS = new OauthScope(Value.DELETE_DEVICE_CREDENTIALS, "delete:device_credentials"); @@ -557,6 +610,8 @@ public final class OauthScope { public static final OauthScope READ_PROMPTS = new OauthScope(Value.READ_PROMPTS, "read:prompts"); + public static final OauthScope DELETE_PORTALS = new OauthScope(Value.DELETE_PORTALS, "delete:portals"); + public static final OauthScope UPDATE_USERS_APP_METADATA = new OauthScope(Value.UPDATE_USERS_APP_METADATA, "update:users_app_metadata"); @@ -674,6 +729,8 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case UPDATE_EXPERIMENTATION: + return visitor.visitUpdateExperimentation(); case DELETE_ACTIONS: return visitor.visitDeleteActions(); case READ_CONNECTIONS_KEYS: @@ -686,12 +743,16 @@ public T visit(Visitor visitor) { return visitor.visitReadOrganizationMemberEffectiveRoles(); case DELETE_ROLE_MEMBERS: return visitor.visitDeleteRoleMembers(); + case READ_EXPERIMENTATION: + return visitor.visitReadExperimentation(); case CREATE_CLIENT_GRANTS: return visitor.visitCreateClientGrants(); case UPDATE_TOKEN_EXCHANGE_PROFILES: return visitor.visitUpdateTokenExchangeProfiles(); case READ_CURRENT_USER: return visitor.visitReadCurrentUser(); + case DELETE_AGENTS: + return visitor.visitDeleteAgents(); case READ_SCIM_TOKEN: return visitor.visitReadScimToken(); case UPDATE_ROLES: @@ -706,6 +767,8 @@ public T visit(Visitor visitor) { return visitor.visitDeleteOrganizationGroupRoles(); case DELETE_ORGANIZATIONS: return visitor.visitDeleteOrganizations(); + case DELETE_NETWORK_ACL_KEYS: + return visitor.visitDeleteNetworkAclKeys(); case READ_USER_EFFECTIVE_ROLES: return visitor.visitReadUserEffectiveRoles(); case CREATE_ORGANIZATION_MEMBER_ROLES: @@ -726,6 +789,8 @@ public T visit(Visitor visitor) { return visitor.visitReadRefreshTokens(); case CREATE_SSO_ACCESS_TICKETS: return visitor.visitCreateSsoAccessTickets(); + case READ_PORTALS: + return visitor.visitReadPortals(); case UPDATE_EMAIL_TEMPLATES: return visitor.visitUpdateEmailTemplates(); case CREATE_USERS: @@ -738,8 +803,6 @@ public T visit(Visitor visitor) { return visitor.visitDeleteOrganizationConnections(); case READ_ROLE_MEMBERS: return visitor.visitReadRoleMembers(); - case DELETE_FEDERATED_CONNECTIONS_TOKENS: - return visitor.visitDeleteFederatedConnectionsTokens(); case READ_SELF_SERVICE_PROFILES: return visitor.visitReadSelfServiceProfiles(); case CREATE_ORGANIZATION_DISCOVERY_DOMAINS: @@ -766,6 +829,8 @@ public T visit(Visitor visitor) { return visitor.visitUpdateSelfServiceProfiles(); case CREATE_ROLES: return visitor.visitCreateRoles(); + case CREATE_PORTALS: + return visitor.visitCreatePortals(); case CREATE_SIGNING_KEYS: return visitor.visitCreateSigningKeys(); case UPDATE_EVENT_STREAMS: @@ -784,6 +849,10 @@ public T visit(Visitor visitor) { return visitor.visitDeleteClientCredentials(); case DELETE_ORGANIZATION_INVITATIONS: return visitor.visitDeleteOrganizationInvitations(); + case DELETE_CLIENT_PROFILES: + return visitor.visitDeleteClientProfiles(); + case READ_NETWORK_ACL_KEYS: + return visitor.visitReadNetworkAclKeys(); case CREATE_ORGANIZATION_CLIENT_GRANTS: return visitor.visitCreateOrganizationClientGrants(); case READ_USER_IDP_TOKENS: @@ -800,6 +869,8 @@ public T visit(Visitor visitor) { return visitor.visitCreateCustomDomains(); case READ_ORGANIZATION_DISCOVERY_DOMAINS: return visitor.visitReadOrganizationDiscoveryDomains(); + case UPDATE_ORGANIZATION_CLIENTS: + return visitor.visitUpdateOrganizationClients(); case DELETE_DIRECTORY_PROVISIONINGS: return visitor.visitDeleteDirectoryProvisionings(); case READ_CLIENT_CREDENTIALS: @@ -838,6 +909,8 @@ public T visit(Visitor visitor) { return visitor.visitReadDeviceCredentials(); case CREATE_ENCRYPTION_KEYS: return visitor.visitCreateEncryptionKeys(); + case UPDATE_CLIENT_PROFILES: + return visitor.visitUpdateClientProfiles(); case UPDATE_CURRENT_USER_IDENTITIES: return visitor.visitUpdateCurrentUserIdentities(); case DELETE_FORMS: @@ -848,6 +921,10 @@ public T visit(Visitor visitor) { return visitor.visitReadUserEffectivePermissions(); case UPDATE_ORGANIZATION_DISCOVERY_DOMAINS: return visitor.visitUpdateOrganizationDiscoveryDomains(); + case UPDATE_AGENTS: + return visitor.visitUpdateAgents(); + case DELETE_EXPERIMENTATION: + return visitor.visitDeleteExperimentation(); case READ_ANOMALY_BLOCKS: return visitor.visitReadAnomalyBlocks(); case UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS: @@ -888,6 +965,8 @@ public T visit(Visitor visitor) { return visitor.visitUpdateUsers(); case READ_GROUP_ROLES: return visitor.visitReadGroupRoles(); + case READ_AGENTS: + return visitor.visitReadAgents(); case READ_GRANTS: return visitor.visitReadGrants(); case UPDATE_SIGNING_KEYS: @@ -950,14 +1029,14 @@ public T visit(Visitor visitor) { return visitor.visitUpdateNetworkAcls(); case UPDATE_SESSIONS: return visitor.visitUpdateSessions(); + case READ_CLIENT_PROFILES: + return visitor.visitReadClientProfiles(); case CREATE_HOOKS: return visitor.visitCreateHooks(); case READ_CLIENT_KEYS: return visitor.visitReadClientKeys(); case CREATE_LOG_STREAMS: return visitor.visitCreateLogStreams(); - case READ_FEDERATED_CONNECTIONS_TOKENS: - return visitor.visitReadFederatedConnectionsTokens(); case DELETE_ORGANIZATION_MEMBERS: return visitor.visitDeleteOrganizationMembers(); case READ_ORGANIZATION_MEMBER_ROLES: @@ -980,8 +1059,14 @@ public T visit(Visitor visitor) { return visitor.visitDeleteUserAttributeProfiles(); case READ_FLOWS_VAULT_CONNECTIONS: return visitor.visitReadFlowsVaultConnections(); + case CREATE_CLIENT_PROFILES: + return visitor.visitCreateClientProfiles(); + case CREATE_AGENTS: + return visitor.visitCreateAgents(); case UPDATE_ENCRYPTION_KEYS: return visitor.visitUpdateEncryptionKeys(); + case READ_ORGANIZATION_CLIENTS: + return visitor.visitReadOrganizationClients(); case UPDATE_CLIENT_KEYS: return visitor.visitUpdateClientKeys(); case DELETE_GUARDIAN_ENROLLMENTS: @@ -990,6 +1075,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: @@ -1010,6 +1097,8 @@ public T visit(Visitor visitor) { return visitor.visitUpdateVdcsTemplates(); case READ_ORGANIZATIONS: return visitor.visitReadOrganizations(); + case CREATE_ORGANIZATION_CLIENTS: + return visitor.visitCreateOrganizationClients(); case READ_CUSTOM_DOMAINS: return visitor.visitReadCustomDomains(); case CREATE_SCIM_CONFIG: @@ -1034,6 +1123,8 @@ public T visit(Visitor visitor) { return visitor.visitUpdateLogStreams(); case DELETE_CURRENT_USER_DEVICE_CREDENTIALS: return visitor.visitDeleteCurrentUserDeviceCredentials(); + case CREATE_EXPERIMENTATION: + return visitor.visitCreateExperimentation(); case READ_EVENT_STREAMS: return visitor.visitReadEventStreams(); case CREATE_ORGANIZATION_GROUP_ROLES: @@ -1050,8 +1141,12 @@ public T visit(Visitor visitor) { return visitor.visitReadAttackProtection(); case READ_ORGANIZATION_CONNECTIONS: return visitor.visitReadOrganizationConnections(); + case DELETE_ORGANIZATION_CLIENTS: + return visitor.visitDeleteOrganizationClients(); case CREATE_CONNECTIONS: return visitor.visitCreateConnections(); + case UPDATE_PORTALS: + return visitor.visitUpdatePortals(); case DELETE_DEVICE_CREDENTIALS: return visitor.visitDeleteDeviceCredentials(); case READ_RULES: @@ -1088,6 +1183,8 @@ public T visit(Visitor visitor) { return visitor.visitUpdateConnectionProfiles(); case READ_PROMPTS: return visitor.visitReadPrompts(); + case DELETE_PORTALS: + return visitor.visitDeletePortals(); case UPDATE_USERS_APP_METADATA: return visitor.visitUpdateUsersAppMetadata(); case DELETE_NETWORK_ACLS: @@ -1159,6 +1256,8 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static OauthScope valueOf(String value) { switch (value) { + case "update:experimentation": + return UPDATE_EXPERIMENTATION; case "delete:actions": return DELETE_ACTIONS; case "read:connections_keys": @@ -1171,12 +1270,16 @@ public static OauthScope valueOf(String value) { return READ_ORGANIZATION_MEMBER_EFFECTIVE_ROLES; case "delete:role_members": return DELETE_ROLE_MEMBERS; + case "read:experimentation": + return READ_EXPERIMENTATION; case "create:client_grants": return CREATE_CLIENT_GRANTS; case "update:token_exchange_profiles": return UPDATE_TOKEN_EXCHANGE_PROFILES; case "read:current_user": return READ_CURRENT_USER; + case "delete:agents": + return DELETE_AGENTS; case "read:scim_token": return READ_SCIM_TOKEN; case "update:roles": @@ -1191,6 +1294,8 @@ public static OauthScope valueOf(String value) { return DELETE_ORGANIZATION_GROUP_ROLES; case "delete:organizations": return DELETE_ORGANIZATIONS; + case "delete:network_acl_keys": + return DELETE_NETWORK_ACL_KEYS; case "read:user_effective_roles": return READ_USER_EFFECTIVE_ROLES; case "create:organization_member_roles": @@ -1211,6 +1316,8 @@ public static OauthScope valueOf(String value) { return READ_REFRESH_TOKENS; case "create:sso_access_tickets": return CREATE_SSO_ACCESS_TICKETS; + case "read:portals": + return READ_PORTALS; case "update:email_templates": return UPDATE_EMAIL_TEMPLATES; case "create:users": @@ -1223,8 +1330,6 @@ public static OauthScope valueOf(String value) { return DELETE_ORGANIZATION_CONNECTIONS; case "read:role_members": return READ_ROLE_MEMBERS; - case "delete:federated_connections_tokens": - return DELETE_FEDERATED_CONNECTIONS_TOKENS; case "read:self_service_profiles": return READ_SELF_SERVICE_PROFILES; case "create:organization_discovery_domains": @@ -1251,6 +1356,8 @@ public static OauthScope valueOf(String value) { return UPDATE_SELF_SERVICE_PROFILES; case "create:roles": return CREATE_ROLES; + case "create:portals": + return CREATE_PORTALS; case "create:signing_keys": return CREATE_SIGNING_KEYS; case "update:event_streams": @@ -1269,6 +1376,10 @@ public static OauthScope valueOf(String value) { return DELETE_CLIENT_CREDENTIALS; case "delete:organization_invitations": return DELETE_ORGANIZATION_INVITATIONS; + case "delete:client_profiles": + return DELETE_CLIENT_PROFILES; + 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": @@ -1285,6 +1396,8 @@ public static OauthScope valueOf(String value) { return CREATE_CUSTOM_DOMAINS; case "read:organization_discovery_domains": return READ_ORGANIZATION_DISCOVERY_DOMAINS; + case "update:organization_clients": + return UPDATE_ORGANIZATION_CLIENTS; case "delete:directory_provisionings": return DELETE_DIRECTORY_PROVISIONINGS; case "read:client_credentials": @@ -1323,6 +1436,8 @@ public static OauthScope valueOf(String value) { return READ_DEVICE_CREDENTIALS; case "create:encryption_keys": return CREATE_ENCRYPTION_KEYS; + case "update:client_profiles": + return UPDATE_CLIENT_PROFILES; case "update:current_user_identities": return UPDATE_CURRENT_USER_IDENTITIES; case "delete:forms": @@ -1333,6 +1448,10 @@ public static OauthScope valueOf(String value) { return READ_USER_EFFECTIVE_PERMISSIONS; case "update:organization_discovery_domains": return UPDATE_ORGANIZATION_DISCOVERY_DOMAINS; + case "update:agents": + return UPDATE_AGENTS; + case "delete:experimentation": + return DELETE_EXPERIMENTATION; case "read:anomaly_blocks": return READ_ANOMALY_BLOCKS; case "update:client_token_vault_privileged_access": @@ -1373,6 +1492,8 @@ public static OauthScope valueOf(String value) { return UPDATE_USERS; case "read:group_roles": return READ_GROUP_ROLES; + case "read:agents": + return READ_AGENTS; case "read:grants": return READ_GRANTS; case "update:signing_keys": @@ -1435,14 +1556,14 @@ public static OauthScope valueOf(String value) { return UPDATE_NETWORK_ACLS; case "update:sessions": return UPDATE_SESSIONS; + case "read:client_profiles": + return READ_CLIENT_PROFILES; case "create:hooks": return CREATE_HOOKS; case "read:client_keys": return READ_CLIENT_KEYS; case "create:log_streams": return CREATE_LOG_STREAMS; - case "read:federated_connections_tokens": - return READ_FEDERATED_CONNECTIONS_TOKENS; case "delete:organization_members": return DELETE_ORGANIZATION_MEMBERS; case "read:organization_member_roles": @@ -1465,8 +1586,14 @@ public static OauthScope valueOf(String value) { return DELETE_USER_ATTRIBUTE_PROFILES; case "read:flows_vault_connections": return READ_FLOWS_VAULT_CONNECTIONS; + case "create:client_profiles": + return CREATE_CLIENT_PROFILES; + case "create:agents": + return CREATE_AGENTS; case "update:encryption_keys": return UPDATE_ENCRYPTION_KEYS; + case "read:organization_clients": + return READ_ORGANIZATION_CLIENTS; case "update:client_keys": return UPDATE_CLIENT_KEYS; case "delete:guardian_enrollments": @@ -1475,6 +1602,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": @@ -1495,6 +1624,8 @@ public static OauthScope valueOf(String value) { return UPDATE_VDCS_TEMPLATES; case "read:organizations": return READ_ORGANIZATIONS; + case "create:organization_clients": + return CREATE_ORGANIZATION_CLIENTS; case "read:custom_domains": return READ_CUSTOM_DOMAINS; case "create:scim_config": @@ -1519,6 +1650,8 @@ public static OauthScope valueOf(String value) { return UPDATE_LOG_STREAMS; case "delete:current_user_device_credentials": return DELETE_CURRENT_USER_DEVICE_CREDENTIALS; + case "create:experimentation": + return CREATE_EXPERIMENTATION; case "read:event_streams": return READ_EVENT_STREAMS; case "create:organization_group_roles": @@ -1535,8 +1668,12 @@ public static OauthScope valueOf(String value) { return READ_ATTACK_PROTECTION; case "read:organization_connections": return READ_ORGANIZATION_CONNECTIONS; + case "delete:organization_clients": + return DELETE_ORGANIZATION_CLIENTS; case "create:connections": return CREATE_CONNECTIONS; + case "update:portals": + return UPDATE_PORTALS; case "delete:device_credentials": return DELETE_DEVICE_CREDENTIALS; case "read:rules": @@ -1573,6 +1710,8 @@ public static OauthScope valueOf(String value) { return UPDATE_CONNECTION_PROFILES; case "read:prompts": return READ_PROMPTS; + case "delete:portals": + return DELETE_PORTALS; case "update:users_app_metadata": return UPDATE_USERS_APP_METADATA; case "delete:network_acls": @@ -1649,6 +1788,14 @@ public enum Value { DELETE_ACTIONS, + CREATE_AGENTS, + + READ_AGENTS, + + UPDATE_AGENTS, + + DELETE_AGENTS, + READ_ANOMALY_BLOCKS, DELETE_ANOMALY_BLOCKS, @@ -1801,9 +1948,13 @@ public enum Value { READ_EVENTS, - READ_FEDERATED_CONNECTIONS_TOKENS, + CREATE_EXPERIMENTATION, + + READ_EXPERIMENTATION, - DELETE_FEDERATED_CONNECTIONS_TOKENS, + UPDATE_EXPERIMENTATION, + + DELETE_EXPERIMENTATION, CREATE_FLOWS, @@ -2117,6 +2268,36 @@ public enum Value { DELETE_VDCS_TEMPLATES, + CREATE_CLIENT_PROFILES, + + READ_CLIENT_PROFILES, + + UPDATE_CLIENT_PROFILES, + + DELETE_CLIENT_PROFILES, + + CREATE_ORGANIZATION_CLIENTS, + + READ_ORGANIZATION_CLIENTS, + + UPDATE_ORGANIZATION_CLIENTS, + + DELETE_ORGANIZATION_CLIENTS, + + CREATE_PORTALS, + + READ_PORTALS, + + UPDATE_PORTALS, + + DELETE_PORTALS, + + CREATE_NETWORK_ACL_KEYS, + + READ_NETWORK_ACL_KEYS, + + DELETE_NETWORK_ACL_KEYS, + UNKNOWN } @@ -2129,6 +2310,14 @@ public interface Visitor { T visitDeleteActions(); + T visitCreateAgents(); + + T visitReadAgents(); + + T visitUpdateAgents(); + + T visitDeleteAgents(); + T visitReadAnomalyBlocks(); T visitDeleteAnomalyBlocks(); @@ -2281,9 +2470,13 @@ public interface Visitor { T visitReadEvents(); - T visitReadFederatedConnectionsTokens(); + T visitCreateExperimentation(); + + T visitReadExperimentation(); - T visitDeleteFederatedConnectionsTokens(); + T visitUpdateExperimentation(); + + T visitDeleteExperimentation(); T visitCreateFlows(); @@ -2597,6 +2790,36 @@ public interface Visitor { T visitDeleteVdcsTemplates(); + T visitCreateClientProfiles(); + + T visitReadClientProfiles(); + + T visitUpdateClientProfiles(); + + T visitDeleteClientProfiles(); + + T visitCreateOrganizationClients(); + + T visitReadOrganizationClients(); + + T visitUpdateOrganizationClients(); + + T visitDeleteOrganizationClients(); + + T visitCreatePortals(); + + T visitReadPortals(); + + T visitUpdatePortals(); + + T visitDeletePortals(); + + T visitCreateNetworkAclKeys(); + + T visitReadNetworkAclKeys(); + + T visitDeleteNetworkAclKeys(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/Organization.java b/src/main/java/com/auth0/client/mgmt/types/Organization.java index d72df1ae..cd660990 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Organization.java +++ b/src/main/java/com/auth0/client/mgmt/types/Organization.java @@ -33,6 +33,12 @@ public final class Organization { private final Optional tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + + private final Optional client; + private final Map additionalProperties; private Organization( @@ -42,6 +48,9 @@ private Organization( Optional branding, Optional>> metadata, Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, + Optional client, Map additionalProperties) { this.id = id; this.name = name; @@ -49,6 +58,9 @@ private Organization( this.branding = branding; this.metadata = metadata; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; + this.client = client; this.additionalProperties = additionalProperties; } @@ -91,6 +103,24 @@ public Optional getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -108,12 +138,24 @@ private boolean equalTo(Organization other) { && displayName.equals(other.displayName) && branding.equals(other.branding) && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive) + && client.equals(other.client); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); + return Objects.hash( + this.id, + this.name, + this.displayName, + this.branding, + this.metadata, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive, + this.client); } @java.lang.Override @@ -139,6 +181,12 @@ public static final class Builder { private Optional tokenQuota = Optional.empty(); + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + + private Optional client = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -151,6 +199,9 @@ public Builder from(Organization other) { branding(other.getBranding()); metadata(other.getMetadata()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); + client(other.getClient()); return this; } @@ -229,8 +280,54 @@ public Builder tokenQuota(TokenQuota tokenQuota) { return this; } + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public Builder client(Optional client) { + this.client = client; + return this; + } + + public Builder client(OrganizationClientAssociation client) { + this.client = Optional.ofNullable(client); + return this; + } + public Organization build() { - return new Organization(id, name, displayName, branding, metadata, tokenQuota, additionalProperties); + return new Organization( + id, + name, + displayName, + branding, + metadata, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + client, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java index 14de55ca..80222162 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationAllConnectionPost.java @@ -31,6 +31,8 @@ public final class OrganizationAllConnectionPost { private final Optional organizationAccessLevel; + private final Optional organizationMemberAccessLevel; + private final Optional isEnabled; private final String connectionId; @@ -45,6 +47,7 @@ private OrganizationAllConnectionPost( Optional showAsButton, Optional isSignupEnabled, Optional organizationAccessLevel, + Optional organizationMemberAccessLevel, Optional isEnabled, String connectionId, Optional connection, @@ -54,6 +57,7 @@ private OrganizationAllConnectionPost( this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.isEnabled = isEnabled; this.connectionId = connectionId; this.connection = connection; @@ -97,6 +101,11 @@ public Optional getOrganizationAccessLevel() { return organizationAccessLevel; } + @JsonProperty("organization_member_access_level") + public Optional getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + /** * @return Whether the connection is enabled for the organization. */ @@ -135,6 +144,7 @@ private boolean equalTo(OrganizationAllConnectionPost other) { && showAsButton.equals(other.showAsButton) && isSignupEnabled.equals(other.isSignupEnabled) && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel) && isEnabled.equals(other.isEnabled) && connectionId.equals(other.connectionId) && connection.equals(other.connection); @@ -148,6 +158,7 @@ public int hashCode() { this.showAsButton, this.isSignupEnabled, this.organizationAccessLevel, + this.organizationMemberAccessLevel, this.isEnabled, this.connectionId, this.connection); @@ -210,6 +221,11 @@ public interface _FinalStage { _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel(OrganizationMemberAccessLevelEnum organizationMemberAccessLevel); + /** *

                                                              Whether the connection is enabled for the organization.

                                                              */ @@ -230,6 +246,8 @@ public static final class Builder implements ConnectionIdStage, _FinalStage { private Optional isEnabled = Optional.empty(); + private Optional organizationMemberAccessLevel = Optional.empty(); + private Optional organizationAccessLevel = Optional.empty(); private Optional isSignupEnabled = Optional.empty(); @@ -252,6 +270,7 @@ public Builder from(OrganizationAllConnectionPost other) { showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); isEnabled(other.getIsEnabled()); connectionId(other.getConnectionId()); connection(other.getConnection()); @@ -259,7 +278,6 @@ public Builder from(OrganizationAllConnectionPost other) { } /** - *

                                                              Connection identifier.

                                                              *

                                                              Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -303,6 +321,21 @@ public _FinalStage isEnabled(Optional isEnabled) { return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + OrganizationMemberAccessLevelEnum organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + @java.lang.Override public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); @@ -404,6 +437,7 @@ public OrganizationAllConnectionPost build() { showAsButton, isSignupEnabled, organizationAccessLevel, + organizationMemberAccessLevel, isEnabled, connectionId, connection, diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java index 2a995e87..ca814a67 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java @@ -120,7 +120,6 @@ public Builder from(OrganizationBrandingColors other) { } /** - *

                                                              HEX Color for primary elements.

                                                              *

                                                              HEX Color for primary elements.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,7 +131,6 @@ public PageBackgroundStage primary(@NotNull String primary) { } /** - *

                                                              HEX Color for background.

                                                              *

                                                              HEX Color for background.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationClient.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationClient.java new file mode 100644 index 00000000..1d894555 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationClient.java @@ -0,0 +1,188 @@ +/** + * 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 = OrganizationClient.Builder.class) +public final class OrganizationClient { + private final String clientId; + + private final boolean useForMemberAccess; + + private final OrganizationClientMetadata client; + + private final Map additionalProperties; + + private OrganizationClient( + String clientId, + boolean useForMemberAccess, + OrganizationClientMetadata client, + Map additionalProperties) { + this.clientId = clientId; + this.useForMemberAccess = useForMemberAccess; + this.client = client; + this.additionalProperties = additionalProperties; + } + + /** + * @return The identifier of the client associated with the organization. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Whether this client is used for member access to the organization. + */ + @JsonProperty("use_for_member_access") + public boolean getUseForMemberAccess() { + return useForMemberAccess; + } + + @JsonProperty("client") + public OrganizationClientMetadata getClient() { + return client; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationClient && equalTo((OrganizationClient) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OrganizationClient other) { + return clientId.equals(other.clientId) + && useForMemberAccess == other.useForMemberAccess + && client.equals(other.client); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientId, this.useForMemberAccess, this.client); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              The identifier of the client associated with the organization.

                                                              + */ + UseForMemberAccessStage clientId(@NotNull String clientId); + + Builder from(OrganizationClient other); + } + + public interface UseForMemberAccessStage { + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + */ + ClientStage useForMemberAccess(boolean useForMemberAccess); + } + + public interface ClientStage { + _FinalStage client(@NotNull OrganizationClientMetadata client); + } + + public interface _FinalStage { + OrganizationClient build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, UseForMemberAccessStage, ClientStage, _FinalStage { + private String clientId; + + private boolean useForMemberAccess; + + private OrganizationClientMetadata client; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OrganizationClient other) { + clientId(other.getClientId()); + useForMemberAccess(other.getUseForMemberAccess()); + client(other.getClient()); + return this; + } + + /** + *

                                                              The identifier of the client associated with the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public UseForMemberAccessStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("use_for_member_access") + public ClientStage useForMemberAccess(boolean useForMemberAccess) { + this.useForMemberAccess = useForMemberAccess; + return this; + } + + @java.lang.Override + @JsonSetter("client") + public _FinalStage client(@NotNull OrganizationClientMetadata client) { + this.client = Objects.requireNonNull(client, "client must not be null"); + return this; + } + + @java.lang.Override + public OrganizationClient build() { + return new OrganizationClient(clientId, useForMemberAccess, client, 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/OrganizationClientAssociation.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientAssociation.java new file mode 100644 index 00000000..c5d1c142 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientAssociation.java @@ -0,0 +1,112 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OrganizationClientAssociation.Builder.class) +public final class OrganizationClientAssociation { + private final Optional useForMemberAccess; + + private final Map additionalProperties; + + private OrganizationClientAssociation( + Optional useForMemberAccess, Map additionalProperties) { + this.useForMemberAccess = useForMemberAccess; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether this client is used for member access to the organization. + */ + @JsonProperty("use_for_member_access") + public Optional getUseForMemberAccess() { + return useForMemberAccess; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationClientAssociation && equalTo((OrganizationClientAssociation) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OrganizationClientAssociation other) { + return useForMemberAccess.equals(other.useForMemberAccess); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.useForMemberAccess); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional useForMemberAccess = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(OrganizationClientAssociation other) { + useForMemberAccess(other.getUseForMemberAccess()); + return this; + } + + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + */ + @JsonSetter(value = "use_for_member_access", nulls = Nulls.SKIP) + public Builder useForMemberAccess(Optional useForMemberAccess) { + this.useForMemberAccess = useForMemberAccess; + return this; + } + + public Builder useForMemberAccess(Boolean useForMemberAccess) { + this.useForMemberAccess = Optional.ofNullable(useForMemberAccess); + return this; + } + + public OrganizationClientAssociation build() { + return new OrganizationClientAssociation(useForMemberAccess, 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/OrganizationClientMetadata.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientMetadata.java new file mode 100644 index 00000000..5d734917 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientMetadata.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.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OrganizationClientMetadata.Builder.class) +public final class OrganizationClientMetadata { + private final Optional name; + + private final Optional appType; + + private final OptionalNullable logoUri; + + private final Optional isFirstParty; + + private final Optional> grantTypes; + + private final Optional organizationUsage; + + private final Map additionalProperties; + + private OrganizationClientMetadata( + Optional name, + Optional appType, + OptionalNullable logoUri, + Optional isFirstParty, + Optional> grantTypes, + Optional organizationUsage, + Map additionalProperties) { + this.name = name; + this.appType = appType; + this.logoUri = logoUri; + this.isFirstParty = isFirstParty; + this.grantTypes = grantTypes; + this.organizationUsage = organizationUsage; + this.additionalProperties = additionalProperties; + } + + /** + * @return The name of the client. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return The type of the client application. + */ + @JsonProperty("app_type") + public Optional getAppType() { + return appType; + } + + /** + * @return The URI of the client logo. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("logo_uri") + public OptionalNullable getLogoUri() { + if (logoUri == null) { + return OptionalNullable.absent(); + } + return logoUri; + } + + /** + * @return Whether this client is a first-party client (true) or not (false). + */ + @JsonProperty("is_first_party") + public Optional getIsFirstParty() { + return isFirstParty; + } + + /** + * @return The grant types enabled for the client. + */ + @JsonProperty("grant_types") + public Optional> getGrantTypes() { + return grantTypes; + } + + @JsonProperty("organization_usage") + public Optional getOrganizationUsage() { + return organizationUsage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("logo_uri") + private OptionalNullable _getLogoUri() { + return logoUri; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OrganizationClientMetadata && equalTo((OrganizationClientMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OrganizationClientMetadata other) { + return name.equals(other.name) + && appType.equals(other.appType) + && logoUri.equals(other.logoUri) + && isFirstParty.equals(other.isFirstParty) + && grantTypes.equals(other.grantTypes) + && organizationUsage.equals(other.organizationUsage); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.name, this.appType, this.logoUri, this.isFirstParty, this.grantTypes, this.organizationUsage); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private Optional appType = Optional.empty(); + + private OptionalNullable logoUri = OptionalNullable.absent(); + + private Optional isFirstParty = Optional.empty(); + + private Optional> grantTypes = Optional.empty(); + + private Optional organizationUsage = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(OrganizationClientMetadata other) { + name(other.getName()); + appType(other.getAppType()); + logoUri(other.getLogoUri()); + isFirstParty(other.getIsFirstParty()); + grantTypes(other.getGrantTypes()); + organizationUsage(other.getOrganizationUsage()); + return this; + } + + /** + *

                                                              The name of the client.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              The type of the client application.

                                                              + */ + @JsonSetter(value = "app_type", nulls = Nulls.SKIP) + public Builder appType(Optional appType) { + this.appType = appType; + return this; + } + + public Builder appType(String appType) { + this.appType = Optional.ofNullable(appType); + return this; + } + + /** + *

                                                              The URI of the client logo.

                                                              + */ + @JsonSetter(value = "logo_uri", nulls = Nulls.SKIP) + public Builder logoUri(@Nullable OptionalNullable logoUri) { + this.logoUri = logoUri; + return this; + } + + public Builder logoUri(String logoUri) { + this.logoUri = OptionalNullable.of(logoUri); + return this; + } + + public Builder logoUri(Optional logoUri) { + if (logoUri.isPresent()) { + this.logoUri = OptionalNullable.of(logoUri.get()); + } else { + this.logoUri = OptionalNullable.absent(); + } + return this; + } + + public Builder logoUri(com.auth0.client.mgmt.core.Nullable logoUri) { + if (logoUri.isNull()) { + this.logoUri = OptionalNullable.ofNull(); + } else if (logoUri.isEmpty()) { + this.logoUri = OptionalNullable.absent(); + } else { + this.logoUri = OptionalNullable.of(logoUri.get()); + } + return this; + } + + /** + *

                                                              Whether this client is a first-party client (true) or not (false).

                                                              + */ + @JsonSetter(value = "is_first_party", nulls = Nulls.SKIP) + public Builder isFirstParty(Optional isFirstParty) { + this.isFirstParty = isFirstParty; + return this; + } + + public Builder isFirstParty(Boolean isFirstParty) { + this.isFirstParty = Optional.ofNullable(isFirstParty); + return this; + } + + /** + *

                                                              The grant types enabled for the client.

                                                              + */ + @JsonSetter(value = "grant_types", nulls = Nulls.SKIP) + public Builder grantTypes(Optional> grantTypes) { + this.grantTypes = grantTypes; + return this; + } + + public Builder grantTypes(List grantTypes) { + this.grantTypes = Optional.ofNullable(grantTypes); + return this; + } + + @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) + public Builder organizationUsage(Optional organizationUsage) { + this.organizationUsage = organizationUsage; + return this; + } + + public Builder organizationUsage(OrganizationClientMetadataOrganizationUsageEnum organizationUsage) { + this.organizationUsage = Optional.ofNullable(organizationUsage); + return this; + } + + public OrganizationClientMetadata build() { + return new OrganizationClientMetadata( + name, appType, logoUri, isFirstParty, grantTypes, organizationUsage, 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/OrganizationClientMetadataOrganizationUsageEnum.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientMetadataOrganizationUsageEnum.java new file mode 100644 index 00000000..8c11732f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientMetadataOrganizationUsageEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class OrganizationClientMetadataOrganizationUsageEnum { + public static final OrganizationClientMetadataOrganizationUsageEnum ALLOW = + new OrganizationClientMetadataOrganizationUsageEnum(Value.ALLOW, "allow"); + + public static final OrganizationClientMetadataOrganizationUsageEnum REQUIRE = + new OrganizationClientMetadataOrganizationUsageEnum(Value.REQUIRE, "require"); + + public static final OrganizationClientMetadataOrganizationUsageEnum DENY = + new OrganizationClientMetadataOrganizationUsageEnum(Value.DENY, "deny"); + + private final Value value; + + private final String string; + + OrganizationClientMetadataOrganizationUsageEnum(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 OrganizationClientMetadataOrganizationUsageEnum + && this.string.equals(((OrganizationClientMetadataOrganizationUsageEnum) 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 REQUIRE: + return visitor.visitRequire(); + case DENY: + return visitor.visitDeny(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationClientMetadataOrganizationUsageEnum valueOf(String value) { + switch (value) { + case "allow": + return ALLOW; + case "require": + return REQUIRE; + case "deny": + return DENY; + default: + return new OrganizationClientMetadataOrganizationUsageEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DENY, + + ALLOW, + + REQUIRE, + + UNKNOWN + } + + public interface Visitor { + T visitDeny(); + + T visitAllow(); + + T visitRequire(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java index ea1130c3..4f9a58de 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java @@ -218,7 +218,6 @@ public Builder from(OrganizationDiscoveryDomain other) { } /** - *

                                                              Organization discovery domain identifier.

                                                              *

                                                              Organization discovery domain identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -230,7 +229,6 @@ public DomainStage id(@NotNull String id) { } /** - *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -249,7 +247,6 @@ public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus st } /** - *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -261,7 +258,6 @@ public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { } /** - *

                                                              The full domain where the TXT record should be added.

                                                              *

                                                              The full domain where the TXT record should be added.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java index 2f2e6d30..3b74a2a4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java @@ -98,7 +98,6 @@ public Builder from(OrganizationInvitationInvitee other) { } /** - *

                                                              The invitee's email.

                                                              *

                                                              The invitee's email.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java index 443f5b4c..2fae7932 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java @@ -98,7 +98,6 @@ public Builder from(OrganizationInvitationInviter other) { } /** - *

                                                              The inviter's name.

                                                              *

                                                              The inviter's name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberAccessLevelEnum.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberAccessLevelEnum.java new file mode 100644 index 00000000..d66e1589 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberAccessLevelEnum.java @@ -0,0 +1,108 @@ +/** + * 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 OrganizationMemberAccessLevelEnum { + public static final OrganizationMemberAccessLevelEnum READONLY = + new OrganizationMemberAccessLevelEnum(Value.READONLY, "readonly"); + + public static final OrganizationMemberAccessLevelEnum FULL = + new OrganizationMemberAccessLevelEnum(Value.FULL, "full"); + + public static final OrganizationMemberAccessLevelEnum LIMITED = + new OrganizationMemberAccessLevelEnum(Value.LIMITED, "limited"); + + public static final OrganizationMemberAccessLevelEnum NONE = + new OrganizationMemberAccessLevelEnum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + OrganizationMemberAccessLevelEnum(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 OrganizationMemberAccessLevelEnum + && this.string.equals(((OrganizationMemberAccessLevelEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case FULL: + return visitor.visitFull(); + case LIMITED: + return visitor.visitLimited(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationMemberAccessLevelEnum valueOf(String value) { + switch (value) { + case "readonly": + return READONLY; + case "full": + return FULL; + case "limited": + return LIMITED; + case "none": + return NONE; + default: + return new OrganizationMemberAccessLevelEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + READONLY, + + LIMITED, + + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitReadonly(); + + T visitLimited(); + + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberAccessLevelEnumWithNull.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberAccessLevelEnumWithNull.java new file mode 100644 index 00000000..81f62ab8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberAccessLevelEnumWithNull.java @@ -0,0 +1,108 @@ +/** + * 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 OrganizationMemberAccessLevelEnumWithNull { + public static final OrganizationMemberAccessLevelEnumWithNull READONLY = + new OrganizationMemberAccessLevelEnumWithNull(Value.READONLY, "readonly"); + + public static final OrganizationMemberAccessLevelEnumWithNull FULL = + new OrganizationMemberAccessLevelEnumWithNull(Value.FULL, "full"); + + public static final OrganizationMemberAccessLevelEnumWithNull LIMITED = + new OrganizationMemberAccessLevelEnumWithNull(Value.LIMITED, "limited"); + + public static final OrganizationMemberAccessLevelEnumWithNull NONE = + new OrganizationMemberAccessLevelEnumWithNull(Value.NONE, "none"); + + private final Value value; + + private final String string; + + OrganizationMemberAccessLevelEnumWithNull(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 OrganizationMemberAccessLevelEnumWithNull + && this.string.equals(((OrganizationMemberAccessLevelEnumWithNull) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case READONLY: + return visitor.visitReadonly(); + case FULL: + return visitor.visitFull(); + case LIMITED: + return visitor.visitLimited(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationMemberAccessLevelEnumWithNull valueOf(String value) { + switch (value) { + case "readonly": + return READONLY; + case "full": + return FULL; + case "limited": + return LIMITED; + case "none": + return NONE; + default: + return new OrganizationMemberAccessLevelEnumWithNull(Value.UNKNOWN, value); + } + } + + public enum Value { + NONE, + + READONLY, + + LIMITED, + + FULL, + + UNKNOWN + } + + public interface Visitor { + T visitNone(); + + T visitReadonly(); + + T visitLimited(); + + T visitFull(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberEffectiveRole.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberEffectiveRole.java index a02296ce..0a35e16a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberEffectiveRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberEffectiveRole.java @@ -174,7 +174,6 @@ public Builder from(OrganizationMemberEffectiveRole other) { } /** - *

                                                              Role ID

                                                              *

                                                              Role ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -186,7 +185,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              Role name

                                                              *

                                                              Role name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -198,7 +196,6 @@ public DescriptionStage name(@NotNull String name) { } /** - *

                                                              Role description

                                                              *

                                                              Role description

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationSortFieldEnum.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationSortFieldEnum.java new file mode 100644 index 00000000..a66c0762 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationSortFieldEnum.java @@ -0,0 +1,96 @@ +/** + * 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 OrganizationSortFieldEnum { + public static final OrganizationSortFieldEnum DISPLAY_NAME = + new OrganizationSortFieldEnum(Value.DISPLAY_NAME, "display_name"); + + public static final OrganizationSortFieldEnum CREATED_AT = + new OrganizationSortFieldEnum(Value.CREATED_AT, "created_at"); + + public static final OrganizationSortFieldEnum NAME = new OrganizationSortFieldEnum(Value.NAME, "name"); + + private final Value value; + + private final String string; + + OrganizationSortFieldEnum(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 OrganizationSortFieldEnum + && this.string.equals(((OrganizationSortFieldEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case DISPLAY_NAME: + return visitor.visitDisplayName(); + case CREATED_AT: + return visitor.visitCreatedAt(); + case NAME: + return visitor.visitName(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationSortFieldEnum valueOf(String value) { + switch (value) { + case "display_name": + return DISPLAY_NAME; + case "created_at": + return CREATED_AT; + case "name": + return NAME; + default: + return new OrganizationSortFieldEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + NAME, + + DISPLAY_NAME, + + CREATED_AT, + + UNKNOWN + } + + public interface Visitor { + T visitName(); + + T visitDisplayName(); + + T visitCreatedAt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationThirdPartyClientAccessEnum.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationThirdPartyClientAccessEnum.java new file mode 100644 index 00000000..93140a9e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/OrganizationThirdPartyClientAccessEnum.java @@ -0,0 +1,86 @@ +/** + * 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 OrganizationThirdPartyClientAccessEnum { + public static final OrganizationThirdPartyClientAccessEnum BLOCK = + new OrganizationThirdPartyClientAccessEnum(Value.BLOCK, "block"); + + public static final OrganizationThirdPartyClientAccessEnum ALLOW = + new OrganizationThirdPartyClientAccessEnum(Value.ALLOW, "allow"); + + private final Value value; + + private final String string; + + OrganizationThirdPartyClientAccessEnum(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 OrganizationThirdPartyClientAccessEnum + && this.string.equals(((OrganizationThirdPartyClientAccessEnum) 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 ALLOW: + return visitor.visitAllow(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OrganizationThirdPartyClientAccessEnum valueOf(String value) { + switch (value) { + case "block": + return BLOCK; + case "allow": + return ALLOW; + default: + return new OrganizationThirdPartyClientAccessEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + BLOCK, + + ALLOW, + + UNKNOWN + } + + public interface Visitor { + T visitBlock(); + + T visitAllow(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PageComponent.java b/src/main/java/com/auth0/client/mgmt/types/PageComponent.java new file mode 100644 index 00000000..550da445 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponent.java @@ -0,0 +1,772 @@ +/** + * 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.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public final class PageComponent { + private final Value value; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private PageComponent(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static PageComponent pageComponentAuth0Form(PageComponentAuth0Form value) { + return new PageComponent(new PageComponentAuth0FormValue(value)); + } + + public static PageComponent pageComponentAuth0TypographyHeading(PageComponentAuth0TypographyHeading value) { + return new PageComponent(new PageComponentAuth0TypographyHeadingValue(value)); + } + + public static PageComponent pageComponentAuth0MediaImage(PageComponentAuth0MediaImage value) { + return new PageComponent(new PageComponentAuth0MediaImageValue(value)); + } + + public static PageComponent pageComponentAuth0TypographyRichText(PageComponentAuth0TypographyRichText value) { + return new PageComponent(new PageComponentAuth0TypographyRichTextValue(value)); + } + + public static PageComponent pageComponentAuth0StructureSection(PageComponentAuth0StructureSection value) { + return new PageComponent(new PageComponentAuth0StructureSectionValue(value)); + } + + public static PageComponent pageComponentAuth0StructureSeparator(PageComponentAuth0StructureSeparator value) { + return new PageComponent(new PageComponentAuth0StructureSeparatorValue(value)); + } + + public static PageComponent pageComponentAuth0MyOrganizationDomainTable( + PageComponentAuth0MyOrganizationDomainTable value) { + return new PageComponent(new PageComponentAuth0MyOrganizationDomainTableValue(value)); + } + + public static PageComponent pageComponentAuth0MyOrganizationMemberManagement( + PageComponentAuth0MyOrganizationMemberManagement value) { + return new PageComponent(new PageComponentAuth0MyOrganizationMemberManagementValue(value)); + } + + public static PageComponent pageComponentAuth0MyOrganizationDetailsEdit( + PageComponentAuth0MyOrganizationDetailsEdit value) { + return new PageComponent(new PageComponentAuth0MyOrganizationDetailsEditValue(value)); + } + + public static PageComponent pageComponentAuth0MyAccountPasskeyManagement( + PageComponentAuth0MyAccountPasskeyManagement value) { + return new PageComponent(new PageComponentAuth0MyAccountPasskeyManagementValue(value)); + } + + public static PageComponent pageComponentAuth0MyAccountMfaManagement( + PageComponentAuth0MyAccountMfaManagement value) { + return new PageComponent(new PageComponentAuth0MyAccountMfaManagementValue(value)); + } + + public boolean isPageComponentAuth0Form() { + return value instanceof PageComponentAuth0FormValue; + } + + public boolean isPageComponentAuth0TypographyHeading() { + return value instanceof PageComponentAuth0TypographyHeadingValue; + } + + public boolean isPageComponentAuth0MediaImage() { + return value instanceof PageComponentAuth0MediaImageValue; + } + + public boolean isPageComponentAuth0TypographyRichText() { + return value instanceof PageComponentAuth0TypographyRichTextValue; + } + + public boolean isPageComponentAuth0StructureSection() { + return value instanceof PageComponentAuth0StructureSectionValue; + } + + public boolean isPageComponentAuth0StructureSeparator() { + return value instanceof PageComponentAuth0StructureSeparatorValue; + } + + public boolean isPageComponentAuth0MyOrganizationDomainTable() { + return value instanceof PageComponentAuth0MyOrganizationDomainTableValue; + } + + public boolean isPageComponentAuth0MyOrganizationMemberManagement() { + return value instanceof PageComponentAuth0MyOrganizationMemberManagementValue; + } + + public boolean isPageComponentAuth0MyOrganizationDetailsEdit() { + return value instanceof PageComponentAuth0MyOrganizationDetailsEditValue; + } + + public boolean isPageComponentAuth0MyAccountPasskeyManagement() { + return value instanceof PageComponentAuth0MyAccountPasskeyManagementValue; + } + + public boolean isPageComponentAuth0MyAccountMfaManagement() { + return value instanceof PageComponentAuth0MyAccountMfaManagementValue; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getPageComponentAuth0Form() { + if (isPageComponentAuth0Form()) { + return Optional.of(((PageComponentAuth0FormValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0TypographyHeading() { + if (isPageComponentAuth0TypographyHeading()) { + return Optional.of(((PageComponentAuth0TypographyHeadingValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MediaImage() { + if (isPageComponentAuth0MediaImage()) { + return Optional.of(((PageComponentAuth0MediaImageValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0TypographyRichText() { + if (isPageComponentAuth0TypographyRichText()) { + return Optional.of(((PageComponentAuth0TypographyRichTextValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0StructureSection() { + if (isPageComponentAuth0StructureSection()) { + return Optional.of(((PageComponentAuth0StructureSectionValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0StructureSeparator() { + if (isPageComponentAuth0StructureSeparator()) { + return Optional.of(((PageComponentAuth0StructureSeparatorValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyOrganizationDomainTable() { + if (isPageComponentAuth0MyOrganizationDomainTable()) { + return Optional.of(((PageComponentAuth0MyOrganizationDomainTableValue) value).value); + } + return Optional.empty(); + } + + public Optional + getPageComponentAuth0MyOrganizationMemberManagement() { + if (isPageComponentAuth0MyOrganizationMemberManagement()) { + return Optional.of(((PageComponentAuth0MyOrganizationMemberManagementValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyOrganizationDetailsEdit() { + if (isPageComponentAuth0MyOrganizationDetailsEdit()) { + return Optional.of(((PageComponentAuth0MyOrganizationDetailsEditValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyAccountPasskeyManagement() { + if (isPageComponentAuth0MyAccountPasskeyManagement()) { + return Optional.of(((PageComponentAuth0MyAccountPasskeyManagementValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyAccountMfaManagement() { + if (isPageComponentAuth0MyAccountMfaManagement()) { + return Optional.of(((PageComponentAuth0MyAccountMfaManagementValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponent && value.equals(((PageComponent) other).value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + return value.toString(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitPageComponentAuth0Form(PageComponentAuth0Form pageComponentAuth0Form); + + T visitPageComponentAuth0TypographyHeading( + PageComponentAuth0TypographyHeading pageComponentAuth0TypographyHeading); + + T visitPageComponentAuth0MediaImage(PageComponentAuth0MediaImage pageComponentAuth0MediaImage); + + T visitPageComponentAuth0TypographyRichText( + PageComponentAuth0TypographyRichText pageComponentAuth0TypographyRichText); + + T visitPageComponentAuth0StructureSection( + PageComponentAuth0StructureSection pageComponentAuth0StructureSection); + + T visitPageComponentAuth0StructureSeparator( + PageComponentAuth0StructureSeparator pageComponentAuth0StructureSeparator); + + T visitPageComponentAuth0MyOrganizationDomainTable( + PageComponentAuth0MyOrganizationDomainTable pageComponentAuth0MyOrganizationDomainTable); + + T visitPageComponentAuth0MyOrganizationMemberManagement( + PageComponentAuth0MyOrganizationMemberManagement pageComponentAuth0MyOrganizationMemberManagement); + + T visitPageComponentAuth0MyOrganizationDetailsEdit( + PageComponentAuth0MyOrganizationDetailsEdit pageComponentAuth0MyOrganizationDetailsEdit); + + T visitPageComponentAuth0MyAccountPasskeyManagement( + PageComponentAuth0MyAccountPasskeyManagement pageComponentAuth0MyAccountPasskeyManagement); + + T visitPageComponentAuth0MyAccountMfaManagement( + PageComponentAuth0MyAccountMfaManagement pageComponentAuth0MyAccountMfaManagement); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(PageComponentAuth0FormValue.class), + @JsonSubTypes.Type(PageComponentAuth0TypographyHeadingValue.class), + @JsonSubTypes.Type(PageComponentAuth0MediaImageValue.class), + @JsonSubTypes.Type(PageComponentAuth0TypographyRichTextValue.class), + @JsonSubTypes.Type(PageComponentAuth0StructureSectionValue.class), + @JsonSubTypes.Type(PageComponentAuth0StructureSeparatorValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyOrganizationDomainTableValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyOrganizationMemberManagementValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyOrganizationDetailsEditValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyAccountPasskeyManagementValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyAccountMfaManagementValue.class) + }) + @JsonIgnoreProperties(ignoreUnknown = true) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("page:component:auth0:form") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0FormValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0Form value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0FormValue() {} + + private PageComponentAuth0FormValue(PageComponentAuth0Form value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0Form(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0FormValue && equalTo((PageComponentAuth0FormValue) other); + } + + private boolean equalTo(PageComponentAuth0FormValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:typography:heading") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0TypographyHeadingValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0TypographyHeading value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0TypographyHeadingValue() {} + + private PageComponentAuth0TypographyHeadingValue(PageComponentAuth0TypographyHeading value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0TypographyHeading(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyHeadingValue + && equalTo((PageComponentAuth0TypographyHeadingValue) other); + } + + private boolean equalTo(PageComponentAuth0TypographyHeadingValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:media:image") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MediaImageValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MediaImage value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MediaImageValue() {} + + private PageComponentAuth0MediaImageValue(PageComponentAuth0MediaImage value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MediaImage(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MediaImageValue + && equalTo((PageComponentAuth0MediaImageValue) other); + } + + private boolean equalTo(PageComponentAuth0MediaImageValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:typography:rich_text") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0TypographyRichTextValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0TypographyRichText value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0TypographyRichTextValue() {} + + private PageComponentAuth0TypographyRichTextValue(PageComponentAuth0TypographyRichText value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0TypographyRichText(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyRichTextValue + && equalTo((PageComponentAuth0TypographyRichTextValue) other); + } + + private boolean equalTo(PageComponentAuth0TypographyRichTextValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:structure:section") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0StructureSectionValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0StructureSection value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0StructureSectionValue() {} + + private PageComponentAuth0StructureSectionValue(PageComponentAuth0StructureSection value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0StructureSection(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSectionValue + && equalTo((PageComponentAuth0StructureSectionValue) other); + } + + private boolean equalTo(PageComponentAuth0StructureSectionValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:structure:separator") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0StructureSeparatorValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0StructureSeparator value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0StructureSeparatorValue() {} + + private PageComponentAuth0StructureSeparatorValue(PageComponentAuth0StructureSeparator value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0StructureSeparator(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSeparatorValue + && equalTo((PageComponentAuth0StructureSeparatorValue) other); + } + + private boolean equalTo(PageComponentAuth0StructureSeparatorValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_organization:domain_table") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyOrganizationDomainTableValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyOrganizationDomainTable value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyOrganizationDomainTableValue() {} + + private PageComponentAuth0MyOrganizationDomainTableValue(PageComponentAuth0MyOrganizationDomainTable value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyOrganizationDomainTable(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDomainTableValue + && equalTo((PageComponentAuth0MyOrganizationDomainTableValue) other); + } + + private boolean equalTo(PageComponentAuth0MyOrganizationDomainTableValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_organization:member_management") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyOrganizationMemberManagementValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyOrganizationMemberManagement value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyOrganizationMemberManagementValue() {} + + private PageComponentAuth0MyOrganizationMemberManagementValue( + PageComponentAuth0MyOrganizationMemberManagement value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyOrganizationMemberManagement(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationMemberManagementValue + && equalTo((PageComponentAuth0MyOrganizationMemberManagementValue) other); + } + + private boolean equalTo(PageComponentAuth0MyOrganizationMemberManagementValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_organization:details_edit") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyOrganizationDetailsEditValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyOrganizationDetailsEdit value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyOrganizationDetailsEditValue() {} + + private PageComponentAuth0MyOrganizationDetailsEditValue(PageComponentAuth0MyOrganizationDetailsEdit value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyOrganizationDetailsEdit(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDetailsEditValue + && equalTo((PageComponentAuth0MyOrganizationDetailsEditValue) other); + } + + private boolean equalTo(PageComponentAuth0MyOrganizationDetailsEditValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_account:passkey_management") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyAccountPasskeyManagementValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyAccountPasskeyManagement value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyAccountPasskeyManagementValue() {} + + private PageComponentAuth0MyAccountPasskeyManagementValue(PageComponentAuth0MyAccountPasskeyManagement value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyAccountPasskeyManagement(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountPasskeyManagementValue + && equalTo((PageComponentAuth0MyAccountPasskeyManagementValue) other); + } + + private boolean equalTo(PageComponentAuth0MyAccountPasskeyManagementValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_account:mfa_management") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyAccountMfaManagementValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyAccountMfaManagement value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyAccountMfaManagementValue() {} + + private PageComponentAuth0MyAccountMfaManagementValue(PageComponentAuth0MyAccountMfaManagement value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyAccountMfaManagement(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountMfaManagementValue + && equalTo((PageComponentAuth0MyAccountMfaManagementValue) other); + } + + private boolean equalTo(PageComponentAuth0MyAccountMfaManagementValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("type") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponent{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0Form.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0Form.java new file mode 100644 index 00000000..b78c9fa4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0Form.java @@ -0,0 +1,118 @@ +/** + * 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 = PageComponentAuth0Form.Builder.class) +public final class PageComponentAuth0Form { + private final PageComponentAuth0FormConfig config; + + private final Map additionalProperties; + + private PageComponentAuth0Form(PageComponentAuth0FormConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public PageComponentAuth0FormConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0Form && equalTo((PageComponentAuth0Form) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0Form other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull PageComponentAuth0FormConfig config); + + Builder from(PageComponentAuth0Form other); + } + + public interface _FinalStage { + PageComponentAuth0Form build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private PageComponentAuth0FormConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0Form other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull PageComponentAuth0FormConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0Form build() { + return new PageComponentAuth0Form(config, 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/PageComponentAuth0FormConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0FormConfig.java new file mode 100644 index 00000000..eeee76d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0FormConfig.java @@ -0,0 +1,161 @@ +/** + * 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 = PageComponentAuth0FormConfig.Builder.class) +public final class PageComponentAuth0FormConfig { + private final String formId; + + private final String completionMessage; + + private final Map additionalProperties; + + private PageComponentAuth0FormConfig( + String formId, String completionMessage, Map additionalProperties) { + this.formId = formId; + this.completionMessage = completionMessage; + this.additionalProperties = additionalProperties; + } + + /** + * @return The identifier of the form you want to render. + */ + @JsonProperty("form_id") + public String getFormId() { + return formId; + } + + /** + * @return Toast message displayed after successful form submission. + */ + @JsonProperty("completion_message") + public String getCompletionMessage() { + return completionMessage; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0FormConfig && equalTo((PageComponentAuth0FormConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0FormConfig other) { + return formId.equals(other.formId) && completionMessage.equals(other.completionMessage); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.formId, this.completionMessage); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static FormIdStage builder() { + return new Builder(); + } + + public interface FormIdStage { + /** + *

                                                              The identifier of the form you want to render.

                                                              + */ + CompletionMessageStage formId(@NotNull String formId); + + Builder from(PageComponentAuth0FormConfig other); + } + + public interface CompletionMessageStage { + /** + *

                                                              Toast message displayed after successful form submission.

                                                              + */ + _FinalStage completionMessage(@NotNull String completionMessage); + } + + public interface _FinalStage { + PageComponentAuth0FormConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements FormIdStage, CompletionMessageStage, _FinalStage { + private String formId; + + private String completionMessage; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0FormConfig other) { + formId(other.getFormId()); + completionMessage(other.getCompletionMessage()); + return this; + } + + /** + *

                                                              The identifier of the form you want to render.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("form_id") + public CompletionMessageStage formId(@NotNull String formId) { + this.formId = Objects.requireNonNull(formId, "formId must not be null"); + return this; + } + + /** + *

                                                              Toast message displayed after successful form submission.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("completion_message") + public _FinalStage completionMessage(@NotNull String completionMessage) { + this.completionMessage = Objects.requireNonNull(completionMessage, "completionMessage must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0FormConfig build() { + return new PageComponentAuth0FormConfig(formId, completionMessage, 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/PageComponentAuth0MediaImage.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MediaImage.java new file mode 100644 index 00000000..7909c00b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MediaImage.java @@ -0,0 +1,119 @@ +/** + * 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 = PageComponentAuth0MediaImage.Builder.class) +public final class PageComponentAuth0MediaImage { + private final PageComponentAuth0MediaImageConfig config; + + private final Map additionalProperties; + + private PageComponentAuth0MediaImage( + PageComponentAuth0MediaImageConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public PageComponentAuth0MediaImageConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MediaImage && equalTo((PageComponentAuth0MediaImage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MediaImage other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull PageComponentAuth0MediaImageConfig config); + + Builder from(PageComponentAuth0MediaImage other); + } + + public interface _FinalStage { + PageComponentAuth0MediaImage build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private PageComponentAuth0MediaImageConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0MediaImage other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull PageComponentAuth0MediaImageConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0MediaImage build() { + return new PageComponentAuth0MediaImage(config, 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/PageComponentAuth0MediaImageConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MediaImageConfig.java new file mode 100644 index 00000000..a2531bdf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MediaImageConfig.java @@ -0,0 +1,204 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MediaImageConfig.Builder.class) +public final class PageComponentAuth0MediaImageConfig { + private final String src; + + private final Optional position; + + private final Optional height; + + private final Map additionalProperties; + + private PageComponentAuth0MediaImageConfig( + String src, + Optional position, + Optional height, + Map additionalProperties) { + this.src = src; + this.position = position; + this.height = height; + this.additionalProperties = additionalProperties; + } + + /** + * @return URL of the image to display. + */ + @JsonProperty("src") + public String getSrc() { + return src; + } + + @JsonProperty("position") + public Optional getPosition() { + return position; + } + + /** + * @return Height of the image in pixels. Width scales automatically to preserve aspect ratio. + */ + @JsonProperty("height") + public Optional getHeight() { + return height; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MediaImageConfig + && equalTo((PageComponentAuth0MediaImageConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MediaImageConfig other) { + return src.equals(other.src) && position.equals(other.position) && height.equals(other.height); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.src, this.position, this.height); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SrcStage builder() { + return new Builder(); + } + + public interface SrcStage { + /** + *

                                                              URL of the image to display.

                                                              + */ + _FinalStage src(@NotNull String src); + + Builder from(PageComponentAuth0MediaImageConfig other); + } + + public interface _FinalStage { + PageComponentAuth0MediaImageConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage position(Optional position); + + _FinalStage position(Position position); + + /** + *

                                                              Height of the image in pixels. Width scales automatically to preserve aspect ratio.

                                                              + */ + _FinalStage height(Optional height); + + _FinalStage height(Integer height); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SrcStage, _FinalStage { + private String src; + + private Optional height = Optional.empty(); + + private Optional position = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0MediaImageConfig other) { + src(other.getSrc()); + position(other.getPosition()); + height(other.getHeight()); + return this; + } + + /** + *

                                                              URL of the image to display.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("src") + public _FinalStage src(@NotNull String src) { + this.src = Objects.requireNonNull(src, "src must not be null"); + return this; + } + + /** + *

                                                              Height of the image in pixels. Width scales automatically to preserve aspect ratio.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage height(Integer height) { + this.height = Optional.ofNullable(height); + return this; + } + + /** + *

                                                              Height of the image in pixels. Width scales automatically to preserve aspect ratio.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "height", nulls = Nulls.SKIP) + public _FinalStage height(Optional height) { + this.height = height; + return this; + } + + @java.lang.Override + public _FinalStage position(Position position) { + this.position = Optional.ofNullable(position); + return this; + } + + @java.lang.Override + @JsonSetter(value = "position", nulls = Nulls.SKIP) + public _FinalStage position(Optional position) { + this.position = position; + return this; + } + + @java.lang.Override + public PageComponentAuth0MediaImageConfig build() { + return new PageComponentAuth0MediaImageConfig(src, position, height, 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/PageComponentAuth0MyAccountMfaManagement.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountMfaManagement.java new file mode 100644 index 00000000..8222840b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountMfaManagement.java @@ -0,0 +1,107 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyAccountMfaManagement.Builder.class) +public final class PageComponentAuth0MyAccountMfaManagement { + private final Optional config; + + private final Map additionalProperties; + + private PageComponentAuth0MyAccountMfaManagement( + Optional config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public Optional getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountMfaManagement + && equalTo((PageComponentAuth0MyAccountMfaManagement) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MyAccountMfaManagement other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional config = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyAccountMfaManagement other) { + config(other.getConfig()); + return this; + } + + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public Builder config(Optional config) { + this.config = config; + return this; + } + + public Builder config(PageComponentAuth0MyAccountMfaManagementConfig config) { + this.config = Optional.ofNullable(config); + return this; + } + + public PageComponentAuth0MyAccountMfaManagement build() { + return new PageComponentAuth0MyAccountMfaManagement(config, 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/PageComponentAuth0MyAccountMfaManagementConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountMfaManagementConfig.java new file mode 100644 index 00000000..b17f3ce3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountMfaManagementConfig.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyAccountMfaManagementConfig.Builder.class) +public final class PageComponentAuth0MyAccountMfaManagementConfig { + private final Map additionalProperties; + + private PageComponentAuth0MyAccountMfaManagementConfig(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountMfaManagementConfig; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyAccountMfaManagementConfig other) { + return this; + } + + public PageComponentAuth0MyAccountMfaManagementConfig build() { + return new PageComponentAuth0MyAccountMfaManagementConfig(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/PageComponentAuth0MyAccountPasskeyManagement.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountPasskeyManagement.java new file mode 100644 index 00000000..80320aaf --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountPasskeyManagement.java @@ -0,0 +1,108 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyAccountPasskeyManagement.Builder.class) +public final class PageComponentAuth0MyAccountPasskeyManagement { + private final Optional config; + + private final Map additionalProperties; + + private PageComponentAuth0MyAccountPasskeyManagement( + Optional config, + Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public Optional getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountPasskeyManagement + && equalTo((PageComponentAuth0MyAccountPasskeyManagement) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MyAccountPasskeyManagement other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional config = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyAccountPasskeyManagement other) { + config(other.getConfig()); + return this; + } + + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public Builder config(Optional config) { + this.config = config; + return this; + } + + public Builder config(PageComponentAuth0MyAccountPasskeyManagementConfig config) { + this.config = Optional.ofNullable(config); + return this; + } + + public PageComponentAuth0MyAccountPasskeyManagement build() { + return new PageComponentAuth0MyAccountPasskeyManagement(config, 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/PageComponentAuth0MyAccountPasskeyManagementConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountPasskeyManagementConfig.java new file mode 100644 index 00000000..9e792d6e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyAccountPasskeyManagementConfig.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyAccountPasskeyManagementConfig.Builder.class) +public final class PageComponentAuth0MyAccountPasskeyManagementConfig { + private final Map additionalProperties; + + private PageComponentAuth0MyAccountPasskeyManagementConfig(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountPasskeyManagementConfig; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyAccountPasskeyManagementConfig other) { + return this; + } + + public PageComponentAuth0MyAccountPasskeyManagementConfig build() { + return new PageComponentAuth0MyAccountPasskeyManagementConfig(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/PageComponentAuth0MyOrganizationDetailsEdit.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDetailsEdit.java new file mode 100644 index 00000000..4e93f16c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDetailsEdit.java @@ -0,0 +1,108 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyOrganizationDetailsEdit.Builder.class) +public final class PageComponentAuth0MyOrganizationDetailsEdit { + private final Optional config; + + private final Map additionalProperties; + + private PageComponentAuth0MyOrganizationDetailsEdit( + Optional config, + Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public Optional getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDetailsEdit + && equalTo((PageComponentAuth0MyOrganizationDetailsEdit) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MyOrganizationDetailsEdit other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional config = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyOrganizationDetailsEdit other) { + config(other.getConfig()); + return this; + } + + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public Builder config(Optional config) { + this.config = config; + return this; + } + + public Builder config(PageComponentAuth0MyOrganizationDetailsEditConfig config) { + this.config = Optional.ofNullable(config); + return this; + } + + public PageComponentAuth0MyOrganizationDetailsEdit build() { + return new PageComponentAuth0MyOrganizationDetailsEdit(config, 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/PageComponentAuth0MyOrganizationDetailsEditConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDetailsEditConfig.java new file mode 100644 index 00000000..37dd4827 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDetailsEditConfig.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyOrganizationDetailsEditConfig.Builder.class) +public final class PageComponentAuth0MyOrganizationDetailsEditConfig { + private final Map additionalProperties; + + private PageComponentAuth0MyOrganizationDetailsEditConfig(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDetailsEditConfig; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyOrganizationDetailsEditConfig other) { + return this; + } + + public PageComponentAuth0MyOrganizationDetailsEditConfig build() { + return new PageComponentAuth0MyOrganizationDetailsEditConfig(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/PageComponentAuth0MyOrganizationDomainTable.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDomainTable.java new file mode 100644 index 00000000..7685cbca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDomainTable.java @@ -0,0 +1,108 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyOrganizationDomainTable.Builder.class) +public final class PageComponentAuth0MyOrganizationDomainTable { + private final Optional config; + + private final Map additionalProperties; + + private PageComponentAuth0MyOrganizationDomainTable( + Optional config, + Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public Optional getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDomainTable + && equalTo((PageComponentAuth0MyOrganizationDomainTable) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MyOrganizationDomainTable other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional config = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyOrganizationDomainTable other) { + config(other.getConfig()); + return this; + } + + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public Builder config(Optional config) { + this.config = config; + return this; + } + + public Builder config(PageComponentAuth0MyOrganizationDomainTableConfig config) { + this.config = Optional.ofNullable(config); + return this; + } + + public PageComponentAuth0MyOrganizationDomainTable build() { + return new PageComponentAuth0MyOrganizationDomainTable(config, 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/PageComponentAuth0MyOrganizationDomainTableConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDomainTableConfig.java new file mode 100644 index 00000000..0b3d8bba --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationDomainTableConfig.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyOrganizationDomainTableConfig.Builder.class) +public final class PageComponentAuth0MyOrganizationDomainTableConfig { + private final Map additionalProperties; + + private PageComponentAuth0MyOrganizationDomainTableConfig(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDomainTableConfig; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyOrganizationDomainTableConfig other) { + return this; + } + + public PageComponentAuth0MyOrganizationDomainTableConfig build() { + return new PageComponentAuth0MyOrganizationDomainTableConfig(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/PageComponentAuth0MyOrganizationMemberManagement.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationMemberManagement.java new file mode 100644 index 00000000..671dc6ae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationMemberManagement.java @@ -0,0 +1,108 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyOrganizationMemberManagement.Builder.class) +public final class PageComponentAuth0MyOrganizationMemberManagement { + private final Optional config; + + private final Map additionalProperties; + + private PageComponentAuth0MyOrganizationMemberManagement( + Optional config, + Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public Optional getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationMemberManagement + && equalTo((PageComponentAuth0MyOrganizationMemberManagement) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0MyOrganizationMemberManagement other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional config = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyOrganizationMemberManagement other) { + config(other.getConfig()); + return this; + } + + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public Builder config(Optional config) { + this.config = config; + return this; + } + + public Builder config(PageComponentAuth0MyOrganizationMemberManagementConfig config) { + this.config = Optional.ofNullable(config); + return this; + } + + public PageComponentAuth0MyOrganizationMemberManagement build() { + return new PageComponentAuth0MyOrganizationMemberManagement(config, 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/PageComponentAuth0MyOrganizationMemberManagementConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationMemberManagementConfig.java new file mode 100644 index 00000000..38021f3d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0MyOrganizationMemberManagementConfig.java @@ -0,0 +1,69 @@ +/** + * 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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0MyOrganizationMemberManagementConfig.Builder.class) +public final class PageComponentAuth0MyOrganizationMemberManagementConfig { + private final Map additionalProperties; + + private PageComponentAuth0MyOrganizationMemberManagementConfig(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationMemberManagementConfig; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @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 { + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0MyOrganizationMemberManagementConfig other) { + return this; + } + + public PageComponentAuth0MyOrganizationMemberManagementConfig build() { + return new PageComponentAuth0MyOrganizationMemberManagementConfig(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/PageComponentAuth0StructureSection.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSection.java new file mode 100644 index 00000000..b3705321 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSection.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 = PageComponentAuth0StructureSection.Builder.class) +public final class PageComponentAuth0StructureSection { + private final PageComponentAuth0StructureSectionConfig config; + + private final Map additionalProperties; + + private PageComponentAuth0StructureSection( + PageComponentAuth0StructureSectionConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public PageComponentAuth0StructureSectionConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSection + && equalTo((PageComponentAuth0StructureSection) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0StructureSection other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull PageComponentAuth0StructureSectionConfig config); + + Builder from(PageComponentAuth0StructureSection other); + } + + public interface _FinalStage { + PageComponentAuth0StructureSection build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private PageComponentAuth0StructureSectionConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0StructureSection other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull PageComponentAuth0StructureSectionConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0StructureSection build() { + return new PageComponentAuth0StructureSection(config, 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/PageComponentAuth0StructureSectionConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSectionConfig.java new file mode 100644 index 00000000..61ef6b6b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSectionConfig.java @@ -0,0 +1,272 @@ +/** + * 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 java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0StructureSectionConfig.Builder.class) +public final class PageComponentAuth0StructureSectionConfig { + private final Optional title; + + private final Optional description; + + private final PageComponentAuth0StructureSectionVariantEnum variant; + + private final List children; + + private final Map additionalProperties; + + private PageComponentAuth0StructureSectionConfig( + Optional title, + Optional description, + PageComponentAuth0StructureSectionVariantEnum variant, + List children, + Map additionalProperties) { + this.title = title; + this.description = description; + this.variant = variant; + this.children = children; + this.additionalProperties = additionalProperties; + } + + /** + * @return Heading displayed at the top of the section. + */ + @JsonProperty("title") + public Optional getTitle() { + return title; + } + + /** + * @return Optional description displayed below the title. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("variant") + public PageComponentAuth0StructureSectionVariantEnum getVariant() { + return variant; + } + + /** + * @return Components to render inside the section. + */ + @JsonProperty("children") + public List getChildren() { + return children; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSectionConfig + && equalTo((PageComponentAuth0StructureSectionConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0StructureSectionConfig other) { + return title.equals(other.title) + && description.equals(other.description) + && variant.equals(other.variant) + && children.equals(other.children); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.title, this.description, this.variant, this.children); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static VariantStage builder() { + return new Builder(); + } + + public interface VariantStage { + _FinalStage variant(@NotNull PageComponentAuth0StructureSectionVariantEnum variant); + + Builder from(PageComponentAuth0StructureSectionConfig other); + } + + public interface _FinalStage { + PageComponentAuth0StructureSectionConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Heading displayed at the top of the section.

                                                              + */ + _FinalStage title(Optional title); + + _FinalStage title(String title); + + /** + *

                                                              Optional description displayed below the title.

                                                              + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + + /** + *

                                                              Components to render inside the section.

                                                              + */ + _FinalStage children(List children); + + _FinalStage addChildren(PageComponentNoChildren children); + + _FinalStage addAllChildren(List children); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements VariantStage, _FinalStage { + private PageComponentAuth0StructureSectionVariantEnum variant; + + private List children = new ArrayList<>(); + + private Optional description = Optional.empty(); + + private Optional title = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0StructureSectionConfig other) { + title(other.getTitle()); + description(other.getDescription()); + variant(other.getVariant()); + children(other.getChildren()); + return this; + } + + @java.lang.Override + @JsonSetter("variant") + public _FinalStage variant(@NotNull PageComponentAuth0StructureSectionVariantEnum variant) { + this.variant = Objects.requireNonNull(variant, "variant must not be null"); + return this; + } + + /** + *

                                                              Components to render inside the section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllChildren(List children) { + if (children != null) { + this.children.addAll(children); + } + return this; + } + + /** + *

                                                              Components to render inside the section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addChildren(PageComponentNoChildren children) { + this.children.add(children); + return this; + } + + /** + *

                                                              Components to render inside the section.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "children", nulls = Nulls.SKIP) + public _FinalStage children(List children) { + this.children.clear(); + if (children != null) { + this.children.addAll(children); + } + return this; + } + + /** + *

                                                              Optional description displayed below the title.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + /** + *

                                                              Optional description displayed below the title.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + /** + *

                                                              Heading displayed at the top of the section.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage title(String title) { + this.title = Optional.ofNullable(title); + return this; + } + + /** + *

                                                              Heading displayed at the top of the section.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "title", nulls = Nulls.SKIP) + public _FinalStage title(Optional title) { + this.title = title; + return this; + } + + @java.lang.Override + public PageComponentAuth0StructureSectionConfig build() { + return new PageComponentAuth0StructureSectionConfig( + title, description, variant, children, 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/PageComponentAuth0StructureSectionVariantEnum.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSectionVariantEnum.java new file mode 100644 index 00000000..817bfbfa --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSectionVariantEnum.java @@ -0,0 +1,86 @@ +/** + * 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 PageComponentAuth0StructureSectionVariantEnum { + public static final PageComponentAuth0StructureSectionVariantEnum CARD = + new PageComponentAuth0StructureSectionVariantEnum(Value.CARD, "card"); + + public static final PageComponentAuth0StructureSectionVariantEnum NONE = + new PageComponentAuth0StructureSectionVariantEnum(Value.NONE, "none"); + + private final Value value; + + private final String string; + + PageComponentAuth0StructureSectionVariantEnum(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 PageComponentAuth0StructureSectionVariantEnum + && this.string.equals(((PageComponentAuth0StructureSectionVariantEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CARD: + return visitor.visitCard(); + case NONE: + return visitor.visitNone(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static PageComponentAuth0StructureSectionVariantEnum valueOf(String value) { + switch (value) { + case "card": + return CARD; + case "none": + return NONE; + default: + return new PageComponentAuth0StructureSectionVariantEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + CARD, + + NONE, + + UNKNOWN + } + + public interface Visitor { + T visitCard(); + + T visitNone(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparator.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparator.java new file mode 100644 index 00000000..f9b159c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparator.java @@ -0,0 +1,107 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0StructureSeparator.Builder.class) +public final class PageComponentAuth0StructureSeparator { + private final Optional config; + + private final Map additionalProperties; + + private PageComponentAuth0StructureSeparator( + Optional config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public Optional getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSeparator + && equalTo((PageComponentAuth0StructureSeparator) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0StructureSeparator other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional config = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0StructureSeparator other) { + config(other.getConfig()); + return this; + } + + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public Builder config(Optional config) { + this.config = config; + return this; + } + + public Builder config(PageComponentAuth0StructureSeparatorConfig config) { + this.config = Optional.ofNullable(config); + return this; + } + + public PageComponentAuth0StructureSeparator build() { + return new PageComponentAuth0StructureSeparator(config, 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/PageComponentAuth0StructureSeparatorConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparatorConfig.java new file mode 100644 index 00000000..00fbf538 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparatorConfig.java @@ -0,0 +1,137 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0StructureSeparatorConfig.Builder.class) +public final class PageComponentAuth0StructureSeparatorConfig { + private final Optional variant; + + private final Optional text; + + private final Map additionalProperties; + + private PageComponentAuth0StructureSeparatorConfig( + Optional variant, + Optional text, + Map additionalProperties) { + this.variant = variant; + this.text = text; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("variant") + public Optional getVariant() { + return variant; + } + + /** + * @return Optional label centered within the separator line (ignored when variant is "none"). + */ + @JsonProperty("text") + public Optional getText() { + return text; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSeparatorConfig + && equalTo((PageComponentAuth0StructureSeparatorConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0StructureSeparatorConfig other) { + return variant.equals(other.variant) && text.equals(other.text); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.variant, this.text); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional variant = Optional.empty(); + + private Optional text = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PageComponentAuth0StructureSeparatorConfig other) { + variant(other.getVariant()); + text(other.getText()); + return this; + } + + @JsonSetter(value = "variant", nulls = Nulls.SKIP) + public Builder variant(Optional variant) { + this.variant = variant; + return this; + } + + public Builder variant(PageComponentAuth0StructureSeparatorVariantEnum variant) { + this.variant = Optional.ofNullable(variant); + return this; + } + + /** + *

                                                              Optional label centered within the separator line (ignored when variant is "none").

                                                              + */ + @JsonSetter(value = "text", nulls = Nulls.SKIP) + public Builder text(Optional text) { + this.text = text; + return this; + } + + public Builder text(String text) { + this.text = Optional.ofNullable(text); + return this; + } + + public PageComponentAuth0StructureSeparatorConfig build() { + return new PageComponentAuth0StructureSeparatorConfig(variant, text, 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/PageComponentAuth0StructureSeparatorVariantEnum.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparatorVariantEnum.java new file mode 100644 index 00000000..d1248894 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0StructureSeparatorVariantEnum.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class PageComponentAuth0StructureSeparatorVariantEnum { + public static final PageComponentAuth0StructureSeparatorVariantEnum DASHED = + new PageComponentAuth0StructureSeparatorVariantEnum(Value.DASHED, "dashed"); + + public static final PageComponentAuth0StructureSeparatorVariantEnum NONE = + new PageComponentAuth0StructureSeparatorVariantEnum(Value.NONE, "none"); + + public static final PageComponentAuth0StructureSeparatorVariantEnum SOLID = + new PageComponentAuth0StructureSeparatorVariantEnum(Value.SOLID, "solid"); + + private final Value value; + + private final String string; + + PageComponentAuth0StructureSeparatorVariantEnum(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 PageComponentAuth0StructureSeparatorVariantEnum + && this.string.equals(((PageComponentAuth0StructureSeparatorVariantEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case DASHED: + return visitor.visitDashed(); + case NONE: + return visitor.visitNone(); + case SOLID: + return visitor.visitSolid(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static PageComponentAuth0StructureSeparatorVariantEnum valueOf(String value) { + switch (value) { + case "dashed": + return DASHED; + case "none": + return NONE; + case "solid": + return SOLID; + default: + return new PageComponentAuth0StructureSeparatorVariantEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DASHED, + + NONE, + + SOLID, + + UNKNOWN + } + + public interface Visitor { + T visitDashed(); + + T visitNone(); + + T visitSolid(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyHeading.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyHeading.java new file mode 100644 index 00000000..6a654c1b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyHeading.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 = PageComponentAuth0TypographyHeading.Builder.class) +public final class PageComponentAuth0TypographyHeading { + private final PageComponentAuth0TypographyHeadingConfig config; + + private final Map additionalProperties; + + private PageComponentAuth0TypographyHeading( + PageComponentAuth0TypographyHeadingConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public PageComponentAuth0TypographyHeadingConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyHeading + && equalTo((PageComponentAuth0TypographyHeading) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0TypographyHeading other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull PageComponentAuth0TypographyHeadingConfig config); + + Builder from(PageComponentAuth0TypographyHeading other); + } + + public interface _FinalStage { + PageComponentAuth0TypographyHeading build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private PageComponentAuth0TypographyHeadingConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0TypographyHeading other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull PageComponentAuth0TypographyHeadingConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0TypographyHeading build() { + return new PageComponentAuth0TypographyHeading(config, 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/PageComponentAuth0TypographyHeadingConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyHeadingConfig.java new file mode 100644 index 00000000..594de60e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyHeadingConfig.java @@ -0,0 +1,173 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PageComponentAuth0TypographyHeadingConfig.Builder.class) +public final class PageComponentAuth0TypographyHeadingConfig { + private final String title; + + private final Optional description; + + private final Map additionalProperties; + + private PageComponentAuth0TypographyHeadingConfig( + String title, Optional description, Map additionalProperties) { + this.title = title; + this.description = description; + this.additionalProperties = additionalProperties; + } + + /** + * @return Heading displayed. + */ + @JsonProperty("title") + public String getTitle() { + return title; + } + + /** + * @return Optional description displayed below the title. Supports basic HTML formatting: links, bold, italic, and underline. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyHeadingConfig + && equalTo((PageComponentAuth0TypographyHeadingConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0TypographyHeadingConfig other) { + return title.equals(other.title) && description.equals(other.description); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.title, this.description); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TitleStage builder() { + return new Builder(); + } + + public interface TitleStage { + /** + *

                                                              Heading displayed.

                                                              + */ + _FinalStage title(@NotNull String title); + + Builder from(PageComponentAuth0TypographyHeadingConfig other); + } + + public interface _FinalStage { + PageComponentAuth0TypographyHeadingConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Optional description displayed below the title. Supports basic HTML formatting: links, bold, italic, and underline.

                                                              + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TitleStage, _FinalStage { + private String title; + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0TypographyHeadingConfig other) { + title(other.getTitle()); + description(other.getDescription()); + return this; + } + + /** + *

                                                              Heading displayed.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("title") + public _FinalStage title(@NotNull String title) { + this.title = Objects.requireNonNull(title, "title must not be null"); + return this; + } + + /** + *

                                                              Optional description displayed below the title. Supports basic HTML formatting: links, bold, italic, and underline.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + /** + *

                                                              Optional description displayed below the title. Supports basic HTML formatting: links, bold, italic, and underline.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public PageComponentAuth0TypographyHeadingConfig build() { + return new PageComponentAuth0TypographyHeadingConfig(title, description, 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/PageComponentAuth0TypographyRichText.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyRichText.java new file mode 100644 index 00000000..139ca7a4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyRichText.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 = PageComponentAuth0TypographyRichText.Builder.class) +public final class PageComponentAuth0TypographyRichText { + private final PageComponentAuth0TypographyRichTextConfig config; + + private final Map additionalProperties; + + private PageComponentAuth0TypographyRichText( + PageComponentAuth0TypographyRichTextConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public PageComponentAuth0TypographyRichTextConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyRichText + && equalTo((PageComponentAuth0TypographyRichText) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0TypographyRichText other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull PageComponentAuth0TypographyRichTextConfig config); + + Builder from(PageComponentAuth0TypographyRichText other); + } + + public interface _FinalStage { + PageComponentAuth0TypographyRichText build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private PageComponentAuth0TypographyRichTextConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0TypographyRichText other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull PageComponentAuth0TypographyRichTextConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0TypographyRichText build() { + return new PageComponentAuth0TypographyRichText(config, 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/PageComponentAuth0TypographyRichTextConfig.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyRichTextConfig.java new file mode 100644 index 00000000..216e3979 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentAuth0TypographyRichTextConfig.java @@ -0,0 +1,129 @@ +/** + * 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 = PageComponentAuth0TypographyRichTextConfig.Builder.class) +public final class PageComponentAuth0TypographyRichTextConfig { + private final String content; + + private final Map additionalProperties; + + private PageComponentAuth0TypographyRichTextConfig(String content, Map additionalProperties) { + this.content = content; + this.additionalProperties = additionalProperties; + } + + /** + * @return HTML content to render. Supports headings, bold, italic, underline, links, text alignment, and lists. + */ + @JsonProperty("content") + public String getContent() { + return content; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyRichTextConfig + && equalTo((PageComponentAuth0TypographyRichTextConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PageComponentAuth0TypographyRichTextConfig other) { + return content.equals(other.content); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.content); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ContentStage builder() { + return new Builder(); + } + + public interface ContentStage { + /** + *

                                                              HTML content to render. Supports headings, bold, italic, underline, links, text alignment, and lists.

                                                              + */ + _FinalStage content(@NotNull String content); + + Builder from(PageComponentAuth0TypographyRichTextConfig other); + } + + public interface _FinalStage { + PageComponentAuth0TypographyRichTextConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ContentStage, _FinalStage { + private String content; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PageComponentAuth0TypographyRichTextConfig other) { + content(other.getContent()); + return this; + } + + /** + *

                                                              HTML content to render. Supports headings, bold, italic, underline, links, text alignment, and lists.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("content") + public _FinalStage content(@NotNull String content) { + this.content = Objects.requireNonNull(content, "content must not be null"); + return this; + } + + @java.lang.Override + public PageComponentAuth0TypographyRichTextConfig build() { + return new PageComponentAuth0TypographyRichTextConfig(content, 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/PageComponentNoChildren.java b/src/main/java/com/auth0/client/mgmt/types/PageComponentNoChildren.java new file mode 100644 index 00000000..89ee9f3a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PageComponentNoChildren.java @@ -0,0 +1,715 @@ +/** + * 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.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public final class PageComponentNoChildren { + private final Value value; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private PageComponentNoChildren(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static PageComponentNoChildren pageComponentAuth0Form(PageComponentAuth0Form value) { + return new PageComponentNoChildren(new PageComponentAuth0FormValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0TypographyHeading( + PageComponentAuth0TypographyHeading value) { + return new PageComponentNoChildren(new PageComponentAuth0TypographyHeadingValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0MediaImage(PageComponentAuth0MediaImage value) { + return new PageComponentNoChildren(new PageComponentAuth0MediaImageValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0TypographyRichText( + PageComponentAuth0TypographyRichText value) { + return new PageComponentNoChildren(new PageComponentAuth0TypographyRichTextValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0StructureSeparator( + PageComponentAuth0StructureSeparator value) { + return new PageComponentNoChildren(new PageComponentAuth0StructureSeparatorValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0MyOrganizationDomainTable( + PageComponentAuth0MyOrganizationDomainTable value) { + return new PageComponentNoChildren(new PageComponentAuth0MyOrganizationDomainTableValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0MyOrganizationMemberManagement( + PageComponentAuth0MyOrganizationMemberManagement value) { + return new PageComponentNoChildren(new PageComponentAuth0MyOrganizationMemberManagementValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0MyOrganizationDetailsEdit( + PageComponentAuth0MyOrganizationDetailsEdit value) { + return new PageComponentNoChildren(new PageComponentAuth0MyOrganizationDetailsEditValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0MyAccountPasskeyManagement( + PageComponentAuth0MyAccountPasskeyManagement value) { + return new PageComponentNoChildren(new PageComponentAuth0MyAccountPasskeyManagementValue(value)); + } + + public static PageComponentNoChildren pageComponentAuth0MyAccountMfaManagement( + PageComponentAuth0MyAccountMfaManagement value) { + return new PageComponentNoChildren(new PageComponentAuth0MyAccountMfaManagementValue(value)); + } + + public boolean isPageComponentAuth0Form() { + return value instanceof PageComponentAuth0FormValue; + } + + public boolean isPageComponentAuth0TypographyHeading() { + return value instanceof PageComponentAuth0TypographyHeadingValue; + } + + public boolean isPageComponentAuth0MediaImage() { + return value instanceof PageComponentAuth0MediaImageValue; + } + + public boolean isPageComponentAuth0TypographyRichText() { + return value instanceof PageComponentAuth0TypographyRichTextValue; + } + + public boolean isPageComponentAuth0StructureSeparator() { + return value instanceof PageComponentAuth0StructureSeparatorValue; + } + + public boolean isPageComponentAuth0MyOrganizationDomainTable() { + return value instanceof PageComponentAuth0MyOrganizationDomainTableValue; + } + + public boolean isPageComponentAuth0MyOrganizationMemberManagement() { + return value instanceof PageComponentAuth0MyOrganizationMemberManagementValue; + } + + public boolean isPageComponentAuth0MyOrganizationDetailsEdit() { + return value instanceof PageComponentAuth0MyOrganizationDetailsEditValue; + } + + public boolean isPageComponentAuth0MyAccountPasskeyManagement() { + return value instanceof PageComponentAuth0MyAccountPasskeyManagementValue; + } + + public boolean isPageComponentAuth0MyAccountMfaManagement() { + return value instanceof PageComponentAuth0MyAccountMfaManagementValue; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getPageComponentAuth0Form() { + if (isPageComponentAuth0Form()) { + return Optional.of(((PageComponentAuth0FormValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0TypographyHeading() { + if (isPageComponentAuth0TypographyHeading()) { + return Optional.of(((PageComponentAuth0TypographyHeadingValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MediaImage() { + if (isPageComponentAuth0MediaImage()) { + return Optional.of(((PageComponentAuth0MediaImageValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0TypographyRichText() { + if (isPageComponentAuth0TypographyRichText()) { + return Optional.of(((PageComponentAuth0TypographyRichTextValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0StructureSeparator() { + if (isPageComponentAuth0StructureSeparator()) { + return Optional.of(((PageComponentAuth0StructureSeparatorValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyOrganizationDomainTable() { + if (isPageComponentAuth0MyOrganizationDomainTable()) { + return Optional.of(((PageComponentAuth0MyOrganizationDomainTableValue) value).value); + } + return Optional.empty(); + } + + public Optional + getPageComponentAuth0MyOrganizationMemberManagement() { + if (isPageComponentAuth0MyOrganizationMemberManagement()) { + return Optional.of(((PageComponentAuth0MyOrganizationMemberManagementValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyOrganizationDetailsEdit() { + if (isPageComponentAuth0MyOrganizationDetailsEdit()) { + return Optional.of(((PageComponentAuth0MyOrganizationDetailsEditValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyAccountPasskeyManagement() { + if (isPageComponentAuth0MyAccountPasskeyManagement()) { + return Optional.of(((PageComponentAuth0MyAccountPasskeyManagementValue) value).value); + } + return Optional.empty(); + } + + public Optional getPageComponentAuth0MyAccountMfaManagement() { + if (isPageComponentAuth0MyAccountMfaManagement()) { + return Optional.of(((PageComponentAuth0MyAccountMfaManagementValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentNoChildren && value.equals(((PageComponentNoChildren) other).value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + return value.toString(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitPageComponentAuth0Form(PageComponentAuth0Form pageComponentAuth0Form); + + T visitPageComponentAuth0TypographyHeading( + PageComponentAuth0TypographyHeading pageComponentAuth0TypographyHeading); + + T visitPageComponentAuth0MediaImage(PageComponentAuth0MediaImage pageComponentAuth0MediaImage); + + T visitPageComponentAuth0TypographyRichText( + PageComponentAuth0TypographyRichText pageComponentAuth0TypographyRichText); + + T visitPageComponentAuth0StructureSeparator( + PageComponentAuth0StructureSeparator pageComponentAuth0StructureSeparator); + + T visitPageComponentAuth0MyOrganizationDomainTable( + PageComponentAuth0MyOrganizationDomainTable pageComponentAuth0MyOrganizationDomainTable); + + T visitPageComponentAuth0MyOrganizationMemberManagement( + PageComponentAuth0MyOrganizationMemberManagement pageComponentAuth0MyOrganizationMemberManagement); + + T visitPageComponentAuth0MyOrganizationDetailsEdit( + PageComponentAuth0MyOrganizationDetailsEdit pageComponentAuth0MyOrganizationDetailsEdit); + + T visitPageComponentAuth0MyAccountPasskeyManagement( + PageComponentAuth0MyAccountPasskeyManagement pageComponentAuth0MyAccountPasskeyManagement); + + T visitPageComponentAuth0MyAccountMfaManagement( + PageComponentAuth0MyAccountMfaManagement pageComponentAuth0MyAccountMfaManagement); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(PageComponentAuth0FormValue.class), + @JsonSubTypes.Type(PageComponentAuth0TypographyHeadingValue.class), + @JsonSubTypes.Type(PageComponentAuth0MediaImageValue.class), + @JsonSubTypes.Type(PageComponentAuth0TypographyRichTextValue.class), + @JsonSubTypes.Type(PageComponentAuth0StructureSeparatorValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyOrganizationDomainTableValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyOrganizationMemberManagementValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyOrganizationDetailsEditValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyAccountPasskeyManagementValue.class), + @JsonSubTypes.Type(PageComponentAuth0MyAccountMfaManagementValue.class) + }) + @JsonIgnoreProperties(ignoreUnknown = true) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("page:component:auth0:form") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0FormValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0Form value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0FormValue() {} + + private PageComponentAuth0FormValue(PageComponentAuth0Form value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0Form(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0FormValue && equalTo((PageComponentAuth0FormValue) other); + } + + private boolean equalTo(PageComponentAuth0FormValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:typography:heading") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0TypographyHeadingValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0TypographyHeading value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0TypographyHeadingValue() {} + + private PageComponentAuth0TypographyHeadingValue(PageComponentAuth0TypographyHeading value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0TypographyHeading(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyHeadingValue + && equalTo((PageComponentAuth0TypographyHeadingValue) other); + } + + private boolean equalTo(PageComponentAuth0TypographyHeadingValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:media:image") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MediaImageValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MediaImage value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MediaImageValue() {} + + private PageComponentAuth0MediaImageValue(PageComponentAuth0MediaImage value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MediaImage(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MediaImageValue + && equalTo((PageComponentAuth0MediaImageValue) other); + } + + private boolean equalTo(PageComponentAuth0MediaImageValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:typography:rich_text") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0TypographyRichTextValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0TypographyRichText value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0TypographyRichTextValue() {} + + private PageComponentAuth0TypographyRichTextValue(PageComponentAuth0TypographyRichText value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0TypographyRichText(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0TypographyRichTextValue + && equalTo((PageComponentAuth0TypographyRichTextValue) other); + } + + private boolean equalTo(PageComponentAuth0TypographyRichTextValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:structure:separator") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0StructureSeparatorValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0StructureSeparator value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0StructureSeparatorValue() {} + + private PageComponentAuth0StructureSeparatorValue(PageComponentAuth0StructureSeparator value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0StructureSeparator(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0StructureSeparatorValue + && equalTo((PageComponentAuth0StructureSeparatorValue) other); + } + + private boolean equalTo(PageComponentAuth0StructureSeparatorValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_organization:domain_table") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyOrganizationDomainTableValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyOrganizationDomainTable value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyOrganizationDomainTableValue() {} + + private PageComponentAuth0MyOrganizationDomainTableValue(PageComponentAuth0MyOrganizationDomainTable value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyOrganizationDomainTable(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDomainTableValue + && equalTo((PageComponentAuth0MyOrganizationDomainTableValue) other); + } + + private boolean equalTo(PageComponentAuth0MyOrganizationDomainTableValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_organization:member_management") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyOrganizationMemberManagementValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyOrganizationMemberManagement value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyOrganizationMemberManagementValue() {} + + private PageComponentAuth0MyOrganizationMemberManagementValue( + PageComponentAuth0MyOrganizationMemberManagement value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyOrganizationMemberManagement(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationMemberManagementValue + && equalTo((PageComponentAuth0MyOrganizationMemberManagementValue) other); + } + + private boolean equalTo(PageComponentAuth0MyOrganizationMemberManagementValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_organization:details_edit") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyOrganizationDetailsEditValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyOrganizationDetailsEdit value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyOrganizationDetailsEditValue() {} + + private PageComponentAuth0MyOrganizationDetailsEditValue(PageComponentAuth0MyOrganizationDetailsEdit value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyOrganizationDetailsEdit(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyOrganizationDetailsEditValue + && equalTo((PageComponentAuth0MyOrganizationDetailsEditValue) other); + } + + private boolean equalTo(PageComponentAuth0MyOrganizationDetailsEditValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_account:passkey_management") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyAccountPasskeyManagementValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyAccountPasskeyManagement value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyAccountPasskeyManagementValue() {} + + private PageComponentAuth0MyAccountPasskeyManagementValue(PageComponentAuth0MyAccountPasskeyManagement value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyAccountPasskeyManagement(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountPasskeyManagementValue + && equalTo((PageComponentAuth0MyAccountPasskeyManagementValue) other); + } + + private boolean equalTo(PageComponentAuth0MyAccountPasskeyManagementValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonTypeName("page:component:auth0:my_account:mfa_management") + @JsonIgnoreProperties("type") + private static final class PageComponentAuth0MyAccountMfaManagementValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private PageComponentAuth0MyAccountMfaManagement value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private PageComponentAuth0MyAccountMfaManagementValue() {} + + private PageComponentAuth0MyAccountMfaManagementValue(PageComponentAuth0MyAccountMfaManagement value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitPageComponentAuth0MyAccountMfaManagement(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PageComponentAuth0MyAccountMfaManagementValue + && equalTo((PageComponentAuth0MyAccountMfaManagementValue) other); + } + + private boolean equalTo(PageComponentAuth0MyAccountMfaManagementValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("type") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "PageComponentNoChildren{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java b/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java index acf3de7a..e3ef5e1b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java @@ -29,6 +29,8 @@ public final class PartialGroupsEnum { public static final PartialGroupsEnum PASSKEYS = new PartialGroupsEnum(Value.PASSKEYS, "passkeys"); + public static final PartialGroupsEnum CONFIRMATION = new PartialGroupsEnum(Value.CONFIRMATION, "confirmation"); + private final Value value; private final String string; @@ -79,6 +81,8 @@ public T visit(Visitor visitor) { return visitor.visitLoginPasswordless(); case PASSKEYS: return visitor.visitPasskeys(); + case CONFIRMATION: + return visitor.visitConfirmation(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -106,6 +110,8 @@ public static PartialGroupsEnum valueOf(String value) { return LOGIN_PASSWORDLESS; case "passkeys": return PASSKEYS; + case "confirmation": + return CONFIRMATION; default: return new PartialGroupsEnum(Value.UNKNOWN, value); } @@ -130,6 +136,8 @@ public enum Value { PASSKEYS, + CONFIRMATION, + UNKNOWN } @@ -152,6 +160,8 @@ public interface Visitor { T visitPasskeys(); + T visitConfirmation(); + T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/auth0/client/mgmt/types/PasswordDictionaryMatchTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/PasswordDictionaryMatchTypeEnum.java new file mode 100644 index 00000000..cfec22cd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PasswordDictionaryMatchTypeEnum.java @@ -0,0 +1,86 @@ +/** + * 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 PasswordDictionaryMatchTypeEnum { + public static final PasswordDictionaryMatchTypeEnum SUBSTRING = + new PasswordDictionaryMatchTypeEnum(Value.SUBSTRING, "substring"); + + public static final PasswordDictionaryMatchTypeEnum EXACT = + new PasswordDictionaryMatchTypeEnum(Value.EXACT, "exact"); + + private final Value value; + + private final String string; + + PasswordDictionaryMatchTypeEnum(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 PasswordDictionaryMatchTypeEnum + && this.string.equals(((PasswordDictionaryMatchTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SUBSTRING: + return visitor.visitSubstring(); + case EXACT: + return visitor.visitExact(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static PasswordDictionaryMatchTypeEnum valueOf(String value) { + switch (value) { + case "substring": + return SUBSTRING; + case "exact": + return EXACT; + default: + return new PasswordDictionaryMatchTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + EXACT, + + SUBSTRING, + + UNKNOWN + } + + public interface Visitor { + T visitExact(); + + T visitSubstring(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PatchAgentRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/PatchAgentRequestParameters.java new file mode 100644 index 00000000..cc29d6a0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PatchAgentRequestParameters.java @@ -0,0 +1,175 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PatchAgentRequestParameters.Builder.class) +public final class PatchAgentRequestParameters { + private final Optional name; + + private final OptionalNullable> metadata; + + private final Map additionalProperties; + + private PatchAgentRequestParameters( + Optional name, + OptionalNullable> metadata, + Map additionalProperties) { + this.name = name; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The agent name. Cannot contain <, >, or null bytes. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Arbitrary key-value metadata for the agent. Pass null to clear all metadata. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("metadata") + public OptionalNullable> getMetadata() { + if (metadata == null) { + return OptionalNullable.absent(); + } + return metadata; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("metadata") + private OptionalNullable> _getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchAgentRequestParameters && equalTo((PatchAgentRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PatchAgentRequestParameters other) { + return name.equals(other.name) && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private OptionalNullable> metadata = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PatchAgentRequestParameters other) { + name(other.getName()); + metadata(other.getMetadata()); + return this; + } + + /** + *

                                                              The agent name. Cannot contain <, >, or null bytes.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Arbitrary key-value metadata for the agent. Pass null to clear all metadata.

                                                              + */ + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public Builder metadata(@Nullable OptionalNullable> metadata) { + this.metadata = metadata; + return this; + } + + public Builder metadata(Map metadata) { + this.metadata = OptionalNullable.of(metadata); + return this; + } + + public Builder metadata(Optional> metadata) { + if (metadata.isPresent()) { + this.metadata = OptionalNullable.of(metadata.get()); + } else { + this.metadata = OptionalNullable.absent(); + } + return this; + } + + public Builder metadata(com.auth0.client.mgmt.core.Nullable> metadata) { + if (metadata.isNull()) { + this.metadata = OptionalNullable.ofNull(); + } else if (metadata.isEmpty()) { + this.metadata = OptionalNullable.absent(); + } else { + this.metadata = OptionalNullable.of(metadata.get()); + } + return this; + } + + public PatchAgentRequestParameters build() { + return new PatchAgentRequestParameters(name, metadata, 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/PatchRateLimitPolicyConfigurationRequestContentAction.java b/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentAction.java index b6ae4bb2..d17bed89 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentAction.java +++ b/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentAction.java @@ -145,7 +145,6 @@ public Builder from(PatchRateLimitPolicyConfigurationRequestContentAction other) } /** - *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -157,7 +156,6 @@ public LimitStage action(@NotNull PatchRateLimitPolicyConfigurationRequestConten } /** - *

                                                              The maximum number of requests allowed per second.

                                                              *

                                                              The maximum number of requests allowed per second.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -169,7 +167,6 @@ public RedirectUriStage limit(int limit) { } /** - *

                                                              The HTTPS URI to redirect to when the rate limit is exceeded.

                                                              *

                                                              The HTTPS URI to redirect to when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentOne.java b/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentOne.java index 2bf8ae27..a5d12f22 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentOne.java +++ b/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentOne.java @@ -123,7 +123,6 @@ public Builder from(PatchRateLimitPolicyConfigurationRequestContentOne other) { } /** - *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -135,7 +134,6 @@ public LimitStage action(@NotNull PatchRateLimitPolicyConfigurationRequestConten } /** - *

                                                              The maximum number of requests allowed per second.

                                                              *

                                                              The maximum number of requests allowed per second.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentZero.java b/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentZero.java index b018d3ed..e956dfd7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentZero.java +++ b/src/main/java/com/auth0/client/mgmt/types/PatchRateLimitPolicyConfigurationRequestContentZero.java @@ -101,7 +101,6 @@ public Builder from(PatchRateLimitPolicyConfigurationRequestContentZero other) { } /** - *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java b/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java index f889d30a..168951c7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java +++ b/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java @@ -121,7 +121,6 @@ public Builder from(PermissionRequestPayload other) { } /** - *

                                                              Resource server (API) identifier that this permission is for.

                                                              *

                                                              Resource server (API) identifier that this permission is for.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public PermissionNameStage resourceServerIdentifier(@NotNull String resourceServ } /** - *

                                                              Name of this permission.

                                                              *

                                                              Name of this permission.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java b/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java index 080c3e3e..673766e5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java @@ -20,7 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PhoneAttribute.Builder.class) public final class PhoneAttribute { - private final Optional identifier; + private final Optional identifier; private final Optional profileRequired; @@ -29,7 +29,7 @@ public final class PhoneAttribute { private final Map additionalProperties; private PhoneAttribute( - Optional identifier, + Optional identifier, Optional profileRequired, Optional signup, Map additionalProperties) { @@ -40,7 +40,7 @@ private PhoneAttribute( } @JsonProperty("identifier") - public Optional getIdentifier() { + public Optional getIdentifier() { return identifier; } @@ -90,7 +90,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional identifier = Optional.empty(); + private Optional identifier = Optional.empty(); private Optional profileRequired = Optional.empty(); @@ -109,12 +109,12 @@ public Builder from(PhoneAttribute other) { } @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public Builder identifier(Optional identifier) { + public Builder identifier(Optional identifier) { this.identifier = identifier; return this; } - public Builder identifier(ConnectionAttributeIdentifier identifier) { + public Builder identifier(PhoneAttributeIdentifier identifier) { this.identifier = Optional.ofNullable(identifier); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneAttributeIdentifier.java b/src/main/java/com/auth0/client/mgmt/types/PhoneAttributeIdentifier.java new file mode 100644 index 00000000..2fa14c77 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneAttributeIdentifier.java @@ -0,0 +1,136 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PhoneAttributeIdentifier.Builder.class) +public final class PhoneAttributeIdentifier { + private final Optional active; + + private final Optional defaultMethod; + + private final Map additionalProperties; + + private PhoneAttributeIdentifier( + Optional active, + Optional defaultMethod, + Map additionalProperties) { + this.active = active; + this.defaultMethod = defaultMethod; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determines if the attribute is used for identification + */ + @JsonProperty("active") + public Optional getActive() { + return active; + } + + @JsonProperty("default_method") + public Optional getDefaultMethod() { + return defaultMethod; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PhoneAttributeIdentifier && equalTo((PhoneAttributeIdentifier) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PhoneAttributeIdentifier other) { + return active.equals(other.active) && defaultMethod.equals(other.defaultMethod); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active, this.defaultMethod); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional active = Optional.empty(); + + private Optional defaultMethod = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PhoneAttributeIdentifier other) { + active(other.getActive()); + defaultMethod(other.getDefaultMethod()); + return this; + } + + /** + *

                                                              Determines if the attribute is used for identification

                                                              + */ + @JsonSetter(value = "active", nulls = Nulls.SKIP) + public Builder active(Optional active) { + this.active = active; + return this; + } + + public Builder active(Boolean active) { + this.active = Optional.ofNullable(active); + return this; + } + + @JsonSetter(value = "default_method", nulls = Nulls.SKIP) + public Builder defaultMethod(Optional defaultMethod) { + this.defaultMethod = defaultMethod; + return this; + } + + public Builder defaultMethod(DefaultMethodPhoneNumberIdentifierEnum defaultMethod) { + this.defaultMethod = Optional.ofNullable(defaultMethod); + return this; + } + + public PhoneAttributeIdentifier build() { + return new PhoneAttributeIdentifier(active, defaultMethod, 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/PhoneProviderProtectionBackoffStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderProtectionBackoffStrategyEnum.java index 201e9ada..39daeb27 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderProtectionBackoffStrategyEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderProtectionBackoffStrategyEnum.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class PhoneProviderProtectionBackoffStrategyEnum { + public static final PhoneProviderProtectionBackoffStrategyEnum DEFAULT = + new PhoneProviderProtectionBackoffStrategyEnum(Value.DEFAULT, "default"); + public static final PhoneProviderProtectionBackoffStrategyEnum EXPONENTIAL = new PhoneProviderProtectionBackoffStrategyEnum(Value.EXPONENTIAL, "exponential"); - public static final PhoneProviderProtectionBackoffStrategyEnum NONE = - new PhoneProviderProtectionBackoffStrategyEnum(Value.NONE, "none"); - private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { + case DEFAULT: + return visitor.visitDefault(); case EXPONENTIAL: return visitor.visitExponential(); - case NONE: - return visitor.visitNone(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static PhoneProviderProtectionBackoffStrategyEnum valueOf(String value) { switch (value) { + case "default": + return DEFAULT; case "exponential": return EXPONENTIAL; - case "none": - return NONE; default: return new PhoneProviderProtectionBackoffStrategyEnum(Value.UNKNOWN, value); } @@ -71,7 +71,7 @@ public static PhoneProviderProtectionBackoffStrategyEnum valueOf(String value) { public enum Value { EXPONENTIAL, - NONE, + DEFAULT, UNKNOWN } @@ -79,7 +79,7 @@ public enum Value { public interface Visitor { T visitExponential(); - T visitNone(); + T visitDefault(); T visitUnknown(String unknownType); } diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java index 3a819661..45a93b79 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java +++ b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java @@ -219,7 +219,6 @@ public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { } /** - *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/Portal.java b/src/main/java/com/auth0/client/mgmt/types/Portal.java new file mode 100644 index 00000000..44e03a56 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/Portal.java @@ -0,0 +1,350 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Portal.Builder.class) +public final class Portal { + private final String id; + + private final String name; + + private final Optional navigation; + + private final Optional pages; + + private final String slug; + + private final Optional client; + + private final Optional customCode; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private Portal( + String id, + String name, + Optional navigation, + Optional pages, + String slug, + Optional client, + Optional customCode, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.navigation = navigation; + this.pages = pages; + this.slug = slug; + this.client = client; + this.customCode = customCode; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("navigation") + public Optional getNavigation() { + return navigation; + } + + @JsonProperty("pages") + public Optional getPages() { + return pages; + } + + @JsonProperty("slug") + public String getSlug() { + return slug; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + + @JsonProperty("custom_code") + public Optional getCustomCode() { + return customCode; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Portal && equalTo((Portal) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Portal other) { + return id.equals(other.id) + && name.equals(other.name) + && navigation.equals(other.navigation) + && pages.equals(other.pages) + && slug.equals(other.slug) + && client.equals(other.client) + && customCode.equals(other.customCode) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.navigation, + this.pages, + this.slug, + this.client, + this.customCode, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(Portal other); + } + + public interface NameStage { + SlugStage name(@NotNull String name); + } + + public interface SlugStage { + CreatedAtStage slug(@NotNull String slug); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + Portal build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage navigation(Optional navigation); + + _FinalStage navigation(PortalNavigation navigation); + + _FinalStage pages(Optional pages); + + _FinalStage pages(PortalPagesByType pages); + + _FinalStage client(Optional client); + + _FinalStage client(PortalClientSecretPost client); + + _FinalStage customCode(Optional customCode); + + _FinalStage customCode(PortalCustomCode customCode); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, SlugStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private String slug; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional customCode = Optional.empty(); + + private Optional client = Optional.empty(); + + private Optional pages = Optional.empty(); + + private Optional navigation = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Portal other) { + id(other.getId()); + name(other.getName()); + navigation(other.getNavigation()); + pages(other.getPages()); + slug(other.getSlug()); + client(other.getClient()); + customCode(other.getCustomCode()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public SlugStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("slug") + public CreatedAtStage slug(@NotNull String slug) { + this.slug = Objects.requireNonNull(slug, "slug must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage customCode(PortalCustomCode customCode) { + this.customCode = Optional.ofNullable(customCode); + return this; + } + + @java.lang.Override + @JsonSetter(value = "custom_code", nulls = Nulls.SKIP) + public _FinalStage customCode(Optional customCode) { + this.customCode = customCode; + return this; + } + + @java.lang.Override + public _FinalStage client(PortalClientSecretPost client) { + this.client = Optional.ofNullable(client); + return this; + } + + @java.lang.Override + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public _FinalStage client(Optional client) { + this.client = client; + return this; + } + + @java.lang.Override + public _FinalStage pages(PortalPagesByType pages) { + this.pages = Optional.ofNullable(pages); + return this; + } + + @java.lang.Override + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public _FinalStage pages(Optional pages) { + this.pages = pages; + return this; + } + + @java.lang.Override + public _FinalStage navigation(PortalNavigation navigation) { + this.navigation = Optional.ofNullable(navigation); + return this; + } + + @java.lang.Override + @JsonSetter(value = "navigation", nulls = Nulls.SKIP) + public _FinalStage navigation(Optional navigation) { + this.navigation = navigation; + return this; + } + + @java.lang.Override + public Portal build() { + return new Portal( + id, name, navigation, pages, slug, client, customCode, 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/PortalClientSecretPost.java b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPost.java new file mode 100644 index 00000000..70ba20e9 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPost.java @@ -0,0 +1,146 @@ +/** + * 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 = PortalClientSecretPost.Builder.class) +public final class PortalClientSecretPost { + private final PortalClientSecretPostTokenEndpointAuthMethod tokenEndpointAuthMethod; + + private final String clientId; + + private final Map additionalProperties; + + private PortalClientSecretPost( + PortalClientSecretPostTokenEndpointAuthMethod tokenEndpointAuthMethod, + String clientId, + Map additionalProperties) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.clientId = clientId; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("token_endpoint_auth_method") + public PortalClientSecretPostTokenEndpointAuthMethod getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalClientSecretPost && equalTo((PortalClientSecretPost) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalClientSecretPost other) { + return tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) && clientId.equals(other.clientId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.tokenEndpointAuthMethod, this.clientId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TokenEndpointAuthMethodStage builder() { + return new Builder(); + } + + public interface TokenEndpointAuthMethodStage { + ClientIdStage tokenEndpointAuthMethod( + @NotNull PortalClientSecretPostTokenEndpointAuthMethod tokenEndpointAuthMethod); + + Builder from(PortalClientSecretPost other); + } + + public interface ClientIdStage { + _FinalStage clientId(@NotNull String clientId); + } + + public interface _FinalStage { + PortalClientSecretPost build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TokenEndpointAuthMethodStage, ClientIdStage, _FinalStage { + private PortalClientSecretPostTokenEndpointAuthMethod tokenEndpointAuthMethod; + + private String clientId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PortalClientSecretPost other) { + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + clientId(other.getClientId()); + return this; + } + + @java.lang.Override + @JsonSetter("token_endpoint_auth_method") + public ClientIdStage tokenEndpointAuthMethod( + @NotNull PortalClientSecretPostTokenEndpointAuthMethod tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = + Objects.requireNonNull(tokenEndpointAuthMethod, "tokenEndpointAuthMethod must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("client_id") + public _FinalStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + public PortalClientSecretPost build() { + return new PortalClientSecretPost(tokenEndpointAuthMethod, clientId, 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/PortalClientSecretPostRequest.java b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostRequest.java new file mode 100644 index 00000000..13305e60 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostRequest.java @@ -0,0 +1,173 @@ +/** + * 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 = PortalClientSecretPostRequest.Builder.class) +public final class PortalClientSecretPostRequest { + private final PortalClientSecretPostRequestTokenEndpointAuthMethod tokenEndpointAuthMethod; + + private final String clientId; + + private final String clientSecret; + + private final Map additionalProperties; + + private PortalClientSecretPostRequest( + PortalClientSecretPostRequestTokenEndpointAuthMethod tokenEndpointAuthMethod, + String clientId, + String clientSecret, + Map additionalProperties) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.clientId = clientId; + this.clientSecret = clientSecret; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("token_endpoint_auth_method") + public PortalClientSecretPostRequestTokenEndpointAuthMethod getTokenEndpointAuthMethod() { + return tokenEndpointAuthMethod; + } + + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + @JsonProperty("client_secret") + public String getClientSecret() { + return clientSecret; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalClientSecretPostRequest && equalTo((PortalClientSecretPostRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalClientSecretPostRequest other) { + return tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) + && clientId.equals(other.clientId) + && clientSecret.equals(other.clientSecret); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.tokenEndpointAuthMethod, this.clientId, this.clientSecret); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TokenEndpointAuthMethodStage builder() { + return new Builder(); + } + + public interface TokenEndpointAuthMethodStage { + ClientIdStage tokenEndpointAuthMethod( + @NotNull PortalClientSecretPostRequestTokenEndpointAuthMethod tokenEndpointAuthMethod); + + Builder from(PortalClientSecretPostRequest other); + } + + public interface ClientIdStage { + ClientSecretStage clientId(@NotNull String clientId); + } + + public interface ClientSecretStage { + _FinalStage clientSecret(@NotNull String clientSecret); + } + + public interface _FinalStage { + PortalClientSecretPostRequest build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements TokenEndpointAuthMethodStage, ClientIdStage, ClientSecretStage, _FinalStage { + private PortalClientSecretPostRequestTokenEndpointAuthMethod tokenEndpointAuthMethod; + + private String clientId; + + private String clientSecret; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PortalClientSecretPostRequest other) { + tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); + clientId(other.getClientId()); + clientSecret(other.getClientSecret()); + return this; + } + + @java.lang.Override + @JsonSetter("token_endpoint_auth_method") + public ClientIdStage tokenEndpointAuthMethod( + @NotNull PortalClientSecretPostRequestTokenEndpointAuthMethod tokenEndpointAuthMethod) { + this.tokenEndpointAuthMethod = + Objects.requireNonNull(tokenEndpointAuthMethod, "tokenEndpointAuthMethod must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("client_id") + public ClientSecretStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("client_secret") + public _FinalStage clientSecret(@NotNull String clientSecret) { + this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret must not be null"); + return this; + } + + @java.lang.Override + public PortalClientSecretPostRequest build() { + return new PortalClientSecretPostRequest( + tokenEndpointAuthMethod, clientId, clientSecret, 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/PortalClientSecretPostRequestTokenEndpointAuthMethod.java b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostRequestTokenEndpointAuthMethod.java new file mode 100644 index 00000000..67b15d80 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostRequestTokenEndpointAuthMethod.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 PortalClientSecretPostRequestTokenEndpointAuthMethod { + public static final PortalClientSecretPostRequestTokenEndpointAuthMethod CLIENT_SECRET_POST = + new PortalClientSecretPostRequestTokenEndpointAuthMethod(Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + PortalClientSecretPostRequestTokenEndpointAuthMethod(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 PortalClientSecretPostRequestTokenEndpointAuthMethod + && this.string.equals(((PortalClientSecretPostRequestTokenEndpointAuthMethod) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static PortalClientSecretPostRequestTokenEndpointAuthMethod valueOf(String value) { + switch (value) { + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new PortalClientSecretPostRequestTokenEndpointAuthMethod(Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostTokenEndpointAuthMethod.java b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostTokenEndpointAuthMethod.java new file mode 100644 index 00000000..77fe3fbc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalClientSecretPostTokenEndpointAuthMethod.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 PortalClientSecretPostTokenEndpointAuthMethod { + public static final PortalClientSecretPostTokenEndpointAuthMethod CLIENT_SECRET_POST = + new PortalClientSecretPostTokenEndpointAuthMethod(Value.CLIENT_SECRET_POST, "client_secret_post"); + + private final Value value; + + private final String string; + + PortalClientSecretPostTokenEndpointAuthMethod(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 PortalClientSecretPostTokenEndpointAuthMethod + && this.string.equals(((PortalClientSecretPostTokenEndpointAuthMethod) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CLIENT_SECRET_POST: + return visitor.visitClientSecretPost(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static PortalClientSecretPostTokenEndpointAuthMethod valueOf(String value) { + switch (value) { + case "client_secret_post": + return CLIENT_SECRET_POST; + default: + return new PortalClientSecretPostTokenEndpointAuthMethod(Value.UNKNOWN, value); + } + } + + public enum Value { + CLIENT_SECRET_POST, + + UNKNOWN + } + + public interface Visitor { + T visitClientSecretPost(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PortalCustomCode.java b/src/main/java/com/auth0/client/mgmt/types/PortalCustomCode.java new file mode 100644 index 00000000..c21424c1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalCustomCode.java @@ -0,0 +1,111 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PortalCustomCode.Builder.class) +public final class PortalCustomCode { + private final Optional head; + + private final Map additionalProperties; + + private PortalCustomCode(Optional head, Map additionalProperties) { + this.head = head; + this.additionalProperties = additionalProperties; + } + + /** + * @return Custom code injected into the <head> of the portal. Only injected when the portal is accessed via a custom domain; it is not injected on canonical domains. + */ + @JsonProperty("head") + public Optional getHead() { + return head; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalCustomCode && equalTo((PortalCustomCode) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalCustomCode other) { + return head.equals(other.head); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.head); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional head = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PortalCustomCode other) { + head(other.getHead()); + return this; + } + + /** + *

                                                              Custom code injected into the <head> of the portal. Only injected when the portal is accessed via a custom domain; it is not injected on canonical domains.

                                                              + */ + @JsonSetter(value = "head", nulls = Nulls.SKIP) + public Builder head(Optional head) { + this.head = head; + return this; + } + + public Builder head(String head) { + this.head = Optional.ofNullable(head); + return this; + } + + public PortalCustomCode build() { + return new PortalCustomCode(head, 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/PortalNavigation.java b/src/main/java/com/auth0/client/mgmt/types/PortalNavigation.java new file mode 100644 index 00000000..8e7668ca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalNavigation.java @@ -0,0 +1,105 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PortalNavigation.Builder.class) +public final class PortalNavigation { + private final Optional sidebar; + + private final Map additionalProperties; + + private PortalNavigation(Optional sidebar, Map additionalProperties) { + this.sidebar = sidebar; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("sidebar") + public Optional getSidebar() { + return sidebar; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalNavigation && equalTo((PortalNavigation) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalNavigation other) { + return sidebar.equals(other.sidebar); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.sidebar); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional sidebar = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PortalNavigation other) { + sidebar(other.getSidebar()); + return this; + } + + @JsonSetter(value = "sidebar", nulls = Nulls.SKIP) + public Builder sidebar(Optional sidebar) { + this.sidebar = sidebar; + return this; + } + + public Builder sidebar(Sidebar sidebar) { + this.sidebar = Optional.ofNullable(sidebar); + return this; + } + + public PortalNavigation build() { + return new PortalNavigation(sidebar, 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/PortalPage.java b/src/main/java/com/auth0/client/mgmt/types/PortalPage.java new file mode 100644 index 00000000..c03fa262 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalPage.java @@ -0,0 +1,175 @@ +/** + * 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 = PortalPage.Builder.class) +public final class PortalPage { + private final String title; + + private final String slug; + + private final Optional> components; + + private final Map additionalProperties; + + private PortalPage( + String title, + String slug, + Optional> components, + Map additionalProperties) { + this.title = title; + this.slug = slug; + this.components = components; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("title") + public String getTitle() { + return title; + } + + @JsonProperty("slug") + public String getSlug() { + return slug; + } + + @JsonProperty("components") + public Optional> getComponents() { + return components; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalPage && equalTo((PortalPage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalPage other) { + return title.equals(other.title) && slug.equals(other.slug) && components.equals(other.components); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.title, this.slug, this.components); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TitleStage builder() { + return new Builder(); + } + + public interface TitleStage { + SlugStage title(@NotNull String title); + + Builder from(PortalPage other); + } + + public interface SlugStage { + _FinalStage slug(@NotNull String slug); + } + + public interface _FinalStage { + PortalPage build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage components(Optional> components); + + _FinalStage components(List components); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TitleStage, SlugStage, _FinalStage { + private String title; + + private String slug; + + private Optional> components = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PortalPage other) { + title(other.getTitle()); + slug(other.getSlug()); + components(other.getComponents()); + return this; + } + + @java.lang.Override + @JsonSetter("title") + public SlugStage title(@NotNull String title) { + this.title = Objects.requireNonNull(title, "title must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("slug") + public _FinalStage slug(@NotNull String slug) { + this.slug = Objects.requireNonNull(slug, "slug must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage components(List components) { + this.components = Optional.ofNullable(components); + return this; + } + + @java.lang.Override + @JsonSetter(value = "components", nulls = Nulls.SKIP) + public _FinalStage components(Optional> components) { + this.components = components; + return this; + } + + @java.lang.Override + public PortalPage build() { + return new PortalPage(title, slug, components, 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/PortalPagesByType.java b/src/main/java/com/auth0/client/mgmt/types/PortalPagesByType.java new file mode 100644 index 00000000..b9adc992 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalPagesByType.java @@ -0,0 +1,129 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PortalPagesByType.Builder.class) +public final class PortalPagesByType { + private final Optional default_; + + private final Optional> standard; + + private final Map additionalProperties; + + private PortalPagesByType( + Optional default_, Optional> standard, Map additionalProperties) { + this.default_ = default_; + this.standard = standard; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + @JsonProperty("standard") + public Optional> getStandard() { + return standard; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalPagesByType && equalTo((PortalPagesByType) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalPagesByType other) { + return default_.equals(other.default_) && standard.equals(other.standard); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.default_, this.standard); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional default_ = Optional.empty(); + + private Optional> standard = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PortalPagesByType other) { + default_(other.getDefault()); + standard(other.getStandard()); + return this; + } + + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public Builder default_(Optional default_) { + this.default_ = default_; + return this; + } + + public Builder default_(String default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @JsonSetter(value = "standard", nulls = Nulls.SKIP) + public Builder standard(Optional> standard) { + this.standard = standard; + return this; + } + + public Builder standard(List standard) { + this.standard = Optional.ofNullable(standard); + return this; + } + + public PortalPagesByType build() { + return new PortalPagesByType(default_, standard, 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/PortalSummary.java b/src/main/java/com/auth0/client/mgmt/types/PortalSummary.java new file mode 100644 index 00000000..4a5c6b1a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/PortalSummary.java @@ -0,0 +1,218 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PortalSummary.Builder.class) +public final class PortalSummary { + private final String id; + + private final String name; + + private final String slug; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private PortalSummary( + String id, + String name, + String slug, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.slug = slug; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("slug") + public String getSlug() { + return slug; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PortalSummary && equalTo((PortalSummary) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PortalSummary other) { + return id.equals(other.id) + && name.equals(other.name) + && slug.equals(other.slug) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.name, this.slug, this.createdAt, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(PortalSummary other); + } + + public interface NameStage { + SlugStage name(@NotNull String name); + } + + public interface SlugStage { + CreatedAtStage slug(@NotNull String slug); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + PortalSummary build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, SlugStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private String slug; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PortalSummary other) { + id(other.getId()); + name(other.getName()); + slug(other.getSlug()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public SlugStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("slug") + public CreatedAtStage slug(@NotNull String slug) { + this.slug = Objects.requireNonNull(slug, "slug must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public PortalSummary build() { + return new PortalSummary(id, name, slug, 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/Position.java b/src/main/java/com/auth0/client/mgmt/types/Position.java new file mode 100644 index 00000000..bf55c5cd --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/Position.java @@ -0,0 +1,92 @@ +/** + * 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 Position { + public static final Position LEFT = new Position(Value.LEFT, "left"); + + public static final Position RIGHT = new Position(Value.RIGHT, "right"); + + public static final Position CENTER = new Position(Value.CENTER, "center"); + + private final Value value; + + private final String string; + + Position(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 Position && this.string.equals(((Position) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case LEFT: + return visitor.visitLeft(); + case RIGHT: + return visitor.visitRight(); + case CENTER: + return visitor.visitCenter(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static Position valueOf(String value) { + switch (value) { + case "left": + return LEFT; + case "right": + return RIGHT; + case "center": + return CENTER; + default: + return new Position(Value.UNKNOWN, value); + } + } + + public enum Value { + LEFT, + + CENTER, + + RIGHT, + + UNKNOWN + } + + public interface Visitor { + T visitLeft(); + + T visitCenter(); + + T visitRight(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysRequestContent.java index 69e04e76..b75daa08 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/PostConnectionKeysRequestContent.java @@ -20,16 +20,29 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PostConnectionKeysRequestContent.Builder.class) public final class PostConnectionKeysRequestContent { + private final Optional keyUse; + private final Optional signingAlg; private final Map additionalProperties; private PostConnectionKeysRequestContent( - Optional signingAlg, Map additionalProperties) { + Optional keyUse, + Optional signingAlg, + Map additionalProperties) { + this.keyUse = keyUse; this.signingAlg = signingAlg; this.additionalProperties = additionalProperties; } + /** + * @return Whether to provision a signing key (default) or an encryption key for the connection. + */ + @JsonProperty("key_use") + public Optional getKeyUse() { + return keyUse; + } + @JsonProperty("signing_alg") public Optional getSigningAlg() { return signingAlg; @@ -47,12 +60,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(PostConnectionKeysRequestContent other) { - return signingAlg.equals(other.signingAlg); + return keyUse.equals(other.keyUse) && signingAlg.equals(other.signingAlg); } @java.lang.Override public int hashCode() { - return Objects.hash(this.signingAlg); + return Objects.hash(this.keyUse, this.signingAlg); } @java.lang.Override @@ -66,6 +79,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private Optional keyUse = Optional.empty(); + private Optional signingAlg = Optional.empty(); @JsonAnySetter @@ -74,10 +89,25 @@ public static final class Builder { private Builder() {} public Builder from(PostConnectionKeysRequestContent other) { + keyUse(other.getKeyUse()); signingAlg(other.getSigningAlg()); return this; } + /** + *

                                                              Whether to provision a signing key (default) or an encryption key for the connection.

                                                              + */ + @JsonSetter(value = "key_use", nulls = Nulls.SKIP) + public Builder keyUse(Optional keyUse) { + this.keyUse = keyUse; + return this; + } + + public Builder keyUse(ConnectionKeyUseEnum keyUse) { + this.keyUse = Optional.ofNullable(keyUse); + return this; + } + @JsonSetter(value = "signing_alg", nulls = Nulls.SKIP) public Builder signingAlg(Optional signingAlg) { this.signingAlg = signingAlg; @@ -90,7 +120,7 @@ public Builder signingAlg(PostConnectionKeysAlgEnum signingAlg) { } public PostConnectionKeysRequestContent build() { - return new PostConnectionKeysRequestContent(signingAlg, additionalProperties); + return new PostConnectionKeysRequestContent(keyUse, signingAlg, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/PostConnectionsKeysResponseContentItem.java b/src/main/java/com/auth0/client/mgmt/types/PostConnectionsKeysResponseContentItem.java index 042ede4e..3ba61746 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PostConnectionsKeysResponseContentItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/PostConnectionsKeysResponseContentItem.java @@ -73,7 +73,7 @@ private PostConnectionsKeysResponseContentItem( } /** - * @return The key id of the signing key + * @return The key id of the signing or encryption key */ @JsonProperty("kid") public String getKid() { @@ -81,7 +81,7 @@ public String getKid() { } /** - * @return The public certificate of the signing key + * @return The public certificate of the signing or encryption key */ @JsonProperty("cert") public String getCert() { @@ -89,7 +89,7 @@ public String getCert() { } /** - * @return The public certificate of the signing key in pkcs7 format + * @return The public certificate of the signing or encryption key in pkcs7 format */ @JsonProperty("pkcs") public Optional getPkcs() { @@ -137,7 +137,7 @@ public String getThumbprint() { } /** - * @return Signing key algorithm + * @return Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys */ @JsonProperty("algorithm") public Optional getAlgorithm() { @@ -207,7 +207,7 @@ public static KidStage builder() { public interface KidStage { /** - *

                                                              The key id of the signing key

                                                              + *

                                                              The key id of the signing or encryption key

                                                              */ CertStage kid(@NotNull String kid); @@ -216,7 +216,7 @@ public interface KidStage { public interface CertStage { /** - *

                                                              The public certificate of the signing key

                                                              + *

                                                              The public certificate of the signing or encryption key

                                                              */ FingerprintStage cert(@NotNull String cert); } @@ -243,7 +243,7 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              */ _FinalStage pkcs(Optional pkcs); @@ -271,7 +271,7 @@ public interface _FinalStage { _FinalStage currentSince(String currentSince); /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              */ _FinalStage algorithm(Optional algorithm); @@ -332,8 +332,7 @@ public Builder from(PostConnectionsKeysResponseContentItem other) { } /** - *

                                                              The key id of the signing key

                                                              - *

                                                              The key id of the signing key

                                                              + *

                                                              The key id of the signing or encryption key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -344,8 +343,7 @@ public CertStage kid(@NotNull String kid) { } /** - *

                                                              The public certificate of the signing key

                                                              - *

                                                              The public certificate of the signing key

                                                              + *

                                                              The public certificate of the signing or encryption key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -356,7 +354,6 @@ public FingerprintStage cert(@NotNull String cert) { } /** - *

                                                              The cert fingerprint

                                                              *

                                                              The cert fingerprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -368,7 +365,6 @@ public ThumbprintStage fingerprint(@NotNull String fingerprint) { } /** - *

                                                              The cert thumbprint

                                                              *

                                                              The cert thumbprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -406,7 +402,7 @@ public _FinalStage keyUse(Optional keyUse) { } /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -416,7 +412,7 @@ public _FinalStage algorithm(String algorithm) { } /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              */ @java.lang.Override @JsonSetter(value = "algorithm", nulls = Nulls.SKIP) @@ -486,7 +482,7 @@ public _FinalStage current(Optional current) { } /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -496,7 +492,7 @@ public _FinalStage pkcs(String pkcs) { } /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              */ @java.lang.Override @JsonSetter(value = "pkcs", nulls = Nulls.SKIP) diff --git a/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataRequestContent.java index 01696b95..a494cc1c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataRequestContent.java @@ -98,7 +98,6 @@ public Builder from(PreviewCimdMetadataRequestContent other) { } /** - *

                                                              URL to the Client ID Metadata Document

                                                              *

                                                              URL to the Client ID Metadata Document

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataResponseContent.java index b01d4b91..3aa63dad 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/PreviewCimdMetadataResponseContent.java @@ -23,6 +23,8 @@ public final class PreviewCimdMetadataResponseContent { private final Optional clientId; + private final Optional externalMetadataCreatedBy; + private final Optional> errors; private final Optional validation; @@ -33,11 +35,13 @@ public final class PreviewCimdMetadataResponseContent { private PreviewCimdMetadataResponseContent( Optional clientId, + Optional externalMetadataCreatedBy, Optional> errors, Optional validation, Optional mappedFields, Map additionalProperties) { this.clientId = clientId; + this.externalMetadataCreatedBy = externalMetadataCreatedBy; this.errors = errors; this.validation = validation; this.mappedFields = mappedFields; @@ -52,6 +56,11 @@ public Optional getClientId() { return clientId; } + @JsonProperty("external_metadata_created_by") + public Optional getExternalMetadataCreatedBy() { + return externalMetadataCreatedBy; + } + /** * @return Array of retrieval errors (populated when the metadata document could not be fetched). When present, validation is omitted. */ @@ -84,6 +93,7 @@ public Map getAdditionalProperties() { private boolean equalTo(PreviewCimdMetadataResponseContent other) { return clientId.equals(other.clientId) + && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) && errors.equals(other.errors) && validation.equals(other.validation) && mappedFields.equals(other.mappedFields); @@ -91,7 +101,8 @@ private boolean equalTo(PreviewCimdMetadataResponseContent other) { @java.lang.Override public int hashCode() { - return Objects.hash(this.clientId, this.errors, this.validation, this.mappedFields); + return Objects.hash( + this.clientId, this.externalMetadataCreatedBy, this.errors, this.validation, this.mappedFields); } @java.lang.Override @@ -107,6 +118,8 @@ public static Builder builder() { public static final class Builder { private Optional clientId = Optional.empty(); + private Optional externalMetadataCreatedBy = Optional.empty(); + private Optional> errors = Optional.empty(); private Optional validation = Optional.empty(); @@ -120,6 +133,7 @@ private Builder() {} public Builder from(PreviewCimdMetadataResponseContent other) { clientId(other.getClientId()); + externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); errors(other.getErrors()); validation(other.getValidation()); mappedFields(other.getMappedFields()); @@ -140,6 +154,18 @@ public Builder clientId(String clientId) { return this; } + @JsonSetter(value = "external_metadata_created_by", nulls = Nulls.SKIP) + public Builder externalMetadataCreatedBy( + Optional externalMetadataCreatedBy) { + this.externalMetadataCreatedBy = externalMetadataCreatedBy; + return this; + } + + public Builder externalMetadataCreatedBy(CimdExternalMetadataCreatedByEnum externalMetadataCreatedBy) { + this.externalMetadataCreatedBy = Optional.ofNullable(externalMetadataCreatedBy); + return this; + } + /** *

                                                              Array of retrieval errors (populated when the metadata document could not be fetched). When present, validation is omitted.

                                                              */ @@ -178,7 +204,7 @@ public Builder mappedFields(CimdMappedClientFields mappedFields) { public PreviewCimdMetadataResponseContent build() { return new PreviewCimdMetadataResponseContent( - clientId, errors, validation, mappedFields, additionalProperties); + clientId, externalMetadataCreatedBy, errors, validation, mappedFields, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java index 160f21fe..9a7da217 100644 --- a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java +++ b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java @@ -237,7 +237,6 @@ public PemStage credentialType(@NotNull PublicKeyCredentialTypeEnum credentialTy } /** - *

                                                              PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped.

                                                              *

                                                              PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicy.java b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicy.java index 0e0eb85d..dbbb8ebe 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicy.java +++ b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicy.java @@ -231,7 +231,6 @@ public Builder from(RateLimitPolicy other) { } /** - *

                                                              Unique identifier for the Rate Limit Policy.

                                                              *

                                                              Unique identifier for the Rate Limit Policy.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -257,7 +256,6 @@ public ConsumerSelectorStage consumer(@NotNull RateLimitPolicyConsumerEnum consu } /** - *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationAction.java b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationAction.java index dfc98e81..ebb9d482 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationAction.java +++ b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationAction.java @@ -145,7 +145,6 @@ public Builder from(RateLimitPolicyConfigurationAction other) { } /** - *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -157,7 +156,6 @@ public LimitStage action(@NotNull RateLimitPolicyConfigurationActionAction actio } /** - *

                                                              The maximum number of requests allowed per second.

                                                              *

                                                              The maximum number of requests allowed per second.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -169,7 +167,6 @@ public RedirectUriStage limit(int limit) { } /** - *

                                                              The HTTPS URI to redirect to when the rate limit is exceeded.

                                                              *

                                                              The HTTPS URI to redirect to when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationOne.java b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationOne.java index de108c7a..0212ab1d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationOne.java +++ b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationOne.java @@ -120,7 +120,6 @@ public Builder from(RateLimitPolicyConfigurationOne other) { } /** - *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,7 +131,6 @@ public LimitStage action(@NotNull RateLimitPolicyConfigurationOneAction action) } /** - *

                                                              The maximum number of requests allowed per second.

                                                              *

                                                              The maximum number of requests allowed per second.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationZero.java b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationZero.java index 73859b4d..ada8ed88 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationZero.java +++ b/src/main/java/com/auth0/client/mgmt/types/RateLimitPolicyConfigurationZero.java @@ -99,7 +99,6 @@ public Builder from(RateLimitPolicyConfigurationZero other) { } /** - *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              *

                                                              Determines the action to take when the rate limit is exceeded.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ 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 2becee7f..6ffe1ded 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/RegisterCimdClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientRequestContent.java index 27460c11..f4dddb68 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientRequestContent.java @@ -98,7 +98,6 @@ public Builder from(RegisterCimdClientRequestContent other) { } /** - *

                                                              URL to the Client ID Metadata Document. Acts as the unique identifier for upsert operations.

                                                              *

                                                              URL to the Client ID Metadata Document. Acts as the unique identifier for upsert operations.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientResponseContent.java index 5c458077..c42c0444 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RegisterCimdClientResponseContent.java @@ -134,7 +134,6 @@ public Builder from(RegisterCimdClientResponseContent other) { } /** - *

                                                              The Auth0 client_id of the created or updated client

                                                              *

                                                              The Auth0 client_id of the created or updated client

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java index 96ca09e2..46c5846f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java @@ -219,7 +219,6 @@ public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { } /** - *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java index eb3e4ec5..7eac1a35 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java @@ -52,12 +52,18 @@ public final class ResourceServer { private final Optional enforcePolicies; + private final Optional tokenLifetimeForAnonymousAccessTokens; + private final Optional tokenDialect; + private final OptionalNullable accessToken; + private final OptionalNullable tokenEncryption; private final OptionalNullable consentPolicy; + private final Optional requireConsentNonRepudiation; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -68,6 +74,10 @@ public final class ResourceServer { private final Optional clientId; + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + private final Map additionalProperties; private ResourceServer( @@ -85,14 +95,19 @@ private ResourceServer( Optional tokenLifetime, Optional tokenLifetimeForWeb, Optional enforcePolicies, + Optional tokenLifetimeForAnonymousAccessTokens, Optional tokenDialect, + OptionalNullable accessToken, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, OptionalNullable authorizationPolicy, Optional clientId, + Optional agentSubjectClaims, + OptionalNullable type, Map additionalProperties) { this.id = id; this.name = name; @@ -108,14 +123,19 @@ private ResourceServer( this.tokenLifetime = tokenLifetime; this.tokenLifetimeForWeb = tokenLifetimeForWeb; this.enforcePolicies = enforcePolicies; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; this.tokenDialect = tokenDialect; + this.accessToken = accessToken; this.tokenEncryption = tokenEncryption; this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; this.additionalProperties = additionalProperties; } @@ -228,11 +248,28 @@ public Optional getEnforcePolicies() { return enforcePolicies; } + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public Optional getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + @JsonProperty("token_dialect") public Optional getTokenDialect() { return tokenDialect; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") public OptionalNullable getTokenEncryption() { @@ -251,6 +288,14 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") public OptionalNullable> getAuthorizationDetails() { @@ -291,6 +336,26 @@ public Optional getClientId() { return clientId; } + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -321,6 +386,12 @@ private OptionalNullable _getAuthorizationPol return authorizationPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -347,14 +418,19 @@ private boolean equalTo(ResourceServer other) { && tokenLifetime.equals(other.tokenLifetime) && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) && enforcePolicies.equals(other.enforcePolicies) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) && tokenDialect.equals(other.tokenDialect) + && accessToken.equals(other.accessToken) && tokenEncryption.equals(other.tokenEncryption) && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) && authorizationPolicy.equals(other.authorizationPolicy) - && clientId.equals(other.clientId); + && clientId.equals(other.clientId) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); } @java.lang.Override @@ -374,14 +450,19 @@ public int hashCode() { this.tokenLifetime, this.tokenLifetimeForWeb, this.enforcePolicies, + this.tokenLifetimeForAnonymousAccessTokens, this.tokenDialect, + this.accessToken, this.tokenEncryption, this.consentPolicy, + this.requireConsentNonRepudiation, this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, this.authorizationPolicy, - this.clientId); + this.clientId, + this.agentSubjectClaims, + this.type); } @java.lang.Override @@ -423,12 +504,18 @@ public static final class Builder { private Optional enforcePolicies = Optional.empty(); + private Optional tokenLifetimeForAnonymousAccessTokens = Optional.empty(); + private Optional tokenDialect = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable tokenEncryption = OptionalNullable.absent(); private OptionalNullable consentPolicy = OptionalNullable.absent(); + private Optional requireConsentNonRepudiation = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -439,6 +526,10 @@ public static final class Builder { private Optional clientId = Optional.empty(); + private Optional agentSubjectClaims = Optional.empty(); + + private OptionalNullable type = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -459,14 +550,19 @@ public Builder from(ResourceServer other) { tokenLifetime(other.getTokenLifetime()); tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); enforcePolicies(other.getEnforcePolicies()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); tokenDialect(other.getTokenDialect()); + accessToken(other.getAccessToken()); tokenEncryption(other.getTokenEncryption()); consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); return this; } @@ -666,6 +762,20 @@ public Builder enforcePolicies(Boolean enforcePolicies) { return this; } + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_anonymous_access_tokens", nulls = Nulls.SKIP) + public Builder tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = Optional.ofNullable(tokenLifetimeForAnonymousAccessTokens); + return this; + } + @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) public Builder tokenDialect(Optional tokenDialect) { this.tokenDialect = tokenDialect; @@ -677,6 +787,37 @@ public Builder tokenDialect(ResourceServerTokenDialectResponseEnum tokenDialect) return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) public Builder tokenEncryption(@Nullable OptionalNullable tokenEncryption) { this.tokenEncryption = tokenEncryption; @@ -741,6 +882,20 @@ public Builder consentPolicy( return this; } + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public Builder requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + + public Builder requireConsentNonRepudiation(Boolean requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = Optional.ofNullable(requireConsentNonRepudiation); + return this; + } + @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; @@ -864,6 +1019,48 @@ public Builder clientId(String clientId) { return this; } + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public Builder agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + + public Builder agentSubjectClaims(ResourceServerAgentSubjectClaimsResponseEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + public ResourceServer build() { return new ResourceServer( id, @@ -880,14 +1077,19 @@ public ResourceServer build() { tokenLifetime, tokenLifetimeForWeb, enforcePolicies, + tokenLifetimeForAnonymousAccessTokens, tokenDialect, + accessToken, tokenEncryption, consentPolicy, + requireConsentNonRepudiation, authorizationDetails, proofOfPossession, subjectTypeAuthorization, authorizationPolicy, clientId, + agentSubjectClaims, + type, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessToken.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessToken.java new file mode 100644 index 00000000..00118fce --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessToken.java @@ -0,0 +1,106 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ResourceServerAccessToken.Builder.class) +public final class ResourceServerAccessToken { + private final Optional claimsMapping; + + private final Map additionalProperties; + + private ResourceServerAccessToken( + Optional claimsMapping, Map additionalProperties) { + this.claimsMapping = claimsMapping; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("claims_mapping") + public Optional getClaimsMapping() { + return claimsMapping; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ResourceServerAccessToken && equalTo((ResourceServerAccessToken) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ResourceServerAccessToken other) { + return claimsMapping.equals(other.claimsMapping); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.claimsMapping); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional claimsMapping = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ResourceServerAccessToken other) { + claimsMapping(other.getClaimsMapping()); + return this; + } + + @JsonSetter(value = "claims_mapping", nulls = Nulls.SKIP) + public Builder claimsMapping(Optional claimsMapping) { + this.claimsMapping = claimsMapping; + return this; + } + + public Builder claimsMapping(ResourceServerAccessTokenClaimsMapping claimsMapping) { + this.claimsMapping = Optional.ofNullable(claimsMapping); + return this; + } + + public ResourceServerAccessToken build() { + return new ResourceServerAccessToken(claimsMapping, 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/ResourceServerAccessTokenClaimsMapping.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessTokenClaimsMapping.java new file mode 100644 index 00000000..1b58979a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessTokenClaimsMapping.java @@ -0,0 +1,109 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ResourceServerAccessTokenClaimsMapping.Builder.class) +public final class ResourceServerAccessTokenClaimsMapping { + private final Optional> customClaims; + + private final Map additionalProperties; + + private ResourceServerAccessTokenClaimsMapping( + Optional> customClaims, + Map additionalProperties) { + this.customClaims = customClaims; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("custom_claims") + public Optional> getCustomClaims() { + return customClaims; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ResourceServerAccessTokenClaimsMapping + && equalTo((ResourceServerAccessTokenClaimsMapping) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ResourceServerAccessTokenClaimsMapping other) { + return customClaims.equals(other.customClaims); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.customClaims); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> customClaims = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ResourceServerAccessTokenClaimsMapping other) { + customClaims(other.getCustomClaims()); + return this; + } + + @JsonSetter(value = "custom_claims", nulls = Nulls.SKIP) + public Builder customClaims(Optional> customClaims) { + this.customClaims = customClaims; + return this; + } + + public Builder customClaims(List customClaims) { + this.customClaims = Optional.ofNullable(customClaims); + return this; + } + + public ResourceServerAccessTokenClaimsMapping build() { + return new ResourceServerAccessTokenClaimsMapping(customClaims, 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/ResourceServerAccessTokenCustomClaimsMappingRule.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessTokenCustomClaimsMappingRule.java new file mode 100644 index 00000000..0b06fcae --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAccessTokenCustomClaimsMappingRule.java @@ -0,0 +1,162 @@ +/** + * 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 = ResourceServerAccessTokenCustomClaimsMappingRule.Builder.class) +public final class ResourceServerAccessTokenCustomClaimsMappingRule { + private final String name; + + private final String expression; + + private final Map additionalProperties; + + private ResourceServerAccessTokenCustomClaimsMappingRule( + String name, String expression, Map additionalProperties) { + this.name = name; + this.expression = expression; + this.additionalProperties = additionalProperties; + } + + /** + * @return The access-token claim name to emit, stored with the casing you provide. Reserved OIDC/JWT claim names are not allowed (compared case-insensitively). + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Restricted dot-path expression read from the anonymous-session context (e.g. anonymous_session.metadata.country). + */ + @JsonProperty("expression") + public String getExpression() { + return expression; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ResourceServerAccessTokenCustomClaimsMappingRule + && equalTo((ResourceServerAccessTokenCustomClaimsMappingRule) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ResourceServerAccessTokenCustomClaimsMappingRule other) { + return name.equals(other.name) && expression.equals(other.expression); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.expression); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

                                                              The access-token claim name to emit, stored with the casing you provide. Reserved OIDC/JWT claim names are not allowed (compared case-insensitively).

                                                              + */ + ExpressionStage name(@NotNull String name); + + Builder from(ResourceServerAccessTokenCustomClaimsMappingRule other); + } + + public interface ExpressionStage { + /** + *

                                                              Restricted dot-path expression read from the anonymous-session context (e.g. anonymous_session.metadata.country).

                                                              + */ + _FinalStage expression(@NotNull String expression); + } + + public interface _FinalStage { + ResourceServerAccessTokenCustomClaimsMappingRule build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, ExpressionStage, _FinalStage { + private String name; + + private String expression; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ResourceServerAccessTokenCustomClaimsMappingRule other) { + name(other.getName()); + expression(other.getExpression()); + return this; + } + + /** + *

                                                              The access-token claim name to emit, stored with the casing you provide. Reserved OIDC/JWT claim names are not allowed (compared case-insensitively).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public ExpressionStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Restricted dot-path expression read from the anonymous-session context (e.g. anonymous_session.metadata.country).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("expression") + public _FinalStage expression(@NotNull String expression) { + this.expression = Objects.requireNonNull(expression, "expression must not be null"); + return this; + } + + @java.lang.Override + public ResourceServerAccessTokenCustomClaimsMappingRule build() { + return new ResourceServerAccessTokenCustomClaimsMappingRule(name, expression, 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/ResourceServerAgentSubjectClaimsResponseEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAgentSubjectClaimsResponseEnum.java new file mode 100644 index 00000000..58d6745d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAgentSubjectClaimsResponseEnum.java @@ -0,0 +1,86 @@ +/** + * 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 ResourceServerAgentSubjectClaimsResponseEnum { + public static final ResourceServerAgentSubjectClaimsResponseEnum AUTH0V1 = + new ResourceServerAgentSubjectClaimsResponseEnum(Value.AUTH0V1, "auth0-v1"); + + public static final ResourceServerAgentSubjectClaimsResponseEnum OFF = + new ResourceServerAgentSubjectClaimsResponseEnum(Value.OFF, "off"); + + private final Value value; + + private final String string; + + ResourceServerAgentSubjectClaimsResponseEnum(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 ResourceServerAgentSubjectClaimsResponseEnum + && this.string.equals(((ResourceServerAgentSubjectClaimsResponseEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0V1: + return visitor.visitAuth0V1(); + case OFF: + return visitor.visitOff(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ResourceServerAgentSubjectClaimsResponseEnum valueOf(String value) { + switch (value) { + case "auth0-v1": + return AUTH0V1; + case "off": + return OFF; + default: + return new ResourceServerAgentSubjectClaimsResponseEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OFF, + + AUTH0V1, + + UNKNOWN + } + + public interface Visitor { + T visitOff(); + + T visitAuth0V1(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerAgentSubjectClaimsSchemaEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAgentSubjectClaimsSchemaEnum.java new file mode 100644 index 00000000..28646a50 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAgentSubjectClaimsSchemaEnum.java @@ -0,0 +1,86 @@ +/** + * 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 ResourceServerAgentSubjectClaimsSchemaEnum { + public static final ResourceServerAgentSubjectClaimsSchemaEnum AUTH0V1 = + new ResourceServerAgentSubjectClaimsSchemaEnum(Value.AUTH0V1, "auth0-v1"); + + public static final ResourceServerAgentSubjectClaimsSchemaEnum OFF = + new ResourceServerAgentSubjectClaimsSchemaEnum(Value.OFF, "off"); + + private final Value value; + + private final String string; + + ResourceServerAgentSubjectClaimsSchemaEnum(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 ResourceServerAgentSubjectClaimsSchemaEnum + && this.string.equals(((ResourceServerAgentSubjectClaimsSchemaEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0V1: + return visitor.visitAuth0V1(); + case OFF: + return visitor.visitOff(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ResourceServerAgentSubjectClaimsSchemaEnum valueOf(String value) { + switch (value) { + case "auth0-v1": + return AUTH0V1; + case "off": + return OFF; + default: + return new ResourceServerAgentSubjectClaimsSchemaEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + OFF, + + AUTH0V1, + + UNKNOWN + } + + public interface Visitor { + T visitOff(); + + T visitAuth0V1(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java index 5613c7ee..6d3ca947 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerAuthorizationPolicy.java @@ -98,7 +98,6 @@ public Builder from(ResourceServerAuthorizationPolicy other) { } /** - *

                                                              The ID of the authorization policy to apply.

                                                              *

                                                              The ID of the authorization policy to apply.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java index b3f8e753..946fc4d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java @@ -141,7 +141,6 @@ public RequiredStage mechanism(@NotNull ResourceServerProofOfPossessionMechanism } /** - *

                                                              Whether the use of Proof-of-Possession is required for the resource server

                                                              *

                                                              Whether the use of Proof-of-Possession is required for the resource server

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java index 625eb5f7..decf9e69 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java @@ -121,7 +121,6 @@ public Builder from(ResourceServerScope other) { } /** - *

                                                              Value of this scope.

                                                              *

                                                              Value of this scope.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSearchResponse.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSearchResponse.java new file mode 100644 index 00000000..98eb6b05 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSearchResponse.java @@ -0,0 +1,1074 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ResourceServerSearchResponse.Builder.class) +public final class ResourceServerSearchResponse { + private final Optional id; + + private final Optional name; + + private final Optional isSystem; + + private final Optional identifier; + + private final Optional> scopes; + + private final Optional signingAlg; + + private final Optional allowOfflineAccess; + + private final Optional allowOnlineAccess; + + private final Optional allowOnlineAccessWithEphemeralSessions; + + private final Optional skipConsentForVerifiableFirstPartyClients; + + private final Optional tokenLifetime; + + private final Optional tokenLifetimeForWeb; + + private final Optional enforcePolicies; + + private final Optional tokenLifetimeForAnonymousAccessTokens; + + private final Optional tokenDialect; + + private final OptionalNullable accessToken; + + private final OptionalNullable tokenEncryption; + + private final OptionalNullable consentPolicy; + + private final Optional requireConsentNonRepudiation; + + private final OptionalNullable> authorizationDetails; + + private final OptionalNullable proofOfPossession; + + private final Optional subjectTypeAuthorization; + + private final OptionalNullable authorizationPolicy; + + private final Optional clientId; + + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + + private final Map additionalProperties; + + private ResourceServerSearchResponse( + Optional id, + Optional name, + Optional isSystem, + Optional identifier, + Optional> scopes, + Optional signingAlg, + Optional allowOfflineAccess, + Optional allowOnlineAccess, + Optional allowOnlineAccessWithEphemeralSessions, + Optional skipConsentForVerifiableFirstPartyClients, + Optional tokenLifetime, + Optional tokenLifetimeForWeb, + Optional enforcePolicies, + Optional tokenLifetimeForAnonymousAccessTokens, + Optional tokenDialect, + OptionalNullable accessToken, + OptionalNullable tokenEncryption, + OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, + OptionalNullable> authorizationDetails, + OptionalNullable proofOfPossession, + Optional subjectTypeAuthorization, + OptionalNullable authorizationPolicy, + Optional clientId, + Optional agentSubjectClaims, + OptionalNullable type, + Map additionalProperties) { + this.id = id; + this.name = name; + this.isSystem = isSystem; + this.identifier = identifier; + this.scopes = scopes; + this.signingAlg = signingAlg; + this.allowOfflineAccess = allowOfflineAccess; + this.allowOnlineAccess = allowOnlineAccess; + this.allowOnlineAccessWithEphemeralSessions = allowOnlineAccessWithEphemeralSessions; + this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; + this.tokenLifetime = tokenLifetime; + this.tokenLifetimeForWeb = tokenLifetimeForWeb; + this.enforcePolicies = enforcePolicies; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + this.tokenDialect = tokenDialect; + this.accessToken = accessToken; + this.tokenEncryption = tokenEncryption; + this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + this.authorizationDetails = authorizationDetails; + this.proofOfPossession = proofOfPossession; + this.subjectTypeAuthorization = subjectTypeAuthorization; + this.authorizationPolicy = authorizationPolicy; + this.clientId = clientId; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of the API (resource server). + */ + @JsonProperty("id") + public Optional getId() { + return id; + } + + /** + * @return Friendly name for this resource server. Can not contain < or > characters. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Whether this is an Auth0 system API (true) or a custom API (false). + */ + @JsonProperty("is_system") + public Optional getIsSystem() { + return isSystem; + } + + /** + * @return Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set. + */ + @JsonProperty("identifier") + public Optional getIdentifier() { + return identifier; + } + + /** + * @return List of permissions (scopes) that this API uses. + */ + @JsonProperty("scopes") + public Optional> getScopes() { + return scopes; + } + + @JsonProperty("signing_alg") + public Optional getSigningAlg() { + return signingAlg; + } + + /** + * @return Whether refresh tokens can be issued for this API (true) or not (false). + */ + @JsonProperty("allow_offline_access") + public Optional getAllowOfflineAccess() { + return allowOfflineAccess; + } + + /** + * @return Whether Online Refresh Tokens can be issued for this API (true) or not (false). + */ + @JsonProperty("allow_online_access") + public Optional getAllowOnlineAccess() { + return allowOnlineAccess; + } + + /** + * @return Whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral (true) or not (false). + */ + @JsonProperty("allow_online_access_with_ephemeral_sessions") + public Optional getAllowOnlineAccessWithEphemeralSessions() { + return allowOnlineAccessWithEphemeralSessions; + } + + /** + * @return Whether to skip user consent for applications flagged as first party (true) or not (false). + */ + @JsonProperty("skip_consent_for_verifiable_first_party_clients") + public Optional getSkipConsentForVerifiableFirstPartyClients() { + return skipConsentForVerifiableFirstPartyClients; + } + + /** + * @return Expiration value (in seconds) for access tokens issued for this API from the token endpoint. + */ + @JsonProperty("token_lifetime") + public Optional getTokenLifetime() { + return tokenLifetime; + } + + /** + * @return Expiration value (in seconds) for access tokens issued for this API via Implicit or Hybrid Flows. Cannot be greater than the token_lifetime value. + */ + @JsonProperty("token_lifetime_for_web") + public Optional getTokenLifetimeForWeb() { + return tokenLifetimeForWeb; + } + + /** + * @return Whether authorization polices are enforced (true) or unenforced (false). + */ + @JsonProperty("enforce_policies") + public Optional getEnforcePolicies() { + return enforcePolicies; + } + + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public Optional getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + + @JsonProperty("token_dialect") + public Optional getTokenDialect() { + return tokenDialect; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_encryption") + public OptionalNullable getTokenEncryption() { + if (tokenEncryption == null) { + return OptionalNullable.absent(); + } + return tokenEncryption; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consent_policy") + public OptionalNullable getConsentPolicy() { + if (consentPolicy == null) { + return OptionalNullable.absent(); + } + return consentPolicy; + } + + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + public OptionalNullable> getAuthorizationDetails() { + if (authorizationDetails == null) { + return OptionalNullable.absent(); + } + return authorizationDetails; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("proof_of_possession") + public OptionalNullable getProofOfPossession() { + if (proofOfPossession == null) { + return OptionalNullable.absent(); + } + return proofOfPossession; + } + + @JsonProperty("subject_type_authorization") + public Optional getSubjectTypeAuthorization() { + return subjectTypeAuthorization; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + public OptionalNullable getAuthorizationPolicy() { + if (authorizationPolicy == null) { + return OptionalNullable.absent(); + } + return authorizationPolicy; + } + + /** + * @return The client ID of the client that this resource server is linked to + */ + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_encryption") + private OptionalNullable _getTokenEncryption() { + return tokenEncryption; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("consent_policy") + private OptionalNullable _getConsentPolicy() { + return consentPolicy; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_details") + private OptionalNullable> _getAuthorizationDetails() { + return authorizationDetails; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("proof_of_possession") + private OptionalNullable _getProofOfPossession() { + return proofOfPossession; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("authorization_policy") + private OptionalNullable _getAuthorizationPolicy() { + return authorizationPolicy; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ResourceServerSearchResponse && equalTo((ResourceServerSearchResponse) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ResourceServerSearchResponse other) { + return id.equals(other.id) + && name.equals(other.name) + && isSystem.equals(other.isSystem) + && identifier.equals(other.identifier) + && scopes.equals(other.scopes) + && signingAlg.equals(other.signingAlg) + && allowOfflineAccess.equals(other.allowOfflineAccess) + && allowOnlineAccess.equals(other.allowOnlineAccess) + && allowOnlineAccessWithEphemeralSessions.equals(other.allowOnlineAccessWithEphemeralSessions) + && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) + && tokenLifetime.equals(other.tokenLifetime) + && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) + && enforcePolicies.equals(other.enforcePolicies) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) + && tokenDialect.equals(other.tokenDialect) + && accessToken.equals(other.accessToken) + && tokenEncryption.equals(other.tokenEncryption) + && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) + && authorizationDetails.equals(other.authorizationDetails) + && proofOfPossession.equals(other.proofOfPossession) + && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) + && authorizationPolicy.equals(other.authorizationPolicy) + && clientId.equals(other.clientId) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.isSystem, + this.identifier, + this.scopes, + this.signingAlg, + this.allowOfflineAccess, + this.allowOnlineAccess, + this.allowOnlineAccessWithEphemeralSessions, + this.skipConsentForVerifiableFirstPartyClients, + this.tokenLifetime, + this.tokenLifetimeForWeb, + this.enforcePolicies, + this.tokenLifetimeForAnonymousAccessTokens, + this.tokenDialect, + this.accessToken, + this.tokenEncryption, + this.consentPolicy, + this.requireConsentNonRepudiation, + this.authorizationDetails, + this.proofOfPossession, + this.subjectTypeAuthorization, + this.authorizationPolicy, + this.clientId, + this.agentSubjectClaims, + this.type); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional isSystem = Optional.empty(); + + private Optional identifier = Optional.empty(); + + private Optional> scopes = Optional.empty(); + + private Optional signingAlg = Optional.empty(); + + private Optional allowOfflineAccess = Optional.empty(); + + private Optional allowOnlineAccess = Optional.empty(); + + private Optional allowOnlineAccessWithEphemeralSessions = Optional.empty(); + + private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); + + private Optional tokenLifetime = Optional.empty(); + + private Optional tokenLifetimeForWeb = Optional.empty(); + + private Optional enforcePolicies = Optional.empty(); + + private Optional tokenLifetimeForAnonymousAccessTokens = Optional.empty(); + + private Optional tokenDialect = Optional.empty(); + + private OptionalNullable accessToken = OptionalNullable.absent(); + + private OptionalNullable tokenEncryption = OptionalNullable.absent(); + + private OptionalNullable consentPolicy = OptionalNullable.absent(); + + private Optional requireConsentNonRepudiation = Optional.empty(); + + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); + + private OptionalNullable proofOfPossession = OptionalNullable.absent(); + + private Optional subjectTypeAuthorization = Optional.empty(); + + private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + + private Optional clientId = Optional.empty(); + + private Optional agentSubjectClaims = Optional.empty(); + + private OptionalNullable type = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ResourceServerSearchResponse other) { + id(other.getId()); + name(other.getName()); + isSystem(other.getIsSystem()); + identifier(other.getIdentifier()); + scopes(other.getScopes()); + signingAlg(other.getSigningAlg()); + allowOfflineAccess(other.getAllowOfflineAccess()); + allowOnlineAccess(other.getAllowOnlineAccess()); + allowOnlineAccessWithEphemeralSessions(other.getAllowOnlineAccessWithEphemeralSessions()); + skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); + tokenLifetime(other.getTokenLifetime()); + tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); + enforcePolicies(other.getEnforcePolicies()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); + tokenDialect(other.getTokenDialect()); + accessToken(other.getAccessToken()); + tokenEncryption(other.getTokenEncryption()); + consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); + authorizationDetails(other.getAuthorizationDetails()); + proofOfPossession(other.getProofOfPossession()); + subjectTypeAuthorization(other.getSubjectTypeAuthorization()); + authorizationPolicy(other.getAuthorizationPolicy()); + clientId(other.getClientId()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); + return this; + } + + /** + *

                                                              ID of the API (resource server).

                                                              + */ + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public Builder id(Optional id) { + this.id = id; + return this; + } + + public Builder id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + /** + *

                                                              Friendly name for this resource server. Can not contain < or > characters.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Whether this is an Auth0 system API (true) or a custom API (false).

                                                              + */ + @JsonSetter(value = "is_system", nulls = Nulls.SKIP) + public Builder isSystem(Optional isSystem) { + this.isSystem = isSystem; + return this; + } + + public Builder isSystem(Boolean isSystem) { + this.isSystem = Optional.ofNullable(isSystem); + return this; + } + + /** + *

                                                              Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.

                                                              + */ + @JsonSetter(value = "identifier", nulls = Nulls.SKIP) + public Builder identifier(Optional identifier) { + this.identifier = identifier; + return this; + } + + public Builder identifier(String identifier) { + this.identifier = Optional.ofNullable(identifier); + return this; + } + + /** + *

                                                              List of permissions (scopes) that this API uses.

                                                              + */ + @JsonSetter(value = "scopes", nulls = Nulls.SKIP) + public Builder scopes(Optional> scopes) { + this.scopes = scopes; + return this; + } + + public Builder scopes(List scopes) { + this.scopes = Optional.ofNullable(scopes); + return this; + } + + @JsonSetter(value = "signing_alg", nulls = Nulls.SKIP) + public Builder signingAlg(Optional signingAlg) { + this.signingAlg = signingAlg; + return this; + } + + public Builder signingAlg(SigningAlgorithmEnum signingAlg) { + this.signingAlg = Optional.ofNullable(signingAlg); + return this; + } + + /** + *

                                                              Whether refresh tokens can be issued for this API (true) or not (false).

                                                              + */ + @JsonSetter(value = "allow_offline_access", nulls = Nulls.SKIP) + public Builder allowOfflineAccess(Optional allowOfflineAccess) { + this.allowOfflineAccess = allowOfflineAccess; + return this; + } + + public Builder allowOfflineAccess(Boolean allowOfflineAccess) { + this.allowOfflineAccess = Optional.ofNullable(allowOfflineAccess); + return this; + } + + /** + *

                                                              Whether Online Refresh Tokens can be issued for this API (true) or not (false).

                                                              + */ + @JsonSetter(value = "allow_online_access", nulls = Nulls.SKIP) + public Builder allowOnlineAccess(Optional allowOnlineAccess) { + this.allowOnlineAccess = allowOnlineAccess; + return this; + } + + public Builder allowOnlineAccess(Boolean allowOnlineAccess) { + this.allowOnlineAccess = Optional.ofNullable(allowOnlineAccess); + return this; + } + + /** + *

                                                              Whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral (true) or not (false).

                                                              + */ + @JsonSetter(value = "allow_online_access_with_ephemeral_sessions", nulls = Nulls.SKIP) + public Builder allowOnlineAccessWithEphemeralSessions( + Optional allowOnlineAccessWithEphemeralSessions) { + this.allowOnlineAccessWithEphemeralSessions = allowOnlineAccessWithEphemeralSessions; + return this; + } + + public Builder allowOnlineAccessWithEphemeralSessions(Boolean allowOnlineAccessWithEphemeralSessions) { + this.allowOnlineAccessWithEphemeralSessions = Optional.ofNullable(allowOnlineAccessWithEphemeralSessions); + return this; + } + + /** + *

                                                              Whether to skip user consent for applications flagged as first party (true) or not (false).

                                                              + */ + @JsonSetter(value = "skip_consent_for_verifiable_first_party_clients", nulls = Nulls.SKIP) + public Builder skipConsentForVerifiableFirstPartyClients( + Optional skipConsentForVerifiableFirstPartyClients) { + this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; + return this; + } + + public Builder skipConsentForVerifiableFirstPartyClients(Boolean skipConsentForVerifiableFirstPartyClients) { + this.skipConsentForVerifiableFirstPartyClients = + Optional.ofNullable(skipConsentForVerifiableFirstPartyClients); + return this; + } + + /** + *

                                                              Expiration value (in seconds) for access tokens issued for this API from the token endpoint.

                                                              + */ + @JsonSetter(value = "token_lifetime", nulls = Nulls.SKIP) + public Builder tokenLifetime(Optional tokenLifetime) { + this.tokenLifetime = tokenLifetime; + return this; + } + + public Builder tokenLifetime(Integer tokenLifetime) { + this.tokenLifetime = Optional.ofNullable(tokenLifetime); + return this; + } + + /** + *

                                                              Expiration value (in seconds) for access tokens issued for this API via Implicit or Hybrid Flows. Cannot be greater than the token_lifetime value.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_web", nulls = Nulls.SKIP) + public Builder tokenLifetimeForWeb(Optional tokenLifetimeForWeb) { + this.tokenLifetimeForWeb = tokenLifetimeForWeb; + return this; + } + + public Builder tokenLifetimeForWeb(Integer tokenLifetimeForWeb) { + this.tokenLifetimeForWeb = Optional.ofNullable(tokenLifetimeForWeb); + return this; + } + + /** + *

                                                              Whether authorization polices are enforced (true) or unenforced (false).

                                                              + */ + @JsonSetter(value = "enforce_policies", nulls = Nulls.SKIP) + public Builder enforcePolicies(Optional enforcePolicies) { + this.enforcePolicies = enforcePolicies; + return this; + } + + public Builder enforcePolicies(Boolean enforcePolicies) { + this.enforcePolicies = Optional.ofNullable(enforcePolicies); + return this; + } + + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_anonymous_access_tokens", nulls = Nulls.SKIP) + public Builder tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = Optional.ofNullable(tokenLifetimeForAnonymousAccessTokens); + return this; + } + + @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) + public Builder tokenDialect(Optional tokenDialect) { + this.tokenDialect = tokenDialect; + return this; + } + + public Builder tokenDialect(ResourceServerTokenDialectResponseEnum tokenDialect) { + this.tokenDialect = Optional.ofNullable(tokenDialect); + return this; + } + + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + + @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) + public Builder tokenEncryption(@Nullable OptionalNullable tokenEncryption) { + this.tokenEncryption = tokenEncryption; + return this; + } + + public Builder tokenEncryption(ResourceServerTokenEncryption tokenEncryption) { + this.tokenEncryption = OptionalNullable.of(tokenEncryption); + return this; + } + + public Builder tokenEncryption(Optional tokenEncryption) { + if (tokenEncryption.isPresent()) { + this.tokenEncryption = OptionalNullable.of(tokenEncryption.get()); + } else { + this.tokenEncryption = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenEncryption( + com.auth0.client.mgmt.core.Nullable tokenEncryption) { + if (tokenEncryption.isNull()) { + this.tokenEncryption = OptionalNullable.ofNull(); + } else if (tokenEncryption.isEmpty()) { + this.tokenEncryption = OptionalNullable.absent(); + } else { + this.tokenEncryption = OptionalNullable.of(tokenEncryption.get()); + } + return this; + } + + @JsonSetter(value = "consent_policy", nulls = Nulls.SKIP) + public Builder consentPolicy(@Nullable OptionalNullable consentPolicy) { + this.consentPolicy = consentPolicy; + return this; + } + + public Builder consentPolicy(ResourceServerConsentPolicyEnum consentPolicy) { + this.consentPolicy = OptionalNullable.of(consentPolicy); + return this; + } + + public Builder consentPolicy(Optional consentPolicy) { + if (consentPolicy.isPresent()) { + this.consentPolicy = OptionalNullable.of(consentPolicy.get()); + } else { + this.consentPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder consentPolicy( + com.auth0.client.mgmt.core.Nullable consentPolicy) { + if (consentPolicy.isNull()) { + this.consentPolicy = OptionalNullable.ofNull(); + } else if (consentPolicy.isEmpty()) { + this.consentPolicy = OptionalNullable.absent(); + } else { + this.consentPolicy = OptionalNullable.of(consentPolicy.get()); + } + return this; + } + + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public Builder requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + + public Builder requireConsentNonRepudiation(Boolean requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = Optional.ofNullable(requireConsentNonRepudiation); + return this; + } + + @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) + public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { + this.authorizationDetails = authorizationDetails; + return this; + } + + public Builder authorizationDetails(List authorizationDetails) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails); + return this; + } + + public Builder authorizationDetails(Optional> authorizationDetails) { + if (authorizationDetails.isPresent()) { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } else { + this.authorizationDetails = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationDetails(com.auth0.client.mgmt.core.Nullable> authorizationDetails) { + if (authorizationDetails.isNull()) { + this.authorizationDetails = OptionalNullable.ofNull(); + } else if (authorizationDetails.isEmpty()) { + this.authorizationDetails = OptionalNullable.absent(); + } else { + this.authorizationDetails = OptionalNullable.of(authorizationDetails.get()); + } + return this; + } + + @JsonSetter(value = "proof_of_possession", nulls = Nulls.SKIP) + public Builder proofOfPossession( + @Nullable OptionalNullable proofOfPossession) { + this.proofOfPossession = proofOfPossession; + return this; + } + + public Builder proofOfPossession(ResourceServerProofOfPossession proofOfPossession) { + this.proofOfPossession = OptionalNullable.of(proofOfPossession); + return this; + } + + public Builder proofOfPossession(Optional proofOfPossession) { + if (proofOfPossession.isPresent()) { + this.proofOfPossession = OptionalNullable.of(proofOfPossession.get()); + } else { + this.proofOfPossession = OptionalNullable.absent(); + } + return this; + } + + public Builder proofOfPossession( + com.auth0.client.mgmt.core.Nullable proofOfPossession) { + if (proofOfPossession.isNull()) { + this.proofOfPossession = OptionalNullable.ofNull(); + } else if (proofOfPossession.isEmpty()) { + this.proofOfPossession = OptionalNullable.absent(); + } else { + this.proofOfPossession = OptionalNullable.of(proofOfPossession.get()); + } + return this; + } + + @JsonSetter(value = "subject_type_authorization", nulls = Nulls.SKIP) + public Builder subjectTypeAuthorization( + Optional subjectTypeAuthorization) { + this.subjectTypeAuthorization = subjectTypeAuthorization; + return this; + } + + public Builder subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization subjectTypeAuthorization) { + this.subjectTypeAuthorization = Optional.ofNullable(subjectTypeAuthorization); + return this; + } + + @JsonSetter(value = "authorization_policy", nulls = Nulls.SKIP) + public Builder authorizationPolicy( + @Nullable OptionalNullable authorizationPolicy) { + this.authorizationPolicy = authorizationPolicy; + return this; + } + + public Builder authorizationPolicy(ResourceServerAuthorizationPolicy authorizationPolicy) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy); + return this; + } + + public Builder authorizationPolicy(Optional authorizationPolicy) { + if (authorizationPolicy.isPresent()) { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } else { + this.authorizationPolicy = OptionalNullable.absent(); + } + return this; + } + + public Builder authorizationPolicy( + com.auth0.client.mgmt.core.Nullable authorizationPolicy) { + if (authorizationPolicy.isNull()) { + this.authorizationPolicy = OptionalNullable.ofNull(); + } else if (authorizationPolicy.isEmpty()) { + this.authorizationPolicy = OptionalNullable.absent(); + } else { + this.authorizationPolicy = OptionalNullable.of(authorizationPolicy.get()); + } + return this; + } + + /** + *

                                                              The client ID of the client that this resource server is linked to

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public Builder agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + + public Builder agentSubjectClaims(ResourceServerAgentSubjectClaimsResponseEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + + public ResourceServerSearchResponse build() { + return new ResourceServerSearchResponse( + id, + name, + isSystem, + identifier, + scopes, + signingAlg, + allowOfflineAccess, + allowOnlineAccess, + allowOnlineAccessWithEphemeralSessions, + skipConsentForVerifiableFirstPartyClients, + tokenLifetime, + tokenLifetimeForWeb, + enforcePolicies, + tokenLifetimeForAnonymousAccessTokens, + tokenDialect, + accessToken, + tokenEncryption, + consentPolicy, + requireConsentNonRepudiation, + authorizationDetails, + proofOfPossession, + subjectTypeAuthorization, + authorizationPolicy, + clientId, + agentSubjectClaims, + type, + 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/ResourceServerSortFieldEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSortFieldEnum.java new file mode 100644 index 00000000..e3af23f6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSortFieldEnum.java @@ -0,0 +1,96 @@ +/** + * 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 ResourceServerSortFieldEnum { + public static final ResourceServerSortFieldEnum UPDATED_AT = + new ResourceServerSortFieldEnum(Value.UPDATED_AT, "updated_at"); + + public static final ResourceServerSortFieldEnum IDENTIFIER = + new ResourceServerSortFieldEnum(Value.IDENTIFIER, "identifier"); + + public static final ResourceServerSortFieldEnum NAME = new ResourceServerSortFieldEnum(Value.NAME, "name"); + + private final Value value; + + private final String string; + + ResourceServerSortFieldEnum(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 ResourceServerSortFieldEnum + && this.string.equals(((ResourceServerSortFieldEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case UPDATED_AT: + return visitor.visitUpdatedAt(); + case IDENTIFIER: + return visitor.visitIdentifier(); + case NAME: + return visitor.visitName(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ResourceServerSortFieldEnum valueOf(String value) { + switch (value) { + case "updated_at": + return UPDATED_AT; + case "identifier": + return IDENTIFIER; + case "name": + return NAME; + default: + return new ResourceServerSortFieldEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + IDENTIFIER, + + NAME, + + UPDATED_AT, + + UNKNOWN + } + + public interface Visitor { + T visitIdentifier(); + + T visitName(); + + T visitUpdatedAt(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java index cfcde84b..5af4e648 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java @@ -24,14 +24,18 @@ public final class ResourceServerSubjectTypeAuthorization { private final Optional client; + private final Optional anonymousUser; + private final Map additionalProperties; private ResourceServerSubjectTypeAuthorization( Optional user, Optional client, + Optional anonymousUser, Map additionalProperties) { this.user = user; this.client = client; + this.anonymousUser = anonymousUser; this.additionalProperties = additionalProperties; } @@ -45,6 +49,11 @@ public Optional getClient() { return client; } + @JsonProperty("anonymous_user") + public Optional getAnonymousUser() { + return anonymousUser; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -58,12 +67,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ResourceServerSubjectTypeAuthorization other) { - return user.equals(other.user) && client.equals(other.client); + return user.equals(other.user) && client.equals(other.client) && anonymousUser.equals(other.anonymousUser); } @java.lang.Override public int hashCode() { - return Objects.hash(this.user, this.client); + return Objects.hash(this.user, this.client, this.anonymousUser); } @java.lang.Override @@ -81,6 +90,8 @@ public static final class Builder { private Optional client = Optional.empty(); + private Optional anonymousUser = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -89,6 +100,7 @@ private Builder() {} public Builder from(ResourceServerSubjectTypeAuthorization other) { user(other.getUser()); client(other.getClient()); + anonymousUser(other.getAnonymousUser()); return this; } @@ -114,8 +126,19 @@ public Builder client(ResourceServerSubjectTypeAuthorizationClient client) { return this; } + @JsonSetter(value = "anonymous_user", nulls = Nulls.SKIP) + public Builder anonymousUser(Optional anonymousUser) { + this.anonymousUser = anonymousUser; + return this; + } + + public Builder anonymousUser(ResourceServerSubjectTypeAuthorizationAnonymousUser anonymousUser) { + this.anonymousUser = Optional.ofNullable(anonymousUser); + return this; + } + public ResourceServerSubjectTypeAuthorization build() { - return new ResourceServerSubjectTypeAuthorization(user, client, additionalProperties); + return new ResourceServerSubjectTypeAuthorization(user, client, anonymousUser, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationAnonymousUser.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationAnonymousUser.java new file mode 100644 index 00000000..a71d4cca --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationAnonymousUser.java @@ -0,0 +1,108 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ResourceServerSubjectTypeAuthorizationAnonymousUser.Builder.class) +public final class ResourceServerSubjectTypeAuthorizationAnonymousUser { + private final Optional policy; + + private final Map additionalProperties; + + private ResourceServerSubjectTypeAuthorizationAnonymousUser( + Optional policy, + Map additionalProperties) { + this.policy = policy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("policy") + public Optional getPolicy() { + return policy; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ResourceServerSubjectTypeAuthorizationAnonymousUser + && equalTo((ResourceServerSubjectTypeAuthorizationAnonymousUser) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ResourceServerSubjectTypeAuthorizationAnonymousUser other) { + return policy.equals(other.policy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.policy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional policy = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ResourceServerSubjectTypeAuthorizationAnonymousUser other) { + policy(other.getPolicy()); + return this; + } + + @JsonSetter(value = "policy", nulls = Nulls.SKIP) + public Builder policy(Optional policy) { + this.policy = policy; + return this; + } + + public Builder policy(ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum policy) { + this.policy = Optional.ofNullable(policy); + return this; + } + + public ResourceServerSubjectTypeAuthorizationAnonymousUser build() { + return new ResourceServerSubjectTypeAuthorizationAnonymousUser(policy, 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/ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum.java new file mode 100644 index 00000000..f4c259bb --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum.java @@ -0,0 +1,88 @@ +/** + * 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 ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum { + public static final ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum DENY_ALL = + new ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum(Value.DENY_ALL, "deny_all"); + + public static final ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum REQUIRE_CLIENT_GRANT = + new ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum( + Value.REQUIRE_CLIENT_GRANT, "require_client_grant"); + + private final Value value; + + private final String string; + + ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum(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 ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum + && this.string.equals( + ((ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case DENY_ALL: + return visitor.visitDenyAll(); + case REQUIRE_CLIENT_GRANT: + return visitor.visitRequireClientGrant(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum valueOf(String value) { + switch (value) { + case "deny_all": + return DENY_ALL; + case "require_client_grant": + return REQUIRE_CLIENT_GRANT; + default: + return new ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + DENY_ALL, + + REQUIRE_CLIENT_GRANT, + + UNKNOWN + } + + public interface Visitor { + T visitDenyAll(); + + T visitRequireClientGrant(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionKey.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionKey.java index 99f7ba6a..f9bf5c52 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionKey.java +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionKey.java @@ -169,7 +169,6 @@ public PemStage alg(@NotNull ResourceServerTokenEncryptionAlgorithmEnum alg) { } /** - *

                                                              PEM-formatted public key. Must be JSON escaped.

                                                              *

                                                              PEM-formatted public key. Must be JSON escaped.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTypeEnum.java new file mode 100644 index 00000000..7d0408d0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTypeEnum.java @@ -0,0 +1,86 @@ +/** + * 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 ResourceServerTypeEnum { + public static final ResourceServerTypeEnum UNIVERSAL_COMMERCE_PROTOCOL_SERVER = + new ResourceServerTypeEnum(Value.UNIVERSAL_COMMERCE_PROTOCOL_SERVER, "universal_commerce_protocol_server"); + + public static final ResourceServerTypeEnum MODEL_CONTEXT_PROTOCOL_SERVER = + new ResourceServerTypeEnum(Value.MODEL_CONTEXT_PROTOCOL_SERVER, "model_context_protocol_server"); + + private final Value value; + + private final String string; + + ResourceServerTypeEnum(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 ResourceServerTypeEnum + && this.string.equals(((ResourceServerTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case UNIVERSAL_COMMERCE_PROTOCOL_SERVER: + return visitor.visitUniversalCommerceProtocolServer(); + case MODEL_CONTEXT_PROTOCOL_SERVER: + return visitor.visitModelContextProtocolServer(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ResourceServerTypeEnum valueOf(String value) { + switch (value) { + case "universal_commerce_protocol_server": + return UNIVERSAL_COMMERCE_PROTOCOL_SERVER; + case "model_context_protocol_server": + return MODEL_CONTEXT_PROTOCOL_SERVER; + default: + return new ResourceServerTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + UNIVERSAL_COMMERCE_PROTOCOL_SERVER, + + MODEL_CONTEXT_PROTOCOL_SERVER, + + UNKNOWN + } + + public interface Visitor { + T visitUniversalCommerceProtocolServer(); + + T visitModelContextProtocolServer(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java index 166b2049..2d50f32f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java @@ -119,7 +119,6 @@ public Builder from(RevokedSigningKeysResponseContent other) { } /** - *

                                                              Revoked key certificate

                                                              *

                                                              Revoked key certificate

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,7 +130,6 @@ public KidStage cert(@NotNull String cert) { } /** - *

                                                              Revoked key id

                                                              *

                                                              Revoked key id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/Role.java b/src/main/java/com/auth0/client/mgmt/types/Role.java index f0b7d092..bcce495a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/Role.java +++ b/src/main/java/com/auth0/client/mgmt/types/Role.java @@ -26,16 +26,24 @@ public final class Role { private final Optional description; + private final Optional type; + + private final Optional ownerId; + private final Map additionalProperties; private Role( Optional id, Optional name, Optional description, + Optional type, + Optional ownerId, Map additionalProperties) { this.id = id; this.name = name; this.description = description; + this.type = type; + this.ownerId = ownerId; this.additionalProperties = additionalProperties; } @@ -63,6 +71,16 @@ public Optional getDescription() { return description; } + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("owner_id") + public Optional getOwnerId() { + return ownerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -75,12 +93,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(Role other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && ownerId.equals(other.ownerId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.description); + return Objects.hash(this.id, this.name, this.description, this.type, this.ownerId); } @java.lang.Override @@ -100,6 +122,10 @@ public static final class Builder { private Optional description = Optional.empty(); + private Optional type = Optional.empty(); + + private Optional ownerId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -109,6 +135,8 @@ public Builder from(Role other) { id(other.getId()); name(other.getName()); description(other.getDescription()); + type(other.getType()); + ownerId(other.getOwnerId()); return this; } @@ -154,8 +182,30 @@ public Builder description(String description) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(RoleTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) + public Builder ownerId(Optional ownerId) { + this.ownerId = ownerId; + return this; + } + + public Builder ownerId(String ownerId) { + this.ownerId = Optional.ofNullable(ownerId); + return this; + } + public Role build() { - return new Role(id, name, description, additionalProperties); + return new Role(id, name, description, type, ownerId, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/RoleGroup.java b/src/main/java/com/auth0/client/mgmt/types/RoleGroup.java new file mode 100644 index 00000000..15e8a298 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/RoleGroup.java @@ -0,0 +1,578 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = RoleGroup.Builder.class) +public final class RoleGroup { + private final String id; + + private final String name; + + private final Optional externalId; + + private final Optional connectionId; + + private final OptionalNullable organizationId; + + private final Optional tenantName; + + private final OptionalNullable description; + + private final Optional createdAt; + + private final Optional updatedAt; + + private final Map additionalProperties; + + private RoleGroup( + String id, + String name, + Optional externalId, + Optional connectionId, + OptionalNullable organizationId, + Optional tenantName, + OptionalNullable description, + Optional createdAt, + Optional updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.externalId = externalId; + this.connectionId = connectionId; + this.organizationId = organizationId; + this.tenantName = tenantName; + this.description = description; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return Unique identifier for the group (service-generated). + */ + @JsonProperty("id") + public String getId() { + return id; + } + + /** + * @return Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters. + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return External identifier for the group, often used for SCIM synchronization. Max length of 256 characters. + */ + @JsonProperty("external_id") + public Optional getExternalId() { + return externalId; + } + + /** + * @return Identifier for the connection this group belongs to (if a connection group). + */ + @JsonProperty("connection_id") + public Optional getConnectionId() { + return connectionId; + } + + /** + * @return Identifier for the organization this group belongs to (if an organization group). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_id") + public OptionalNullable getOrganizationId() { + if (organizationId == null) { + return OptionalNullable.absent(); + } + return organizationId; + } + + /** + * @return Identifier for the tenant this group belongs to. + */ + @JsonProperty("tenant_name") + public Optional getTenantName() { + return tenantName; + } + + /** + * @return Description of the group. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + /** + * @return Timestamp of when the group was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return Timestamp of when the group was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("organization_id") + private OptionalNullable _getOrganizationId() { + return organizationId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RoleGroup && equalTo((RoleGroup) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(RoleGroup other) { + return id.equals(other.id) + && name.equals(other.name) + && externalId.equals(other.externalId) + && connectionId.equals(other.connectionId) + && organizationId.equals(other.organizationId) + && tenantName.equals(other.tenantName) + && description.equals(other.description) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.externalId, + this.connectionId, + this.organizationId, + this.tenantName, + this.description, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              Unique identifier for the group (service-generated).

                                                              + */ + NameStage id(@NotNull String id); + + Builder from(RoleGroup other); + } + + public interface NameStage { + /** + *

                                                              Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

                                                              + */ + _FinalStage name(@NotNull String name); + } + + public interface _FinalStage { + RoleGroup build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              External identifier for the group, often used for SCIM synchronization. Max length of 256 characters.

                                                              + */ + _FinalStage externalId(Optional externalId); + + _FinalStage externalId(String externalId); + + /** + *

                                                              Identifier for the connection this group belongs to (if a connection group).

                                                              + */ + _FinalStage connectionId(Optional connectionId); + + _FinalStage connectionId(String connectionId); + + /** + *

                                                              Identifier for the organization this group belongs to (if an organization group).

                                                              + */ + _FinalStage organizationId(@Nullable OptionalNullable organizationId); + + _FinalStage organizationId(String organizationId); + + _FinalStage organizationId(Optional organizationId); + + _FinalStage organizationId(com.auth0.client.mgmt.core.Nullable organizationId); + + /** + *

                                                              Identifier for the tenant this group belongs to.

                                                              + */ + _FinalStage tenantName(Optional tenantName); + + _FinalStage tenantName(String tenantName); + + /** + *

                                                              Description of the group.

                                                              + */ + _FinalStage description(@Nullable OptionalNullable description); + + _FinalStage description(String description); + + _FinalStage description(Optional description); + + _FinalStage description(com.auth0.client.mgmt.core.Nullable description); + + /** + *

                                                              Timestamp of when the group was created.

                                                              + */ + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + /** + *

                                                              Timestamp of when the group was last updated.

                                                              + */ + _FinalStage updatedAt(Optional updatedAt); + + _FinalStage updatedAt(OffsetDateTime updatedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, NameStage, _FinalStage { + private String id; + + private String name; + + private Optional updatedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + private Optional tenantName = Optional.empty(); + + private OptionalNullable organizationId = OptionalNullable.absent(); + + private Optional connectionId = Optional.empty(); + + private Optional externalId = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(RoleGroup other) { + id(other.getId()); + name(other.getName()); + externalId(other.getExternalId()); + connectionId(other.getConnectionId()); + organizationId(other.getOrganizationId()); + tenantName(other.getTenantName()); + description(other.getDescription()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

                                                              Unique identifier for the group (service-generated).

                                                              + * @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; + } + + /** + *

                                                              Name of the group. Must be unique within its connection. Must contain between 1 and 128 printable ASCII characters.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + /** + *

                                                              Timestamp of when the group was last updated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + /** + *

                                                              Timestamp of when the group was last updated.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public _FinalStage updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + *

                                                              Timestamp of when the group was created.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              Timestamp of when the group was created.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public _FinalStage createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

                                                              Description of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(com.auth0.client.mgmt.core.Nullable description) { + if (description.isNull()) { + this.description = OptionalNullable.ofNull(); + } else if (description.isEmpty()) { + this.description = OptionalNullable.absent(); + } else { + this.description = OptionalNullable.of(description.get()); + } + return this; + } + + /** + *

                                                              Description of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(Optional description) { + if (description.isPresent()) { + this.description = OptionalNullable.of(description.get()); + } else { + this.description = OptionalNullable.absent(); + } + return this; + } + + /** + *

                                                              Description of the group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(String description) { + this.description = OptionalNullable.of(description); + return this; + } + + /** + *

                                                              Description of the group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(@Nullable OptionalNullable description) { + this.description = description; + return this; + } + + /** + *

                                                              Identifier for the tenant this group belongs to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage tenantName(String tenantName) { + this.tenantName = Optional.ofNullable(tenantName); + return this; + } + + /** + *

                                                              Identifier for the tenant this group belongs to.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "tenant_name", nulls = Nulls.SKIP) + public _FinalStage tenantName(Optional tenantName) { + this.tenantName = tenantName; + return this; + } + + /** + *

                                                              Identifier for the organization this group belongs to (if an organization group).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { + if (organizationId.isNull()) { + this.organizationId = OptionalNullable.ofNull(); + } else if (organizationId.isEmpty()) { + this.organizationId = OptionalNullable.absent(); + } else { + this.organizationId = OptionalNullable.of(organizationId.get()); + } + return this; + } + + /** + *

                                                              Identifier for the organization this group belongs to (if an organization group).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage organizationId(Optional organizationId) { + if (organizationId.isPresent()) { + this.organizationId = OptionalNullable.of(organizationId.get()); + } else { + this.organizationId = OptionalNullable.absent(); + } + return this; + } + + /** + *

                                                              Identifier for the organization this group belongs to (if an organization group).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage organizationId(String organizationId) { + this.organizationId = OptionalNullable.of(organizationId); + return this; + } + + /** + *

                                                              Identifier for the organization this group belongs to (if an organization group).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) + public _FinalStage organizationId(@Nullable OptionalNullable organizationId) { + this.organizationId = organizationId; + return this; + } + + /** + *

                                                              Identifier for the connection this group belongs to (if a connection group).

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage connectionId(String connectionId) { + this.connectionId = Optional.ofNullable(connectionId); + return this; + } + + /** + *

                                                              Identifier for the connection this group belongs to (if a connection group).

                                                              + */ + @java.lang.Override + @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) + public _FinalStage connectionId(Optional connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + *

                                                              External identifier for the group, often used for SCIM synchronization. Max length of 256 characters.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + *

                                                              External identifier for the group, often used for SCIM synchronization. Max length of 256 characters.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; + return this; + } + + @java.lang.Override + public RoleGroup build() { + return new RoleGroup( + id, + name, + externalId, + connectionId, + organizationId, + tenantName, + description, + 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/RoleMember.java b/src/main/java/com/auth0/client/mgmt/types/RoleMember.java new file mode 100644 index 00000000..ce3aa2c6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/RoleMember.java @@ -0,0 +1,203 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = RoleMember.Builder.class) +public final class RoleMember { + private final Optional userId; + + private final Optional picture; + + private final Optional name; + + private final Optional email; + + private final Map additionalProperties; + + private RoleMember( + Optional userId, + Optional picture, + Optional name, + Optional email, + Map additionalProperties) { + this.userId = userId; + this.picture = picture; + this.name = name; + this.email = email; + this.additionalProperties = additionalProperties; + } + + /** + * @return ID of this user. + */ + @JsonProperty("user_id") + public Optional getUserId() { + return userId; + } + + /** + * @return URL to a picture for this user. + */ + @JsonProperty("picture") + public Optional getPicture() { + return picture; + } + + /** + * @return Name of this user. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Email address of this user. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RoleMember && equalTo((RoleMember) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(RoleMember other) { + return userId.equals(other.userId) + && picture.equals(other.picture) + && name.equals(other.name) + && email.equals(other.email); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.userId, this.picture, this.name, this.email); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional userId = Optional.empty(); + + private Optional picture = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional email = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(RoleMember other) { + userId(other.getUserId()); + picture(other.getPicture()); + name(other.getName()); + email(other.getEmail()); + return this; + } + + /** + *

                                                              ID of this user.

                                                              + */ + @JsonSetter(value = "user_id", nulls = Nulls.SKIP) + public Builder userId(Optional userId) { + this.userId = userId; + return this; + } + + public Builder userId(String userId) { + this.userId = Optional.ofNullable(userId); + return this; + } + + /** + *

                                                              URL to a picture for this user.

                                                              + */ + @JsonSetter(value = "picture", nulls = Nulls.SKIP) + public Builder picture(Optional picture) { + this.picture = picture; + return this; + } + + public Builder picture(String picture) { + this.picture = Optional.ofNullable(picture); + return this; + } + + /** + *

                                                              Name of this user.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Email address of this user.

                                                              + */ + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public Builder email(Optional email) { + this.email = email; + return this; + } + + public Builder email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + public RoleMember build() { + return new RoleMember(userId, picture, name, email, 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/RoleTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/RoleTypeEnum.java new file mode 100644 index 00000000..e64e43fc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/RoleTypeEnum.java @@ -0,0 +1,82 @@ +/** + * 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 RoleTypeEnum { + public static final RoleTypeEnum TENANT = new RoleTypeEnum(Value.TENANT, "tenant"); + + public static final RoleTypeEnum ORGANIZATION = new RoleTypeEnum(Value.ORGANIZATION, "organization"); + + private final Value value; + + private final String string; + + RoleTypeEnum(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 RoleTypeEnum && this.string.equals(((RoleTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TENANT: + return visitor.visitTenant(); + case ORGANIZATION: + return visitor.visitOrganization(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static RoleTypeEnum valueOf(String value) { + switch (value) { + case "tenant": + return TENANT; + case "organization": + return ORGANIZATION; + default: + return new RoleTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + TENANT, + + ORGANIZATION, + + UNKNOWN + } + + public interface Visitor { + T visitTenant(); + + T visitOrganization(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java index d13d3585..ab55fc7a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,6 +27,10 @@ public final class RotateClientSecretResponseContent { private final Optional clientId; + private final Optional createdAt; + + private final Optional updatedAt; + private final Optional tenant; private final Optional name; @@ -132,10 +137,22 @@ public final class RotateClientSecretResponseContent { private final Optional expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional googleAccountLinking; + + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional thirdPartySecurityMode; + private final Optional oidcSupport; + private final Optional redirectionPolicy; private final Optional resourceServerIdentifier; @@ -146,6 +163,10 @@ public final class RotateClientSecretResponseContent { private final Optional externalMetadataCreatedBy; + private final Optional externalMetadataStatus; + + private final Optional agentId; + private final Optional externalClientId; private final Optional jwksUri; @@ -154,6 +175,8 @@ public final class RotateClientSecretResponseContent { private RotateClientSecretResponseContent( Optional clientId, + Optional createdAt, + Optional updatedAt, Optional tenant, Optional name, Optional description, @@ -207,17 +230,27 @@ private RotateClientSecretResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional b2BIntegrationConfiguration, Optional myOrganizationConfiguration, + Optional googleAccountLinking, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional thirdPartySecurityMode, + Optional oidcSupport, Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, Optional externalMetadataCreatedBy, + Optional externalMetadataStatus, + Optional agentId, Optional externalClientId, Optional jwksUri, Map additionalProperties) { this.clientId = clientId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; this.tenant = tenant; this.name = name; this.description = description; @@ -271,13 +304,21 @@ private RotateClientSecretResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.thirdPartySecurityMode = thirdPartySecurityMode; + this.oidcSupport = oidcSupport; this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.externalMetadataStatus = externalMetadataStatus; + this.agentId = agentId; this.externalClientId = externalClientId; this.jwksUri = jwksUri; this.additionalProperties = additionalProperties; @@ -291,6 +332,22 @@ public Optional getClientId() { return clientId; } + /** + * @return The ISO 8601 timestamp of when this client was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp of when this client was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + /** * @return Name of the tenant this client belongs to. */ @@ -680,16 +737,46 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonProperty("my_organization_configuration") public Optional getMyOrganizationConfiguration() { return myOrganizationConfiguration; } + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + @JsonProperty("third_party_security_mode") public Optional getThirdPartySecurityMode() { return thirdPartySecurityMode; } + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + @JsonProperty("redirection_policy") public Optional getRedirectionPolicy() { return redirectionPolicy; @@ -718,6 +805,19 @@ public Optional getExternalMetadataCreatedB return externalMetadataCreatedBy; } + @JsonProperty("external_metadata_status") + public Optional getExternalMetadataStatus() { + return externalMetadataStatus; + } + + /** + * @return ID of the agent associated with this client. + */ + @JsonProperty("agent_id") + public Optional getAgentId() { + return agentId; + } + /** * @return An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers. */ @@ -795,6 +895,8 @@ public Map getAdditionalProperties() { private boolean equalTo(RotateClientSecretResponseContent other) { return clientId.equals(other.clientId) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) && tenant.equals(other.tenant) && name.equals(other.name) && description.equals(other.description) @@ -849,13 +951,21 @@ private boolean equalTo(RotateClientSecretResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && oidcSupport.equals(other.oidcSupport) && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) + && externalMetadataStatus.equals(other.externalMetadataStatus) + && agentId.equals(other.agentId) && externalClientId.equals(other.externalClientId) && jwksUri.equals(other.jwksUri); } @@ -864,6 +974,8 @@ private boolean equalTo(RotateClientSecretResponseContent other) { public int hashCode() { return Objects.hash( this.clientId, + this.createdAt, + this.updatedAt, this.tenant, this.name, this.description, @@ -917,13 +1029,21 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, + this.googleAccountLinking, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.thirdPartySecurityMode, + this.oidcSupport, this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, this.externalMetadataCreatedBy, + this.externalMetadataStatus, + this.agentId, this.externalClientId, this.jwksUri); } @@ -941,6 +1061,10 @@ public static Builder builder() { public static final class Builder { private Optional clientId = Optional.empty(); + private Optional createdAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + private Optional tenant = Optional.empty(); private Optional name = Optional.empty(); @@ -1048,10 +1172,23 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional googleAccountLinking = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + private Optional thirdPartySecurityMode = Optional.empty(); + private Optional oidcSupport = Optional.empty(); + private Optional redirectionPolicy = Optional.empty(); private Optional resourceServerIdentifier = Optional.empty(); @@ -1063,6 +1200,10 @@ public static final class Builder { private Optional externalMetadataCreatedBy = Optional.empty(); + private Optional externalMetadataStatus = Optional.empty(); + + private Optional agentId = Optional.empty(); + private Optional externalClientId = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -1074,6 +1215,8 @@ private Builder() {} public Builder from(RotateClientSecretResponseContent other) { clientId(other.getClientId()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); tenant(other.getTenant()); name(other.getName()); description(other.getDescription()); @@ -1127,13 +1270,21 @@ public Builder from(RotateClientSecretResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); + oidcSupport(other.getOidcSupport()); redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + externalMetadataStatus(other.getExternalMetadataStatus()); + agentId(other.getAgentId()); externalClientId(other.getExternalClientId()); jwksUri(other.getJwksUri()); return this; @@ -1153,6 +1304,34 @@ public Builder clientId(String clientId) { return this; } + /** + *

                                                              The ISO 8601 timestamp of when this client was created.

                                                              + */ + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public Builder createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was last updated.

                                                              + */ + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public Builder updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + /** *

                                                              Name of the tenant this client belongs to.

                                                              */ @@ -2000,6 +2179,17 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) public Builder myOrganizationConfiguration( Optional myOrganizationConfiguration) { @@ -2013,6 +2203,55 @@ public Builder myOrganizationConfiguration( return this; } + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking(Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfiguration googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + IdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(AnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { this.thirdPartySecurityMode = thirdPartySecurityMode; @@ -2024,6 +2263,17 @@ public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPart return this; } + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) public Builder redirectionPolicy(Optional redirectionPolicy) { this.redirectionPolicy = redirectionPolicy; @@ -2085,6 +2335,31 @@ public Builder externalMetadataCreatedBy(ClientExternalMetadataCreatedByEnum ext return this; } + @JsonSetter(value = "external_metadata_status", nulls = Nulls.SKIP) + public Builder externalMetadataStatus(Optional externalMetadataStatus) { + this.externalMetadataStatus = externalMetadataStatus; + return this; + } + + public Builder externalMetadataStatus(ClientExternalMetadataStatusEnum externalMetadataStatus) { + this.externalMetadataStatus = Optional.ofNullable(externalMetadataStatus); + return this; + } + + /** + *

                                                              ID of the agent associated with this client.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(Optional agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = Optional.ofNullable(agentId); + return this; + } + /** *

                                                              An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers.

                                                              */ @@ -2116,6 +2391,8 @@ public Builder jwksUri(String jwksUri) { public RotateClientSecretResponseContent build() { return new RotateClientSecretResponseContent( clientId, + createdAt, + updatedAt, tenant, name, description, @@ -2169,13 +2446,21 @@ public RotateClientSecretResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, thirdPartySecurityMode, + oidcSupport, redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, externalMetadataCreatedBy, + externalMetadataStatus, + agentId, externalClientId, jwksUri, additionalProperties); diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysRequestContent.java index 7bccf4e5..3defd7c4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysRequestContent.java @@ -20,16 +20,29 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RotateConnectionKeysRequestContent.Builder.class) public final class RotateConnectionKeysRequestContent { + private final Optional keyUse; + private final Optional signingAlg; private final Map additionalProperties; private RotateConnectionKeysRequestContent( - Optional signingAlg, Map additionalProperties) { + Optional keyUse, + Optional signingAlg, + Map additionalProperties) { + this.keyUse = keyUse; this.signingAlg = signingAlg; this.additionalProperties = additionalProperties; } + /** + * @return Whether to rotate the signing key (default) or the encryption key for the connection. + */ + @JsonProperty("key_use") + public Optional getKeyUse() { + return keyUse; + } + @JsonProperty("signing_alg") public Optional getSigningAlg() { return signingAlg; @@ -48,12 +61,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(RotateConnectionKeysRequestContent other) { - return signingAlg.equals(other.signingAlg); + return keyUse.equals(other.keyUse) && signingAlg.equals(other.signingAlg); } @java.lang.Override public int hashCode() { - return Objects.hash(this.signingAlg); + return Objects.hash(this.keyUse, this.signingAlg); } @java.lang.Override @@ -67,6 +80,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private Optional keyUse = Optional.empty(); + private Optional signingAlg = Optional.empty(); @JsonAnySetter @@ -75,10 +90,25 @@ public static final class Builder { private Builder() {} public Builder from(RotateConnectionKeysRequestContent other) { + keyUse(other.getKeyUse()); signingAlg(other.getSigningAlg()); return this; } + /** + *

                                                              Whether to rotate the signing key (default) or the encryption key for the connection.

                                                              + */ + @JsonSetter(value = "key_use", nulls = Nulls.SKIP) + public Builder keyUse(Optional keyUse) { + this.keyUse = keyUse; + return this; + } + + public Builder keyUse(ConnectionKeyUseEnum keyUse) { + this.keyUse = Optional.ofNullable(keyUse); + return this; + } + @JsonSetter(value = "signing_alg", nulls = Nulls.SKIP) public Builder signingAlg(Optional signingAlg) { this.signingAlg = signingAlg; @@ -91,7 +121,7 @@ public Builder signingAlg(RotateConnectionKeysSigningAlgEnum signingAlg) { } public RotateConnectionKeysRequestContent build() { - return new RotateConnectionKeysRequestContent(signingAlg, additionalProperties); + return new RotateConnectionKeysRequestContent(keyUse, signingAlg, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java index 816c1a3e..bd17e29d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java @@ -65,7 +65,7 @@ private RotateConnectionsKeysResponseContent( } /** - * @return The key id of the signing key + * @return The key id of the signing or encryption key */ @JsonProperty("kid") public String getKid() { @@ -73,7 +73,7 @@ public String getKid() { } /** - * @return The public certificate of the signing key + * @return The public certificate of the signing or encryption key */ @JsonProperty("cert") public String getCert() { @@ -81,7 +81,7 @@ public String getCert() { } /** - * @return The public certificate of the signing key in pkcs7 format + * @return The public certificate of the signing or encryption key in pkcs7 format */ @JsonProperty("pkcs") public Optional getPkcs() { @@ -113,7 +113,7 @@ public String getThumbprint() { } /** - * @return Signing key algorithm + * @return Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys */ @JsonProperty("algorithm") public Optional getAlgorithm() { @@ -179,7 +179,7 @@ public static KidStage builder() { public interface KidStage { /** - *

                                                              The key id of the signing key

                                                              + *

                                                              The key id of the signing or encryption key

                                                              */ CertStage kid(@NotNull String kid); @@ -188,7 +188,7 @@ public interface KidStage { public interface CertStage { /** - *

                                                              The public certificate of the signing key

                                                              + *

                                                              The public certificate of the signing or encryption key

                                                              */ FingerprintStage cert(@NotNull String cert); } @@ -215,7 +215,7 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              */ _FinalStage pkcs(Optional pkcs); @@ -229,7 +229,7 @@ public interface _FinalStage { _FinalStage next(Boolean next); /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              */ _FinalStage algorithm(Optional algorithm); @@ -284,8 +284,7 @@ public Builder from(RotateConnectionsKeysResponseContent other) { } /** - *

                                                              The key id of the signing key

                                                              - *

                                                              The key id of the signing key

                                                              + *

                                                              The key id of the signing or encryption key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -296,8 +295,7 @@ public CertStage kid(@NotNull String kid) { } /** - *

                                                              The public certificate of the signing key

                                                              - *

                                                              The public certificate of the signing key

                                                              + *

                                                              The public certificate of the signing or encryption key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -308,7 +306,6 @@ public FingerprintStage cert(@NotNull String cert) { } /** - *

                                                              The cert fingerprint

                                                              *

                                                              The cert fingerprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -320,7 +317,6 @@ public ThumbprintStage fingerprint(@NotNull String fingerprint) { } /** - *

                                                              The cert thumbprint

                                                              *

                                                              The cert thumbprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -358,7 +354,7 @@ public _FinalStage keyUse(Optional keyUse) { } /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -368,7 +364,7 @@ public _FinalStage algorithm(String algorithm) { } /** - *

                                                              Signing key algorithm

                                                              + *

                                                              Key algorithm: a signing algorithm for signing keys, or a key-management algorithm for encryption keys

                                                              */ @java.lang.Override @JsonSetter(value = "algorithm", nulls = Nulls.SKIP) @@ -398,7 +394,7 @@ public _FinalStage next(Optional next) { } /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -408,7 +404,7 @@ public _FinalStage pkcs(String pkcs) { } /** - *

                                                              The public certificate of the signing key in pkcs7 format

                                                              + *

                                                              The public certificate of the signing or encryption key in pkcs7 format

                                                              */ @java.lang.Override @JsonSetter(value = "pkcs", nulls = Nulls.SKIP) diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java index 7e410023..bdc6cdee 100644 --- a/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java @@ -119,7 +119,6 @@ public Builder from(RotateSigningKeysResponseContent other) { } /** - *

                                                              Next key certificate

                                                              *

                                                              Next key certificate

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,7 +130,6 @@ public KidStage cert(@NotNull String cert) { } /** - *

                                                              Next key id

                                                              *

                                                              Next key id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ScimConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ScimConfiguration.java index 1b6d6684..939dfbc6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ScimConfiguration.java +++ b/src/main/java/com/auth0/client/mgmt/types/ScimConfiguration.java @@ -283,7 +283,6 @@ public Builder from(ScimConfiguration other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -295,7 +294,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -307,7 +305,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -319,7 +316,6 @@ public TenantNameStage strategy(@NotNull String strategy) { } /** - *

                                                              The tenant's name

                                                              *

                                                              The tenant's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -331,7 +327,6 @@ public UserIdAttributeStage tenantName(@NotNull String tenantName) { } /** - *

                                                              User ID attribute for generating unique user ids

                                                              *

                                                              User ID attribute for generating unique user ids

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -343,7 +338,6 @@ public CreatedAtStage userIdAttribute(@NotNull String userIdAttribute) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -355,7 +349,6 @@ public UpdatedOnStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java index a8b6941c..0047e2b6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java +++ b/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java @@ -132,6 +132,9 @@ public final class ScreenGroupNameEnum { public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT = new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT, "passkey-enrollment"); + public static final ScreenGroupNameEnum CONSENT_TENANT_SCOPES = + new ScreenGroupNameEnum(Value.CONSENT_TENANT_SCOPES, "consent-tenant-scopes"); + public static final ScreenGroupNameEnum ORGANIZATION_PICKER = new ScreenGroupNameEnum(Value.ORGANIZATION_PICKER, "organization-picker"); @@ -156,6 +159,9 @@ public final class ScreenGroupNameEnum { public static final ScreenGroupNameEnum MFA_PHONE_CHALLENGE = new ScreenGroupNameEnum(Value.MFA_PHONE_CHALLENGE, "mfa-phone-challenge"); + public static final ScreenGroupNameEnum PENDING_CONSENT = + new ScreenGroupNameEnum(Value.PENDING_CONSENT, "pending-consent"); + public static final ScreenGroupNameEnum SIGNUP = new ScreenGroupNameEnum(Value.SIGNUP, "signup"); public static final ScreenGroupNameEnum MFA_PUSH_WELCOME = @@ -387,6 +393,8 @@ public T visit(Visitor visitor) { return visitor.visitMfaBeginEnrollOptions(); case PASSKEY_ENROLLMENT: return visitor.visitPasskeyEnrollment(); + case CONSENT_TENANT_SCOPES: + return visitor.visitConsentTenantScopes(); case ORGANIZATION_PICKER: return visitor.visitOrganizationPicker(); case PHONE_IDENTIFIER_CHALLENGE: @@ -403,6 +411,8 @@ public T visit(Visitor visitor) { return visitor.visitResetPasswordEmail(); case MFA_PHONE_CHALLENGE: return visitor.visitMfaPhoneChallenge(); + case PENDING_CONSENT: + return visitor.visitPendingConsent(); case SIGNUP: return visitor.visitSignup(); case MFA_PUSH_WELCOME: @@ -576,6 +586,8 @@ public static ScreenGroupNameEnum valueOf(String value) { return MFA_BEGIN_ENROLL_OPTIONS; case "passkey-enrollment": return PASSKEY_ENROLLMENT; + case "consent-tenant-scopes": + return CONSENT_TENANT_SCOPES; case "organization-picker": return ORGANIZATION_PICKER; case "phone-identifier-challenge": @@ -592,6 +604,8 @@ public static ScreenGroupNameEnum valueOf(String value) { return RESET_PASSWORD_EMAIL; case "mfa-phone-challenge": return MFA_PHONE_CHALLENGE; + case "pending-consent": + return PENDING_CONSENT; case "signup": return SIGNUP; case "mfa-push-welcome": @@ -732,6 +746,10 @@ public enum Value { CONSENT, + CONSENT_TENANT_SCOPES, + + PENDING_CONSENT, + CUSTOMIZED_CONSENT, LOGOUT, @@ -916,6 +934,10 @@ public interface Visitor { T visitConsent(); + T visitConsentTenantScopes(); + + T visitPendingConsent(); + T visitCustomizedConsent(); T visitLogout(); diff --git a/src/main/java/com/auth0/client/mgmt/types/SearchClientGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SearchClientGrantsRequestParameters.java new file mode 100644 index 00000000..253dd593 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchClientGrantsRequestParameters.java @@ -0,0 +1,508 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchClientGrantsRequestParameters.Builder.class) +public final class SearchClientGrantsRequestParameters { + private final OptionalNullable q; + + private final OptionalNullable parser; + + private final OptionalNullable fields; + + private final OptionalNullable includeFields; + + private final OptionalNullable take; + + private final OptionalNullable from; + + private final OptionalNullable sort; + + private final Map additionalProperties; + + private SearchClientGrantsRequestParameters( + OptionalNullable q, + OptionalNullable parser, + OptionalNullable fields, + OptionalNullable includeFields, + OptionalNullable take, + OptionalNullable from, + OptionalNullable sort, + Map additionalProperties) { + this.q = q; + this.parser = parser; + this.fields = fields; + this.includeFields = includeFields; + this.take = take; + this.from = from; + this.sort = sort; + this.additionalProperties = additionalProperties; + } + + /** + * @return Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: audience eq "https://api.example.com", client_id eq "cli_abc", subject_type eq "client", allow_any_organization eq true, default_for eq "third_party_clients", audience co "example" and organization_id eq "org_123". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:
                                                              • audience - Filter by audience (eq, ne, sw, co, ew, pr)
                                                              • client_id - Filter by client ID (eq, ne, sw, pr)
                                                              • subject_type - Filter by subject type (eq, ne, sw, pr)
                                                              • allow_any_organization - Filter by allow_any_organization (eq, ne, pr)
                                                              • organization_id - Filter by organization ID (eq, ne, sw, pr)
                                                              • updated_at - Filter by last update date (eq, ne, gt, ge, lt, le, pr)
                                                              • default_for - Filter by default grant group (eq, ne, sw, pr)
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + public OptionalNullable getQ() { + if (q == null) { + return OptionalNullable.absent(); + } + return q; + } + + /** + * @return Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + public OptionalNullable getParser() { + if (parser == null) { + return OptionalNullable.absent(); + } + return parser; + } + + /** + * @return Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + public OptionalNullable getFields() { + if (fields == null) { + return OptionalNullable.absent(); + } + return fields; + } + + /** + * @return Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + public OptionalNullable getIncludeFields() { + if (includeFields == null) { + return OptionalNullable.absent(); + } + return includeFields; + } + + /** + * @return Maximum number of results to return per page (1-100). Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Cursor for the next page of results. Use the value from the next field in the previous response. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Field name to sort results by in ascending order. Defaults to insertion order (oldest first) if not provided. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + public OptionalNullable getSort() { + if (sort == null) { + return OptionalNullable.absent(); + } + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + private OptionalNullable _getParser() { + return parser; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchClientGrantsRequestParameters + && equalTo((SearchClientGrantsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchClientGrantsRequestParameters other) { + return q.equals(other.q) + && parser.equals(other.parser) + && fields.equals(other.fields) + && includeFields.equals(other.includeFields) + && take.equals(other.take) + && from.equals(other.from) + && sort.equals(other.sort); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.q, this.parser, this.fields, this.includeFields, this.take, this.from, this.sort); + } + + @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 OptionalNullable q = OptionalNullable.absent(); + + private OptionalNullable parser = OptionalNullable.absent(); + + private OptionalNullable fields = OptionalNullable.absent(); + + private OptionalNullable includeFields = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable sort = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchClientGrantsRequestParameters other) { + q(other.getQ()); + parser(other.getParser()); + fields(other.getFields()); + includeFields(other.getIncludeFields()); + take(other.getTake()); + from(other.getFrom()); + sort(other.getSort()); + return this; + } + + /** + *

                                                              Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: audience eq "https://api.example.com", client_id eq "cli_abc", subject_type eq "client", allow_any_organization eq true, default_for eq "third_party_clients", audience co "example" and organization_id eq "org_123". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:

                                                              • audience - Filter by audience (eq, ne, sw, co, ew, pr)
                                                              • client_id - Filter by client ID (eq, ne, sw, pr)
                                                              • subject_type - Filter by subject type (eq, ne, sw, pr)
                                                              • allow_any_organization - Filter by allow_any_organization (eq, ne, pr)
                                                              • organization_id - Filter by organization ID (eq, ne, sw, pr)
                                                              • updated_at - Filter by last update date (eq, ne, gt, ge, lt, le, pr)
                                                              • default_for - Filter by default grant group (eq, ne, sw, pr)
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates.

                                                              + */ + @JsonSetter(value = "q", nulls = Nulls.SKIP) + public Builder q(@Nullable OptionalNullable q) { + this.q = q; + return this; + } + + public Builder q(String q) { + this.q = OptionalNullable.of(q); + return this; + } + + public Builder q(Optional q) { + if (q.isPresent()) { + this.q = OptionalNullable.of(q.get()); + } else { + this.q = OptionalNullable.absent(); + } + return this; + } + + public Builder q(com.auth0.client.mgmt.core.Nullable q) { + if (q.isNull()) { + this.q = OptionalNullable.ofNull(); + } else if (q.isEmpty()) { + this.q = OptionalNullable.absent(); + } else { + this.q = OptionalNullable.of(q.get()); + } + return this; + } + + /** + *

                                                              Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default).

                                                              + */ + @JsonSetter(value = "parser", nulls = Nulls.SKIP) + public Builder parser(@Nullable OptionalNullable parser) { + this.parser = parser; + return this; + } + + public Builder parser(SearchParserEnum parser) { + this.parser = OptionalNullable.of(parser); + return this; + } + + public Builder parser(Optional parser) { + if (parser.isPresent()) { + this.parser = OptionalNullable.of(parser.get()); + } else { + this.parser = OptionalNullable.absent(); + } + return this; + } + + public Builder parser(com.auth0.client.mgmt.core.Nullable parser) { + if (parser.isNull()) { + this.parser = OptionalNullable.ofNull(); + } else if (parser.isEmpty()) { + this.parser = OptionalNullable.absent(); + } else { + this.parser = OptionalNullable.of(parser.get()); + } + return this; + } + + /** + *

                                                              Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode.

                                                              + */ + @JsonSetter(value = "fields", nulls = Nulls.SKIP) + public Builder fields(@Nullable OptionalNullable fields) { + this.fields = fields; + return this; + } + + public Builder fields(String fields) { + this.fields = OptionalNullable.of(fields); + return this; + } + + public Builder fields(Optional fields) { + if (fields.isPresent()) { + this.fields = OptionalNullable.of(fields.get()); + } else { + this.fields = OptionalNullable.absent(); + } + return this; + } + + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { + if (fields.isNull()) { + this.fields = OptionalNullable.ofNull(); + } else if (fields.isEmpty()) { + this.fields = OptionalNullable.absent(); + } else { + this.fields = OptionalNullable.of(fields.get()); + } + return this; + } + + /** + *

                                                              Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified.

                                                              + */ + @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) + public Builder includeFields(@Nullable OptionalNullable includeFields) { + this.includeFields = includeFields; + return this; + } + + public Builder includeFields(Boolean includeFields) { + this.includeFields = OptionalNullable.of(includeFields); + return this; + } + + public Builder includeFields(Optional includeFields) { + if (includeFields.isPresent()) { + this.includeFields = OptionalNullable.of(includeFields.get()); + } else { + this.includeFields = OptionalNullable.absent(); + } + return this; + } + + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { + if (includeFields.isNull()) { + this.includeFields = OptionalNullable.ofNull(); + } else if (includeFields.isEmpty()) { + this.includeFields = OptionalNullable.absent(); + } else { + this.includeFields = OptionalNullable.of(includeFields.get()); + } + return this; + } + + /** + *

                                                              Maximum number of results to return per page (1-100). Defaults to 50.

                                                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + /** + *

                                                              Cursor for the next page of results. Use the value from the next field in the previous response.

                                                              + */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

                                                              Field name to sort results by in ascending order. Defaults to insertion order (oldest first) if not provided.

                                                              + */ + @JsonSetter(value = "sort", nulls = Nulls.SKIP) + public Builder sort(@Nullable OptionalNullable sort) { + this.sort = sort; + return this; + } + + public Builder sort(ClientGrantSortFieldEnum sort) { + this.sort = OptionalNullable.of(sort); + return this; + } + + public Builder sort(Optional sort) { + if (sort.isPresent()) { + this.sort = OptionalNullable.of(sort.get()); + } else { + this.sort = OptionalNullable.absent(); + } + return this; + } + + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { + if (sort.isNull()) { + this.sort = OptionalNullable.ofNull(); + } else if (sort.isEmpty()) { + this.sort = OptionalNullable.absent(); + } else { + this.sort = OptionalNullable.of(sort.get()); + } + return this; + } + + public SearchClientGrantsRequestParameters build() { + return new SearchClientGrantsRequestParameters( + q, parser, fields, includeFields, take, from, sort, 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/SearchClientGrantsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SearchClientGrantsResponseContent.java new file mode 100644 index 00000000..876bae32 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchClientGrantsResponseContent.java @@ -0,0 +1,154 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchClientGrantsResponseContent.Builder.class) +public final class SearchClientGrantsResponseContent { + private final List clientGrants; + + private final Optional next; + + private final Map additionalProperties; + + private SearchClientGrantsResponseContent( + List clientGrants, + Optional next, + Map additionalProperties) { + this.clientGrants = clientGrants; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of client grant objects matching the search criteria. + */ + @JsonProperty("client_grants") + public List getClientGrants() { + return clientGrants; + } + + /** + * @return Cursor for retrieving the next page of results. Omitted if there are no more results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchClientGrantsResponseContent && equalTo((SearchClientGrantsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchClientGrantsResponseContent other) { + return clientGrants.equals(other.clientGrants) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientGrants, this.next); + } + + @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 clientGrants = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchClientGrantsResponseContent other) { + clientGrants(other.getClientGrants()); + next(other.getNext()); + return this; + } + + /** + *

                                                              Array of client grant objects matching the search criteria.

                                                              + */ + @JsonSetter(value = "client_grants", nulls = Nulls.SKIP) + public Builder clientGrants(List clientGrants) { + this.clientGrants.clear(); + if (clientGrants != null) { + this.clientGrants.addAll(clientGrants); + } + return this; + } + + public Builder addClientGrants(ClientGrantResponseContent clientGrants) { + this.clientGrants.add(clientGrants); + return this; + } + + public Builder addAllClientGrants(List clientGrants) { + if (clientGrants != null) { + this.clientGrants.addAll(clientGrants); + } + return this; + } + + /** + *

                                                              Cursor for retrieving the next page of results. Omitted if there are no more results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public SearchClientGrantsResponseContent build() { + return new SearchClientGrantsResponseContent(clientGrants, next, 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/SearchClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SearchClientsRequestParameters.java new file mode 100644 index 00000000..e42d6d88 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchClientsRequestParameters.java @@ -0,0 +1,507 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchClientsRequestParameters.Builder.class) +public final class SearchClientsRequestParameters { + private final OptionalNullable q; + + private final OptionalNullable parser; + + private final OptionalNullable fields; + + private final OptionalNullable includeFields; + + private final OptionalNullable take; + + private final OptionalNullable from; + + private final OptionalNullable sort; + + private final Map additionalProperties; + + private SearchClientsRequestParameters( + OptionalNullable q, + OptionalNullable parser, + OptionalNullable fields, + OptionalNullable includeFields, + OptionalNullable take, + OptionalNullable from, + OptionalNullable sort, + Map additionalProperties) { + this.q = q; + this.parser = parser; + this.fields = fields; + this.includeFields = includeFields; + this.take = take; + this.from = from; + this.sort = sort; + this.additionalProperties = additionalProperties; + } + + /** + * @return Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: name eq "Auth0", name sw "auth" and app_type eq "spa". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:
                                                              • client_id - Auth0 client ID (case-sensitive, exact match)
                                                              • external_client_id - URL of the Client ID Metadata Document (CIMD); case-sensitive, exact match
                                                              • name - Client name (supports contains, starts-with, ends-with operators; sortable)
                                                              • app_type - Application type (e.g. "spa", "native", "non_interactive")
                                                              • is_first_party - Whether the client is first-party (boolean)
                                                              • updated_at - Last update timestamp (supports date range operators; sortable)
                                                              • metadata.{key} - Filter by client metadata key-value pairs (max 2-level key depth, values indexed up to 64 characters)
                                                              • client_grant.organization_id - Filter by associated organization ID
                                                              • client_grant.allow_any_organization - Filter by allow any organization setting
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + public OptionalNullable getQ() { + if (q == null) { + return OptionalNullable.absent(); + } + return q; + } + + /** + * @return Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + public OptionalNullable getParser() { + if (parser == null) { + return OptionalNullable.absent(); + } + return parser; + } + + /** + * @return Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. Maximum 50 fields. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + public OptionalNullable getFields() { + if (fields == null) { + return OptionalNullable.absent(); + } + return fields; + } + + /** + * @return Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + public OptionalNullable getIncludeFields() { + if (includeFields == null) { + return OptionalNullable.absent(); + } + return includeFields; + } + + /** + * @return Maximum number of results to return per page (1-100). Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Cursor for the next page of results. Use the value from the next field in the previous response. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Field name to sort results by in ascending order. Defaults to insertion order (oldest first) if not provided. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + public OptionalNullable getSort() { + if (sort == null) { + return OptionalNullable.absent(); + } + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + private OptionalNullable _getParser() { + return parser; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchClientsRequestParameters && equalTo((SearchClientsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchClientsRequestParameters other) { + return q.equals(other.q) + && parser.equals(other.parser) + && fields.equals(other.fields) + && includeFields.equals(other.includeFields) + && take.equals(other.take) + && from.equals(other.from) + && sort.equals(other.sort); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.q, this.parser, this.fields, this.includeFields, this.take, this.from, this.sort); + } + + @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 OptionalNullable q = OptionalNullable.absent(); + + private OptionalNullable parser = OptionalNullable.absent(); + + private OptionalNullable fields = OptionalNullable.absent(); + + private OptionalNullable includeFields = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable sort = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchClientsRequestParameters other) { + q(other.getQ()); + parser(other.getParser()); + fields(other.getFields()); + includeFields(other.getIncludeFields()); + take(other.getTake()); + from(other.getFrom()); + sort(other.getSort()); + return this; + } + + /** + *

                                                              Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: name eq "Auth0", name sw "auth" and app_type eq "spa". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:

                                                              • client_id - Auth0 client ID (case-sensitive, exact match)
                                                              • external_client_id - URL of the Client ID Metadata Document (CIMD); case-sensitive, exact match
                                                              • name - Client name (supports contains, starts-with, ends-with operators; sortable)
                                                              • app_type - Application type (e.g. "spa", "native", "non_interactive")
                                                              • is_first_party - Whether the client is first-party (boolean)
                                                              • updated_at - Last update timestamp (supports date range operators; sortable)
                                                              • metadata.{key} - Filter by client metadata key-value pairs (max 2-level key depth, values indexed up to 64 characters)
                                                              • client_grant.organization_id - Filter by associated organization ID
                                                              • client_grant.allow_any_organization - Filter by allow any organization setting
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates.

                                                              + */ + @JsonSetter(value = "q", nulls = Nulls.SKIP) + public Builder q(@Nullable OptionalNullable q) { + this.q = q; + return this; + } + + public Builder q(String q) { + this.q = OptionalNullable.of(q); + return this; + } + + public Builder q(Optional q) { + if (q.isPresent()) { + this.q = OptionalNullable.of(q.get()); + } else { + this.q = OptionalNullable.absent(); + } + return this; + } + + public Builder q(com.auth0.client.mgmt.core.Nullable q) { + if (q.isNull()) { + this.q = OptionalNullable.ofNull(); + } else if (q.isEmpty()) { + this.q = OptionalNullable.absent(); + } else { + this.q = OptionalNullable.of(q.get()); + } + return this; + } + + /** + *

                                                              Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default).

                                                              + */ + @JsonSetter(value = "parser", nulls = Nulls.SKIP) + public Builder parser(@Nullable OptionalNullable parser) { + this.parser = parser; + return this; + } + + public Builder parser(SearchParserEnum parser) { + this.parser = OptionalNullable.of(parser); + return this; + } + + public Builder parser(Optional parser) { + if (parser.isPresent()) { + this.parser = OptionalNullable.of(parser.get()); + } else { + this.parser = OptionalNullable.absent(); + } + return this; + } + + public Builder parser(com.auth0.client.mgmt.core.Nullable parser) { + if (parser.isNull()) { + this.parser = OptionalNullable.ofNull(); + } else if (parser.isEmpty()) { + this.parser = OptionalNullable.absent(); + } else { + this.parser = OptionalNullable.of(parser.get()); + } + return this; + } + + /** + *

                                                              Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. Maximum 50 fields.

                                                              + */ + @JsonSetter(value = "fields", nulls = Nulls.SKIP) + public Builder fields(@Nullable OptionalNullable fields) { + this.fields = fields; + return this; + } + + public Builder fields(String fields) { + this.fields = OptionalNullable.of(fields); + return this; + } + + public Builder fields(Optional fields) { + if (fields.isPresent()) { + this.fields = OptionalNullable.of(fields.get()); + } else { + this.fields = OptionalNullable.absent(); + } + return this; + } + + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { + if (fields.isNull()) { + this.fields = OptionalNullable.ofNull(); + } else if (fields.isEmpty()) { + this.fields = OptionalNullable.absent(); + } else { + this.fields = OptionalNullable.of(fields.get()); + } + return this; + } + + /** + *

                                                              Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified.

                                                              + */ + @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) + public Builder includeFields(@Nullable OptionalNullable includeFields) { + this.includeFields = includeFields; + return this; + } + + public Builder includeFields(Boolean includeFields) { + this.includeFields = OptionalNullable.of(includeFields); + return this; + } + + public Builder includeFields(Optional includeFields) { + if (includeFields.isPresent()) { + this.includeFields = OptionalNullable.of(includeFields.get()); + } else { + this.includeFields = OptionalNullable.absent(); + } + return this; + } + + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { + if (includeFields.isNull()) { + this.includeFields = OptionalNullable.ofNull(); + } else if (includeFields.isEmpty()) { + this.includeFields = OptionalNullable.absent(); + } else { + this.includeFields = OptionalNullable.of(includeFields.get()); + } + return this; + } + + /** + *

                                                              Maximum number of results to return per page (1-100). Defaults to 50.

                                                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + /** + *

                                                              Cursor for the next page of results. Use the value from the next field in the previous response.

                                                              + */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

                                                              Field name to sort results by in ascending order. Defaults to insertion order (oldest first) if not provided.

                                                              + */ + @JsonSetter(value = "sort", nulls = Nulls.SKIP) + public Builder sort(@Nullable OptionalNullable sort) { + this.sort = sort; + return this; + } + + public Builder sort(ClientSortFieldEnum sort) { + this.sort = OptionalNullable.of(sort); + return this; + } + + public Builder sort(Optional sort) { + if (sort.isPresent()) { + this.sort = OptionalNullable.of(sort.get()); + } else { + this.sort = OptionalNullable.absent(); + } + return this; + } + + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { + if (sort.isNull()) { + this.sort = OptionalNullable.ofNull(); + } else if (sort.isEmpty()) { + this.sort = OptionalNullable.absent(); + } else { + this.sort = OptionalNullable.of(sort.get()); + } + return this; + } + + public SearchClientsRequestParameters build() { + return new SearchClientsRequestParameters( + q, parser, fields, includeFields, take, from, sort, 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/SearchClientsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SearchClientsResponseContent.java new file mode 100644 index 00000000..9ecc7fa0 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchClientsResponseContent.java @@ -0,0 +1,152 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchClientsResponseContent.Builder.class) +public final class SearchClientsResponseContent { + private final List clients; + + private final Optional next; + + private final Map additionalProperties; + + private SearchClientsResponseContent( + List clients, Optional next, Map additionalProperties) { + this.clients = clients; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of client objects matching the search criteria. + */ + @JsonProperty("clients") + public List getClients() { + return clients; + } + + /** + * @return Cursor for retrieving the next page of results. Absent when no more results are available. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchClientsResponseContent && equalTo((SearchClientsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchClientsResponseContent other) { + return clients.equals(other.clients) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clients, this.next); + } + + @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 clients = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchClientsResponseContent other) { + clients(other.getClients()); + next(other.getNext()); + return this; + } + + /** + *

                                                              Array of client objects matching the search criteria.

                                                              + */ + @JsonSetter(value = "clients", nulls = Nulls.SKIP) + public Builder clients(List clients) { + this.clients.clear(); + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + public Builder addClients(ClientSearchResponse clients) { + this.clients.add(clients); + return this; + } + + public Builder addAllClients(List clients) { + if (clients != null) { + this.clients.addAll(clients); + } + return this; + } + + /** + *

                                                              Cursor for retrieving the next page of results. Absent when no more results are available.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public SearchClientsResponseContent build() { + return new SearchClientsResponseContent(clients, next, 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/SearchOrganization.java b/src/main/java/com/auth0/client/mgmt/types/SearchOrganization.java new file mode 100644 index 00000000..8ff54ef6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchOrganization.java @@ -0,0 +1,290 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchOrganization.Builder.class) +public final class SearchOrganization { + private final Optional id; + + private final Optional name; + + private final Optional displayName; + + private final Optional branding; + + private final Optional tokenQuota; + + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + + private final Map additionalProperties; + + private SearchOrganization( + Optional id, + Optional name, + Optional displayName, + Optional branding, + Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, + Map additionalProperties) { + this.id = id; + this.name = name; + this.displayName = displayName; + this.branding = branding; + this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; + this.additionalProperties = additionalProperties; + } + + /** + * @return Organization identifier. + */ + @JsonProperty("id") + public Optional getId() { + return id; + } + + /** + * @return The name of this organization. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Friendly name of this organization. + */ + @JsonProperty("display_name") + public Optional getDisplayName() { + return displayName; + } + + @JsonProperty("branding") + public Optional getBranding() { + return branding; + } + + @JsonProperty("token_quota") + public Optional getTokenQuota() { + return tokenQuota; + } + + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchOrganization && equalTo((SearchOrganization) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchOrganization other) { + return id.equals(other.id) + && name.equals(other.name) + && displayName.equals(other.displayName) + && branding.equals(other.branding) + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.displayName, + this.branding, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional branding = Optional.empty(); + + private Optional tokenQuota = Optional.empty(); + + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchOrganization other) { + id(other.getId()); + name(other.getName()); + displayName(other.getDisplayName()); + branding(other.getBranding()); + tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); + return this; + } + + /** + *

                                                              Organization identifier.

                                                              + */ + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public Builder id(Optional id) { + this.id = id; + return this; + } + + public Builder id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + /** + *

                                                              The name of this organization.

                                                              + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Friendly name of this organization.

                                                              + */ + @JsonSetter(value = "display_name", nulls = Nulls.SKIP) + public Builder displayName(Optional displayName) { + this.displayName = displayName; + return this; + } + + public Builder displayName(String displayName) { + this.displayName = Optional.ofNullable(displayName); + return this; + } + + @JsonSetter(value = "branding", nulls = Nulls.SKIP) + public Builder branding(Optional branding) { + this.branding = branding; + return this; + } + + public Builder branding(OrganizationBranding branding) { + this.branding = Optional.ofNullable(branding); + return this; + } + + @JsonSetter(value = "token_quota", nulls = Nulls.SKIP) + public Builder tokenQuota(Optional tokenQuota) { + this.tokenQuota = tokenQuota; + return this; + } + + public Builder tokenQuota(TokenQuota tokenQuota) { + this.tokenQuota = Optional.ofNullable(tokenQuota); + return this; + } + + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + + public SearchOrganization build() { + return new SearchOrganization( + id, + name, + displayName, + branding, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + 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/SearchOrganizationsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SearchOrganizationsPaginatedResponseContent.java new file mode 100644 index 00000000..7267c568 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchOrganizationsPaginatedResponseContent.java @@ -0,0 +1,153 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchOrganizationsPaginatedResponseContent.Builder.class) +public final class SearchOrganizationsPaginatedResponseContent { + private final List organizations; + + private final Optional next; + + private final Map additionalProperties; + + private SearchOrganizationsPaginatedResponseContent( + List organizations, Optional next, Map additionalProperties) { + this.organizations = organizations; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of organization objects matching the search criteria. + */ + @JsonProperty("organizations") + public List getOrganizations() { + return organizations; + } + + /** + * @return Cursor for retrieving the next page of results. Absent when no more results are available. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchOrganizationsPaginatedResponseContent + && equalTo((SearchOrganizationsPaginatedResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchOrganizationsPaginatedResponseContent other) { + return organizations.equals(other.organizations) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.organizations, this.next); + } + + @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 organizations = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchOrganizationsPaginatedResponseContent other) { + organizations(other.getOrganizations()); + next(other.getNext()); + return this; + } + + /** + *

                                                              Array of organization objects matching the search criteria.

                                                              + */ + @JsonSetter(value = "organizations", nulls = Nulls.SKIP) + public Builder organizations(List organizations) { + this.organizations.clear(); + if (organizations != null) { + this.organizations.addAll(organizations); + } + return this; + } + + public Builder addOrganizations(SearchOrganization organizations) { + this.organizations.add(organizations); + return this; + } + + public Builder addAllOrganizations(List organizations) { + if (organizations != null) { + this.organizations.addAll(organizations); + } + return this; + } + + /** + *

                                                              Cursor for retrieving the next page of results. Absent when no more results are available.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public SearchOrganizationsPaginatedResponseContent build() { + return new SearchOrganizationsPaginatedResponseContent(organizations, next, 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/SearchOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SearchOrganizationsRequestParameters.java new file mode 100644 index 00000000..951e20c4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchOrganizationsRequestParameters.java @@ -0,0 +1,387 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchOrganizationsRequestParameters.Builder.class) +public final class SearchOrganizationsRequestParameters { + private final OptionalNullable q; + + private final OptionalNullable parser; + + private final OptionalNullable take; + + private final OptionalNullable from; + + private final OptionalNullable sort; + + private final Map additionalProperties; + + private SearchOrganizationsRequestParameters( + OptionalNullable q, + OptionalNullable parser, + OptionalNullable take, + OptionalNullable from, + OptionalNullable sort, + Map additionalProperties) { + this.q = q; + this.parser = parser; + this.take = take; + this.from = from; + this.sort = sort; + this.additionalProperties = additionalProperties; + } + + /** + * @return Filter expression in SCIM or Lucene syntax (depending on parser parameter, default: Lucene). Lucene examples: name:acme*, display_name:*auth*. SCIM examples: name eq "Auth0", display_name sw "auth" and created_at gt "2024-01-01". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:
                                                              • id - Organization ID (case-sensitive, exact match)
                                                              • name - Organization name (supports contains, starts-with, ends-with operators; sortable)
                                                              • display_name - Organization display name (supports contains, starts-with, ends-with operators; sortable)
                                                              • created_at - Creation timestamp (supports date range operators; sortable)
                                                              • metadata.{key} - Filter by organization metadata key-value pairs
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + public OptionalNullable getQ() { + if (q == null) { + return OptionalNullable.absent(); + } + return q; + } + + /** + * @return Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + public OptionalNullable getParser() { + if (parser == null) { + return OptionalNullable.absent(); + } + return parser; + } + + /** + * @return Maximum number of results to return per page (1-100). Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Cursor for the next page of results. Use the value from the next field in the previous response. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Field name to sort results by in ascending order only. Defaults to insertion order (oldest first) if not provided. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + public OptionalNullable getSort() { + if (sort == null) { + return OptionalNullable.absent(); + } + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + private OptionalNullable _getParser() { + return parser; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchOrganizationsRequestParameters + && equalTo((SearchOrganizationsRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchOrganizationsRequestParameters other) { + return q.equals(other.q) + && parser.equals(other.parser) + && take.equals(other.take) + && from.equals(other.from) + && sort.equals(other.sort); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.q, this.parser, this.take, this.from, this.sort); + } + + @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 OptionalNullable q = OptionalNullable.absent(); + + private OptionalNullable parser = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable sort = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchOrganizationsRequestParameters other) { + q(other.getQ()); + parser(other.getParser()); + take(other.getTake()); + from(other.getFrom()); + sort(other.getSort()); + return this; + } + + /** + *

                                                              Filter expression in SCIM or Lucene syntax (depending on parser parameter, default: Lucene). Lucene examples: name:acme*, display_name:*auth*. SCIM examples: name eq "Auth0", display_name sw "auth" and created_at gt "2024-01-01". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:

                                                              • id - Organization ID (case-sensitive, exact match)
                                                              • name - Organization name (supports contains, starts-with, ends-with operators; sortable)
                                                              • display_name - Organization display name (supports contains, starts-with, ends-with operators; sortable)
                                                              • created_at - Creation timestamp (supports date range operators; sortable)
                                                              • metadata.{key} - Filter by organization metadata key-value pairs
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates.

                                                              + */ + @JsonSetter(value = "q", nulls = Nulls.SKIP) + public Builder q(@Nullable OptionalNullable q) { + this.q = q; + return this; + } + + public Builder q(String q) { + this.q = OptionalNullable.of(q); + return this; + } + + public Builder q(Optional q) { + if (q.isPresent()) { + this.q = OptionalNullable.of(q.get()); + } else { + this.q = OptionalNullable.absent(); + } + return this; + } + + public Builder q(com.auth0.client.mgmt.core.Nullable q) { + if (q.isNull()) { + this.q = OptionalNullable.ofNull(); + } else if (q.isEmpty()) { + this.q = OptionalNullable.absent(); + } else { + this.q = OptionalNullable.of(q.get()); + } + return this; + } + + /** + *

                                                              Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default).

                                                              + */ + @JsonSetter(value = "parser", nulls = Nulls.SKIP) + public Builder parser(@Nullable OptionalNullable parser) { + this.parser = parser; + return this; + } + + public Builder parser(SearchParserEnum parser) { + this.parser = OptionalNullable.of(parser); + return this; + } + + public Builder parser(Optional parser) { + if (parser.isPresent()) { + this.parser = OptionalNullable.of(parser.get()); + } else { + this.parser = OptionalNullable.absent(); + } + return this; + } + + public Builder parser(com.auth0.client.mgmt.core.Nullable parser) { + if (parser.isNull()) { + this.parser = OptionalNullable.ofNull(); + } else if (parser.isEmpty()) { + this.parser = OptionalNullable.absent(); + } else { + this.parser = OptionalNullable.of(parser.get()); + } + return this; + } + + /** + *

                                                              Maximum number of results to return per page (1-100). Defaults to 50.

                                                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + /** + *

                                                              Cursor for the next page of results. Use the value from the next field in the previous response.

                                                              + */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

                                                              Field name to sort results by in ascending order only. Defaults to insertion order (oldest first) if not provided.

                                                              + */ + @JsonSetter(value = "sort", nulls = Nulls.SKIP) + public Builder sort(@Nullable OptionalNullable sort) { + this.sort = sort; + return this; + } + + public Builder sort(OrganizationSortFieldEnum sort) { + this.sort = OptionalNullable.of(sort); + return this; + } + + public Builder sort(Optional sort) { + if (sort.isPresent()) { + this.sort = OptionalNullable.of(sort.get()); + } else { + this.sort = OptionalNullable.absent(); + } + return this; + } + + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { + if (sort.isNull()) { + this.sort = OptionalNullable.ofNull(); + } else if (sort.isEmpty()) { + this.sort = OptionalNullable.absent(); + } else { + this.sort = OptionalNullable.of(sort.get()); + } + return this; + } + + public SearchOrganizationsRequestParameters build() { + return new SearchOrganizationsRequestParameters(q, parser, take, from, sort, 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/SearchParserEnum.java b/src/main/java/com/auth0/client/mgmt/types/SearchParserEnum.java new file mode 100644 index 00000000..cc70fe54 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchParserEnum.java @@ -0,0 +1,83 @@ +/** + * 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 SearchParserEnum { + public static final SearchParserEnum SCIM = new SearchParserEnum(Value.SCIM, "scim"); + + public static final SearchParserEnum LUCENE = new SearchParserEnum(Value.LUCENE, "lucene"); + + private final Value value; + + private final String string; + + SearchParserEnum(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 SearchParserEnum && this.string.equals(((SearchParserEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SCIM: + return visitor.visitScim(); + case LUCENE: + return visitor.visitLucene(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static SearchParserEnum valueOf(String value) { + switch (value) { + case "scim": + return SCIM; + case "lucene": + return LUCENE; + default: + return new SearchParserEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SCIM, + + LUCENE, + + UNKNOWN + } + + public interface Visitor { + T visitScim(); + + T visitLucene(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SearchResourceServersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SearchResourceServersRequestParameters.java new file mode 100644 index 00000000..1166f805 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchResourceServersRequestParameters.java @@ -0,0 +1,508 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchResourceServersRequestParameters.Builder.class) +public final class SearchResourceServersRequestParameters { + private final OptionalNullable q; + + private final OptionalNullable parser; + + private final OptionalNullable fields; + + private final OptionalNullable includeFields; + + private final OptionalNullable take; + + private final OptionalNullable from; + + private final OptionalNullable sort; + + private final Map additionalProperties; + + private SearchResourceServersRequestParameters( + OptionalNullable q, + OptionalNullable parser, + OptionalNullable fields, + OptionalNullable includeFields, + OptionalNullable take, + OptionalNullable from, + OptionalNullable sort, + Map additionalProperties) { + this.q = q; + this.parser = parser; + this.fields = fields; + this.includeFields = includeFields; + this.take = take; + this.from = from; + this.sort = sort; + this.additionalProperties = additionalProperties; + } + + /** + * @return Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: name eq "My API", identifier sw "https://". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:
                                                              • id - Filter by resource server ID
                                                              • identifier - Filter by resource server identifier
                                                              • name - Filter by resource server name
                                                              • updated_at - Filter by last update date
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + public OptionalNullable getQ() { + if (q == null) { + return OptionalNullable.absent(); + } + return q; + } + + /** + * @return Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + public OptionalNullable getParser() { + if (parser == null) { + return OptionalNullable.absent(); + } + return parser; + } + + /** + * @return Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + public OptionalNullable getFields() { + if (fields == null) { + return OptionalNullable.absent(); + } + return fields; + } + + /** + * @return Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + public OptionalNullable getIncludeFields() { + if (includeFields == null) { + return OptionalNullable.absent(); + } + return includeFields; + } + + /** + * @return Maximum number of results to return per page (1-100). Defaults to 50. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + public OptionalNullable getTake() { + if (take == null) { + return OptionalNullable.absent(); + } + return take; + } + + /** + * @return Cursor for the next page of results. Use the value from the next field in the previous response. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + public OptionalNullable getFrom() { + if (from == null) { + return OptionalNullable.absent(); + } + return from; + } + + /** + * @return Field name to sort results by in ascending order only. Defaults to insertion order (oldest first) if not provided. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + public OptionalNullable getSort() { + if (sort == null) { + return OptionalNullable.absent(); + } + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("q") + private OptionalNullable _getQ() { + return q; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("parser") + private OptionalNullable _getParser() { + return parser; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchResourceServersRequestParameters + && equalTo((SearchResourceServersRequestParameters) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchResourceServersRequestParameters other) { + return q.equals(other.q) + && parser.equals(other.parser) + && fields.equals(other.fields) + && includeFields.equals(other.includeFields) + && take.equals(other.take) + && from.equals(other.from) + && sort.equals(other.sort); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.q, this.parser, this.fields, this.includeFields, this.take, this.from, this.sort); + } + + @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 OptionalNullable q = OptionalNullable.absent(); + + private OptionalNullable parser = OptionalNullable.absent(); + + private OptionalNullable fields = OptionalNullable.absent(); + + private OptionalNullable includeFields = OptionalNullable.absent(); + + private OptionalNullable take = OptionalNullable.absent(); + + private OptionalNullable from = OptionalNullable.absent(); + + private OptionalNullable sort = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchResourceServersRequestParameters other) { + q(other.getQ()); + parser(other.getParser()); + fields(other.getFields()); + includeFields(other.getIncludeFields()); + take(other.getTake()); + from(other.getFrom()); + sort(other.getSort()); + return this; + } + + /** + *

                                                              Filter expression in SCIM or Lucene syntax (depending on parser parameter). SCIM examples: name eq "My API", identifier sw "https://". SCIM operators: eq, ne, sw, ew, co, pr, gt, ge, lt, le, and, or. Supported Fields:

                                                              • id - Filter by resource server ID
                                                              • identifier - Filter by resource server identifier
                                                              • name - Filter by resource server name
                                                              • updated_at - Filter by last update date
                                                              Maximum 5 filter operations per query. Results are eventually consistent and may not reflect recent updates.

                                                              + */ + @JsonSetter(value = "q", nulls = Nulls.SKIP) + public Builder q(@Nullable OptionalNullable q) { + this.q = q; + return this; + } + + public Builder q(String q) { + this.q = OptionalNullable.of(q); + return this; + } + + public Builder q(Optional q) { + if (q.isPresent()) { + this.q = OptionalNullable.of(q.get()); + } else { + this.q = OptionalNullable.absent(); + } + return this; + } + + public Builder q(com.auth0.client.mgmt.core.Nullable q) { + if (q.isNull()) { + this.q = OptionalNullable.ofNull(); + } else if (q.isEmpty()) { + this.q = OptionalNullable.absent(); + } else { + this.q = OptionalNullable.of(q.get()); + } + return this; + } + + /** + *

                                                              Query parser to use for the filter expression. Use "scim" for SCIM filter syntax or "lucene" for Lucene query syntax (default).

                                                              + */ + @JsonSetter(value = "parser", nulls = Nulls.SKIP) + public Builder parser(@Nullable OptionalNullable parser) { + this.parser = parser; + return this; + } + + public Builder parser(SearchParserEnum parser) { + this.parser = OptionalNullable.of(parser); + return this; + } + + public Builder parser(Optional parser) { + if (parser.isPresent()) { + this.parser = OptionalNullable.of(parser.get()); + } else { + this.parser = OptionalNullable.absent(); + } + return this; + } + + public Builder parser(com.auth0.client.mgmt.core.Nullable parser) { + if (parser.isNull()) { + this.parser = OptionalNullable.ofNull(); + } else if (parser.isEmpty()) { + this.parser = OptionalNullable.absent(); + } else { + this.parser = OptionalNullable.of(parser.get()); + } + return this; + } + + /** + *

                                                              Comma-separated list of fields to include or exclude in the response. Works with the include_fields parameter to control projection mode.

                                                              + */ + @JsonSetter(value = "fields", nulls = Nulls.SKIP) + public Builder fields(@Nullable OptionalNullable fields) { + this.fields = fields; + return this; + } + + public Builder fields(String fields) { + this.fields = OptionalNullable.of(fields); + return this; + } + + public Builder fields(Optional fields) { + if (fields.isPresent()) { + this.fields = OptionalNullable.of(fields.get()); + } else { + this.fields = OptionalNullable.absent(); + } + return this; + } + + public Builder fields(com.auth0.client.mgmt.core.Nullable fields) { + if (fields.isNull()) { + this.fields = OptionalNullable.ofNull(); + } else if (fields.isEmpty()) { + this.fields = OptionalNullable.absent(); + } else { + this.fields = OptionalNullable.of(fields.get()); + } + return this; + } + + /** + *

                                                              Controls field projection mode. Set to true to include only fields specified in the fields parameter. Set to false to exclude fields specified in the fields parameter. Defaults to true if not specified.

                                                              + */ + @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) + public Builder includeFields(@Nullable OptionalNullable includeFields) { + this.includeFields = includeFields; + return this; + } + + public Builder includeFields(Boolean includeFields) { + this.includeFields = OptionalNullable.of(includeFields); + return this; + } + + public Builder includeFields(Optional includeFields) { + if (includeFields.isPresent()) { + this.includeFields = OptionalNullable.of(includeFields.get()); + } else { + this.includeFields = OptionalNullable.absent(); + } + return this; + } + + public Builder includeFields(com.auth0.client.mgmt.core.Nullable includeFields) { + if (includeFields.isNull()) { + this.includeFields = OptionalNullable.ofNull(); + } else if (includeFields.isEmpty()) { + this.includeFields = OptionalNullable.absent(); + } else { + this.includeFields = OptionalNullable.of(includeFields.get()); + } + return this; + } + + /** + *

                                                              Maximum number of results to return per page (1-100). Defaults to 50.

                                                              + */ + @JsonSetter(value = "take", nulls = Nulls.SKIP) + public Builder take(@Nullable OptionalNullable take) { + this.take = take; + return this; + } + + public Builder take(Integer take) { + this.take = OptionalNullable.of(take); + return this; + } + + public Builder take(Optional take) { + if (take.isPresent()) { + this.take = OptionalNullable.of(take.get()); + } else { + this.take = OptionalNullable.absent(); + } + return this; + } + + public Builder take(com.auth0.client.mgmt.core.Nullable take) { + if (take.isNull()) { + this.take = OptionalNullable.ofNull(); + } else if (take.isEmpty()) { + this.take = OptionalNullable.absent(); + } else { + this.take = OptionalNullable.of(take.get()); + } + return this; + } + + /** + *

                                                              Cursor for the next page of results. Use the value from the next field in the previous response.

                                                              + */ + @JsonSetter(value = "from", nulls = Nulls.SKIP) + public Builder from(@Nullable OptionalNullable from) { + this.from = from; + return this; + } + + public Builder from(String from) { + this.from = OptionalNullable.of(from); + return this; + } + + public Builder from(Optional from) { + if (from.isPresent()) { + this.from = OptionalNullable.of(from.get()); + } else { + this.from = OptionalNullable.absent(); + } + return this; + } + + public Builder from(com.auth0.client.mgmt.core.Nullable from) { + if (from.isNull()) { + this.from = OptionalNullable.ofNull(); + } else if (from.isEmpty()) { + this.from = OptionalNullable.absent(); + } else { + this.from = OptionalNullable.of(from.get()); + } + return this; + } + + /** + *

                                                              Field name to sort results by in ascending order only. Defaults to insertion order (oldest first) if not provided.

                                                              + */ + @JsonSetter(value = "sort", nulls = Nulls.SKIP) + public Builder sort(@Nullable OptionalNullable sort) { + this.sort = sort; + return this; + } + + public Builder sort(ResourceServerSortFieldEnum sort) { + this.sort = OptionalNullable.of(sort); + return this; + } + + public Builder sort(Optional sort) { + if (sort.isPresent()) { + this.sort = OptionalNullable.of(sort.get()); + } else { + this.sort = OptionalNullable.absent(); + } + return this; + } + + public Builder sort(com.auth0.client.mgmt.core.Nullable sort) { + if (sort.isNull()) { + this.sort = OptionalNullable.ofNull(); + } else if (sort.isEmpty()) { + this.sort = OptionalNullable.absent(); + } else { + this.sort = OptionalNullable.of(sort.get()); + } + return this; + } + + public SearchResourceServersRequestParameters build() { + return new SearchResourceServersRequestParameters( + q, parser, fields, includeFields, take, from, sort, 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/SearchResourceServersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SearchResourceServersResponseContent.java new file mode 100644 index 00000000..080a5602 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SearchResourceServersResponseContent.java @@ -0,0 +1,155 @@ +/** + * 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 java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SearchResourceServersResponseContent.Builder.class) +public final class SearchResourceServersResponseContent { + private final List resourceServers; + + private final Optional next; + + private final Map additionalProperties; + + private SearchResourceServersResponseContent( + List resourceServers, + Optional next, + Map additionalProperties) { + this.resourceServers = resourceServers; + this.next = next; + this.additionalProperties = additionalProperties; + } + + /** + * @return Array of resource server objects matching the search criteria. + */ + @JsonProperty("resource_servers") + public List getResourceServers() { + return resourceServers; + } + + /** + * @return Cursor for retrieving the next page of results. Omitted if there are no more results. + */ + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SearchResourceServersResponseContent + && equalTo((SearchResourceServersResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SearchResourceServersResponseContent other) { + return resourceServers.equals(other.resourceServers) && next.equals(other.next); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.resourceServers, this.next); + } + + @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 resourceServers = new ArrayList<>(); + + private Optional next = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SearchResourceServersResponseContent other) { + resourceServers(other.getResourceServers()); + next(other.getNext()); + return this; + } + + /** + *

                                                              Array of resource server objects matching the search criteria.

                                                              + */ + @JsonSetter(value = "resource_servers", nulls = Nulls.SKIP) + public Builder resourceServers(List resourceServers) { + this.resourceServers.clear(); + if (resourceServers != null) { + this.resourceServers.addAll(resourceServers); + } + return this; + } + + public Builder addResourceServers(ResourceServerSearchResponse resourceServers) { + this.resourceServers.add(resourceServers); + return this; + } + + public Builder addAllResourceServers(List resourceServers) { + if (resourceServers != null) { + this.resourceServers.addAll(resourceServers); + } + return this; + } + + /** + *

                                                              Cursor for retrieving the next page of results. Omitted if there are no more results.

                                                              + */ + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + public SearchResourceServersResponseContent build() { + return new SearchResourceServersResponseContent(resourceServers, next, 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/Segment.java b/src/main/java/com/auth0/client/mgmt/types/Segment.java new file mode 100644 index 00000000..5da91100 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/Segment.java @@ -0,0 +1,327 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = Segment.Builder.class) +public final class Segment { + private final String id; + + private final String name; + + private final Optional description; + + private final SegmentTypeEnum type; + + private final SegmentStatusEnum status; + + private final List rules; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private Segment( + String id, + String name, + Optional description, + SegmentTypeEnum type, + SegmentStatusEnum status, + List rules, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.rules = rules; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public SegmentTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public SegmentStatusEnum getStatus() { + return status; + } + + @JsonProperty("rules") + public List getRules() { + return rules; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Segment && equalTo((Segment) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Segment other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && rules.equals(other.rules) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.rules, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(Segment other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull SegmentTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull SegmentStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + Segment build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage rules(List rules); + + _FinalStage addRules(SegmentRule rules); + + _FinalStage addAllRules(List rules); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private SegmentTypeEnum type; + + private SegmentStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private List rules = new ArrayList<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Segment other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + rules(other.getRules()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull SegmentTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull SegmentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllRules(List rules) { + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage addRules(SegmentRule rules) { + this.rules.add(rules); + return this; + } + + @java.lang.Override + @JsonSetter(value = "rules", nulls = Nulls.SKIP) + public _FinalStage rules(List rules) { + this.rules.clear(); + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public Segment build() { + return new Segment(id, name, description, type, status, rules, 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/SegmentContainsExpression.java b/src/main/java/com/auth0/client/mgmt/types/SegmentContainsExpression.java new file mode 100644 index 00000000..95cf5c3e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentContainsExpression.java @@ -0,0 +1,116 @@ +/** + * 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 = SegmentContainsExpression.Builder.class) +public final class SegmentContainsExpression { + private final List contains; + + private final Map additionalProperties; + + private SegmentContainsExpression(List contains, Map additionalProperties) { + this.contains = contains; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("contains") + public List getContains() { + return contains; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentContainsExpression && equalTo((SegmentContainsExpression) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentContainsExpression other) { + return contains.equals(other.contains); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.contains); + } + + @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 contains = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SegmentContainsExpression other) { + contains(other.getContains()); + return this; + } + + @JsonSetter(value = "contains", nulls = Nulls.SKIP) + public Builder contains(List contains) { + this.contains.clear(); + if (contains != null) { + this.contains.addAll(contains); + } + return this; + } + + public Builder addContains(String contains) { + this.contains.add(contains); + return this; + } + + public Builder addAllContains(List contains) { + if (contains != null) { + this.contains.addAll(contains); + } + return this; + } + + public SegmentContainsExpression build() { + return new SegmentContainsExpression(contains, 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/SegmentEndsWithExpression.java b/src/main/java/com/auth0/client/mgmt/types/SegmentEndsWithExpression.java new file mode 100644 index 00000000..85139fa8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentEndsWithExpression.java @@ -0,0 +1,116 @@ +/** + * 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 = SegmentEndsWithExpression.Builder.class) +public final class SegmentEndsWithExpression { + private final List endsWith; + + private final Map additionalProperties; + + private SegmentEndsWithExpression(List endsWith, Map additionalProperties) { + this.endsWith = endsWith; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("ends_with") + public List getEndsWith() { + return endsWith; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentEndsWithExpression && equalTo((SegmentEndsWithExpression) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentEndsWithExpression other) { + return endsWith.equals(other.endsWith); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.endsWith); + } + + @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 endsWith = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SegmentEndsWithExpression other) { + endsWith(other.getEndsWith()); + return this; + } + + @JsonSetter(value = "ends_with", nulls = Nulls.SKIP) + public Builder endsWith(List endsWith) { + this.endsWith.clear(); + if (endsWith != null) { + this.endsWith.addAll(endsWith); + } + return this; + } + + public Builder addEndsWith(String endsWith) { + this.endsWith.add(endsWith); + return this; + } + + public Builder addAllEndsWith(List endsWith) { + if (endsWith != null) { + this.endsWith.addAll(endsWith); + } + return this; + } + + public SegmentEndsWithExpression build() { + return new SegmentEndsWithExpression(endsWith, 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/SegmentExistsExpression.java b/src/main/java/com/auth0/client/mgmt/types/SegmentExistsExpression.java new file mode 100644 index 00000000..551492ed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentExistsExpression.java @@ -0,0 +1,117 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SegmentExistsExpression.Builder.class) +public final class SegmentExistsExpression { + private final boolean exists; + + private final Map additionalProperties; + + private SegmentExistsExpression(boolean exists, Map additionalProperties) { + this.exists = exists; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("exists") + public boolean getExists() { + return exists; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentExistsExpression && equalTo((SegmentExistsExpression) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentExistsExpression other) { + return exists == other.exists; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.exists); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ExistsStage builder() { + return new Builder(); + } + + public interface ExistsStage { + _FinalStage exists(boolean exists); + + Builder from(SegmentExistsExpression other); + } + + public interface _FinalStage { + SegmentExistsExpression build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ExistsStage, _FinalStage { + private boolean exists; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SegmentExistsExpression other) { + exists(other.getExists()); + return this; + } + + @java.lang.Override + @JsonSetter("exists") + public _FinalStage exists(boolean exists) { + this.exists = exists; + return this; + } + + @java.lang.Override + public SegmentExistsExpression build() { + return new SegmentExistsExpression(exists, 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/SegmentMatchConditions.java b/src/main/java/com/auth0/client/mgmt/types/SegmentMatchConditions.java new file mode 100644 index 00000000..efe14b1b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentMatchConditions.java @@ -0,0 +1,370 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SegmentMatchConditions.Builder.class) +public final class SegmentMatchConditions { + private final Optional clientId; + + private final Optional connection; + + private final Optional connectionType; + + private final Optional organizationId; + + private final Optional domain; + + private final Optional deviceType; + + private final Optional browser; + + private final Optional platform; + + private final Optional userAgent; + + private final Optional country; + + private final Optional region; + + private final Map additionalProperties; + + private SegmentMatchConditions( + Optional clientId, + Optional connection, + Optional connectionType, + Optional organizationId, + Optional domain, + Optional deviceType, + Optional browser, + Optional platform, + Optional userAgent, + Optional country, + Optional region, + Map additionalProperties) { + this.clientId = clientId; + this.connection = connection; + this.connectionType = connectionType; + this.organizationId = organizationId; + this.domain = domain; + this.deviceType = deviceType; + this.browser = browser; + this.platform = platform; + this.userAgent = userAgent; + this.country = country; + this.region = region; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @JsonProperty("connection_type") + public Optional getConnectionType() { + return connectionType; + } + + @JsonProperty("organization_id") + public Optional getOrganizationId() { + return organizationId; + } + + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("device_type") + public Optional getDeviceType() { + return deviceType; + } + + @JsonProperty("browser") + public Optional getBrowser() { + return browser; + } + + @JsonProperty("platform") + public Optional getPlatform() { + return platform; + } + + @JsonProperty("user_agent") + public Optional getUserAgent() { + return userAgent; + } + + @JsonProperty("country") + public Optional getCountry() { + return country; + } + + @JsonProperty("region") + public Optional getRegion() { + return region; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentMatchConditions && equalTo((SegmentMatchConditions) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentMatchConditions other) { + return clientId.equals(other.clientId) + && connection.equals(other.connection) + && connectionType.equals(other.connectionType) + && organizationId.equals(other.organizationId) + && domain.equals(other.domain) + && deviceType.equals(other.deviceType) + && browser.equals(other.browser) + && platform.equals(other.platform) + && userAgent.equals(other.userAgent) + && country.equals(other.country) + && region.equals(other.region); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.clientId, + this.connection, + this.connectionType, + this.organizationId, + this.domain, + this.deviceType, + this.browser, + this.platform, + this.userAgent, + this.country, + this.region); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientId = Optional.empty(); + + private Optional connection = Optional.empty(); + + private Optional connectionType = Optional.empty(); + + private Optional organizationId = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional deviceType = Optional.empty(); + + private Optional browser = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional userAgent = Optional.empty(); + + private Optional country = Optional.empty(); + + private Optional region = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SegmentMatchConditions other) { + clientId(other.getClientId()); + connection(other.getConnection()); + connectionType(other.getConnectionType()); + organizationId(other.getOrganizationId()); + domain(other.getDomain()); + deviceType(other.getDeviceType()); + browser(other.getBrowser()); + platform(other.getPlatform()); + userAgent(other.getUserAgent()); + country(other.getCountry()); + region(other.getRegion()); + return this; + } + + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(SegmentMatchExpression clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "connection", nulls = Nulls.SKIP) + public Builder connection(Optional connection) { + this.connection = connection; + return this; + } + + public Builder connection(SegmentMatchExpression connection) { + this.connection = Optional.ofNullable(connection); + return this; + } + + @JsonSetter(value = "connection_type", nulls = Nulls.SKIP) + public Builder connectionType(Optional connectionType) { + this.connectionType = connectionType; + return this; + } + + public Builder connectionType(SegmentMatchExpression connectionType) { + this.connectionType = Optional.ofNullable(connectionType); + return this; + } + + @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) + public Builder organizationId(Optional organizationId) { + this.organizationId = organizationId; + return this; + } + + public Builder organizationId(SegmentMatchExpression organizationId) { + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public Builder domain(Optional domain) { + this.domain = domain; + return this; + } + + public Builder domain(SegmentMatchExpression domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + @JsonSetter(value = "device_type", nulls = Nulls.SKIP) + public Builder deviceType(Optional deviceType) { + this.deviceType = deviceType; + return this; + } + + public Builder deviceType(SegmentMatchExpression deviceType) { + this.deviceType = Optional.ofNullable(deviceType); + return this; + } + + @JsonSetter(value = "browser", nulls = Nulls.SKIP) + public Builder browser(Optional browser) { + this.browser = browser; + return this; + } + + public Builder browser(SegmentMatchExpression browser) { + this.browser = Optional.ofNullable(browser); + return this; + } + + @JsonSetter(value = "platform", nulls = Nulls.SKIP) + public Builder platform(Optional platform) { + this.platform = platform; + return this; + } + + public Builder platform(SegmentMatchExpression platform) { + this.platform = Optional.ofNullable(platform); + return this; + } + + @JsonSetter(value = "user_agent", nulls = Nulls.SKIP) + public Builder userAgent(Optional userAgent) { + this.userAgent = userAgent; + return this; + } + + public Builder userAgent(SegmentMatchExpression userAgent) { + this.userAgent = Optional.ofNullable(userAgent); + return this; + } + + @JsonSetter(value = "country", nulls = Nulls.SKIP) + public Builder country(Optional country) { + this.country = country; + return this; + } + + public Builder country(SegmentMatchExpression country) { + this.country = Optional.ofNullable(country); + return this; + } + + @JsonSetter(value = "region", nulls = Nulls.SKIP) + public Builder region(Optional region) { + this.region = region; + return this; + } + + public Builder region(SegmentMatchExpression region) { + this.region = Optional.ofNullable(region); + return this; + } + + public SegmentMatchConditions build() { + return new SegmentMatchConditions( + clientId, + connection, + connectionType, + organizationId, + domain, + deviceType, + browser, + platform, + userAgent, + country, + region, + 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/SegmentMatchExpression.java b/src/main/java/com/auth0/client/mgmt/types/SegmentMatchExpression.java new file mode 100644 index 00000000..5cabcd75 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentMatchExpression.java @@ -0,0 +1,142 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = SegmentMatchExpression.Deserializer.class) +public final class SegmentMatchExpression { + private final Object value; + + private final int type; + + private SegmentMatchExpression(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((List) this.value); + } else if (this.type == 1) { + return visitor.visit((SegmentContainsExpression) this.value); + } else if (this.type == 2) { + return visitor.visit((SegmentStartsWithExpression) this.value); + } else if (this.type == 3) { + return visitor.visit((SegmentEndsWithExpression) this.value); + } else if (this.type == 4) { + return visitor.visit((SegmentExistsExpression) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentMatchExpression && equalTo((SegmentMatchExpression) other); + } + + private boolean equalTo(SegmentMatchExpression other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SegmentMatchExpression of(List value) { + return new SegmentMatchExpression(value, 0); + } + + public static SegmentMatchExpression of(SegmentContainsExpression value) { + return new SegmentMatchExpression(value, 1); + } + + public static SegmentMatchExpression of(SegmentStartsWithExpression value) { + return new SegmentMatchExpression(value, 2); + } + + public static SegmentMatchExpression of(SegmentEndsWithExpression value) { + return new SegmentMatchExpression(value, 3); + } + + public static SegmentMatchExpression of(SegmentExistsExpression value) { + return new SegmentMatchExpression(value, 4); + } + + public interface Visitor { + T visit(List value); + + T visit(SegmentContainsExpression value); + + T visit(SegmentStartsWithExpression value); + + T visit(SegmentEndsWithExpression value); + + T visit(SegmentExistsExpression value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SegmentMatchExpression.class); + } + + @java.lang.Override + public SegmentMatchExpression deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Map && ((Map) value).containsKey("contains")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, SegmentContainsExpression.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map && ((Map) value).containsKey("starts_with")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, SegmentStartsWithExpression.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map && ((Map) value).containsKey("ends_with")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, SegmentEndsWithExpression.class)); + } catch (RuntimeException e) { + } + } + if (value instanceof Map && ((Map) value).containsKey("exists")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, SegmentExistsExpression.class)); + } catch (RuntimeException e) { + } + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SegmentNotMatchConditions.java b/src/main/java/com/auth0/client/mgmt/types/SegmentNotMatchConditions.java new file mode 100644 index 00000000..bc69286a --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentNotMatchConditions.java @@ -0,0 +1,370 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SegmentNotMatchConditions.Builder.class) +public final class SegmentNotMatchConditions { + private final Optional clientId; + + private final Optional connection; + + private final Optional connectionType; + + private final Optional organizationId; + + private final Optional domain; + + private final Optional deviceType; + + private final Optional browser; + + private final Optional platform; + + private final Optional userAgent; + + private final Optional country; + + private final Optional region; + + private final Map additionalProperties; + + private SegmentNotMatchConditions( + Optional clientId, + Optional connection, + Optional connectionType, + Optional organizationId, + Optional domain, + Optional deviceType, + Optional browser, + Optional platform, + Optional userAgent, + Optional country, + Optional region, + Map additionalProperties) { + this.clientId = clientId; + this.connection = connection; + this.connectionType = connectionType; + this.organizationId = organizationId; + this.domain = domain; + this.deviceType = deviceType; + this.browser = browser; + this.platform = platform; + this.userAgent = userAgent; + this.country = country; + this.region = region; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("client_id") + public Optional getClientId() { + return clientId; + } + + @JsonProperty("connection") + public Optional getConnection() { + return connection; + } + + @JsonProperty("connection_type") + public Optional getConnectionType() { + return connectionType; + } + + @JsonProperty("organization_id") + public Optional getOrganizationId() { + return organizationId; + } + + @JsonProperty("domain") + public Optional getDomain() { + return domain; + } + + @JsonProperty("device_type") + public Optional getDeviceType() { + return deviceType; + } + + @JsonProperty("browser") + public Optional getBrowser() { + return browser; + } + + @JsonProperty("platform") + public Optional getPlatform() { + return platform; + } + + @JsonProperty("user_agent") + public Optional getUserAgent() { + return userAgent; + } + + @JsonProperty("country") + public Optional getCountry() { + return country; + } + + @JsonProperty("region") + public Optional getRegion() { + return region; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentNotMatchConditions && equalTo((SegmentNotMatchConditions) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentNotMatchConditions other) { + return clientId.equals(other.clientId) + && connection.equals(other.connection) + && connectionType.equals(other.connectionType) + && organizationId.equals(other.organizationId) + && domain.equals(other.domain) + && deviceType.equals(other.deviceType) + && browser.equals(other.browser) + && platform.equals(other.platform) + && userAgent.equals(other.userAgent) + && country.equals(other.country) + && region.equals(other.region); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.clientId, + this.connection, + this.connectionType, + this.organizationId, + this.domain, + this.deviceType, + this.browser, + this.platform, + this.userAgent, + this.country, + this.region); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional clientId = Optional.empty(); + + private Optional connection = Optional.empty(); + + private Optional connectionType = Optional.empty(); + + private Optional organizationId = Optional.empty(); + + private Optional domain = Optional.empty(); + + private Optional deviceType = Optional.empty(); + + private Optional browser = Optional.empty(); + + private Optional platform = Optional.empty(); + + private Optional userAgent = Optional.empty(); + + private Optional country = Optional.empty(); + + private Optional region = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SegmentNotMatchConditions other) { + clientId(other.getClientId()); + connection(other.getConnection()); + connectionType(other.getConnectionType()); + organizationId(other.getOrganizationId()); + domain(other.getDomain()); + deviceType(other.getDeviceType()); + browser(other.getBrowser()); + platform(other.getPlatform()); + userAgent(other.getUserAgent()); + country(other.getCountry()); + region(other.getRegion()); + return this; + } + + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(Optional clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(SegmentMatchExpression clientId) { + this.clientId = Optional.ofNullable(clientId); + return this; + } + + @JsonSetter(value = "connection", nulls = Nulls.SKIP) + public Builder connection(Optional connection) { + this.connection = connection; + return this; + } + + public Builder connection(SegmentMatchExpression connection) { + this.connection = Optional.ofNullable(connection); + return this; + } + + @JsonSetter(value = "connection_type", nulls = Nulls.SKIP) + public Builder connectionType(Optional connectionType) { + this.connectionType = connectionType; + return this; + } + + public Builder connectionType(SegmentMatchExpression connectionType) { + this.connectionType = Optional.ofNullable(connectionType); + return this; + } + + @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) + public Builder organizationId(Optional organizationId) { + this.organizationId = organizationId; + return this; + } + + public Builder organizationId(SegmentMatchExpression organizationId) { + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + @JsonSetter(value = "domain", nulls = Nulls.SKIP) + public Builder domain(Optional domain) { + this.domain = domain; + return this; + } + + public Builder domain(SegmentMatchExpression domain) { + this.domain = Optional.ofNullable(domain); + return this; + } + + @JsonSetter(value = "device_type", nulls = Nulls.SKIP) + public Builder deviceType(Optional deviceType) { + this.deviceType = deviceType; + return this; + } + + public Builder deviceType(SegmentMatchExpression deviceType) { + this.deviceType = Optional.ofNullable(deviceType); + return this; + } + + @JsonSetter(value = "browser", nulls = Nulls.SKIP) + public Builder browser(Optional browser) { + this.browser = browser; + return this; + } + + public Builder browser(SegmentMatchExpression browser) { + this.browser = Optional.ofNullable(browser); + return this; + } + + @JsonSetter(value = "platform", nulls = Nulls.SKIP) + public Builder platform(Optional platform) { + this.platform = platform; + return this; + } + + public Builder platform(SegmentMatchExpression platform) { + this.platform = Optional.ofNullable(platform); + return this; + } + + @JsonSetter(value = "user_agent", nulls = Nulls.SKIP) + public Builder userAgent(Optional userAgent) { + this.userAgent = userAgent; + return this; + } + + public Builder userAgent(SegmentMatchExpression userAgent) { + this.userAgent = Optional.ofNullable(userAgent); + return this; + } + + @JsonSetter(value = "country", nulls = Nulls.SKIP) + public Builder country(Optional country) { + this.country = country; + return this; + } + + public Builder country(SegmentMatchExpression country) { + this.country = Optional.ofNullable(country); + return this; + } + + @JsonSetter(value = "region", nulls = Nulls.SKIP) + public Builder region(Optional region) { + this.region = region; + return this; + } + + public Builder region(SegmentMatchExpression region) { + this.region = Optional.ofNullable(region); + return this; + } + + public SegmentNotMatchConditions build() { + return new SegmentNotMatchConditions( + clientId, + connection, + connectionType, + organizationId, + domain, + deviceType, + browser, + platform, + userAgent, + country, + region, + 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/SegmentRule.java b/src/main/java/com/auth0/client/mgmt/types/SegmentRule.java new file mode 100644 index 00000000..0e6f8178 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentRule.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SegmentRule.Builder.class) +public final class SegmentRule { + private final Optional match; + + private final Optional notMatch; + + private final Map additionalProperties; + + private SegmentRule( + Optional match, + Optional notMatch, + Map additionalProperties) { + this.match = match; + this.notMatch = notMatch; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("match") + public Optional getMatch() { + return match; + } + + @JsonProperty("not_match") + public Optional getNotMatch() { + return notMatch; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentRule && equalTo((SegmentRule) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentRule other) { + return match.equals(other.match) && notMatch.equals(other.notMatch); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.match, this.notMatch); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional match = Optional.empty(); + + private Optional notMatch = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SegmentRule other) { + match(other.getMatch()); + notMatch(other.getNotMatch()); + return this; + } + + @JsonSetter(value = "match", nulls = Nulls.SKIP) + public Builder match(Optional match) { + this.match = match; + return this; + } + + public Builder match(SegmentMatchConditions match) { + this.match = Optional.ofNullable(match); + return this; + } + + @JsonSetter(value = "not_match", nulls = Nulls.SKIP) + public Builder notMatch(Optional notMatch) { + this.notMatch = notMatch; + return this; + } + + public Builder notMatch(SegmentNotMatchConditions notMatch) { + this.notMatch = Optional.ofNullable(notMatch); + return this; + } + + public SegmentRule build() { + return new SegmentRule(match, notMatch, 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/SegmentStartsWithExpression.java b/src/main/java/com/auth0/client/mgmt/types/SegmentStartsWithExpression.java new file mode 100644 index 00000000..290c6db1 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentStartsWithExpression.java @@ -0,0 +1,116 @@ +/** + * 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 = SegmentStartsWithExpression.Builder.class) +public final class SegmentStartsWithExpression { + private final List startsWith; + + private final Map additionalProperties; + + private SegmentStartsWithExpression(List startsWith, Map additionalProperties) { + this.startsWith = startsWith; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("starts_with") + public List getStartsWith() { + return startsWith; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SegmentStartsWithExpression && equalTo((SegmentStartsWithExpression) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SegmentStartsWithExpression other) { + return startsWith.equals(other.startsWith); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.startsWith); + } + + @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 startsWith = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SegmentStartsWithExpression other) { + startsWith(other.getStartsWith()); + return this; + } + + @JsonSetter(value = "starts_with", nulls = Nulls.SKIP) + public Builder startsWith(List startsWith) { + this.startsWith.clear(); + if (startsWith != null) { + this.startsWith.addAll(startsWith); + } + return this; + } + + public Builder addStartsWith(String startsWith) { + this.startsWith.add(startsWith); + return this; + } + + public Builder addAllStartsWith(List startsWith) { + if (startsWith != null) { + this.startsWith.addAll(startsWith); + } + return this; + } + + public SegmentStartsWithExpression build() { + return new SegmentStartsWithExpression(startsWith, 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/SegmentStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/SegmentStatusEnum.java new file mode 100644 index 00000000..59fca697 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentStatusEnum.java @@ -0,0 +1,83 @@ +/** + * 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 SegmentStatusEnum { + public static final SegmentStatusEnum ARCHIVED = new SegmentStatusEnum(Value.ARCHIVED, "archived"); + + public static final SegmentStatusEnum ACTIVE = new SegmentStatusEnum(Value.ACTIVE, "active"); + + private final Value value; + + private final String string; + + SegmentStatusEnum(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 SegmentStatusEnum && this.string.equals(((SegmentStatusEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ARCHIVED: + return visitor.visitArchived(); + case ACTIVE: + return visitor.visitActive(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static SegmentStatusEnum valueOf(String value) { + switch (value) { + case "archived": + return ARCHIVED; + case "active": + return ACTIVE; + default: + return new SegmentStatusEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + ACTIVE, + + ARCHIVED, + + UNKNOWN + } + + public interface Visitor { + T visitActive(); + + T visitArchived(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SegmentTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/SegmentTypeEnum.java new file mode 100644 index 00000000..13c658ed --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentTypeEnum.java @@ -0,0 +1,83 @@ +/** + * 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 SegmentTypeEnum { + public static final SegmentTypeEnum SELF = new SegmentTypeEnum(Value.SELF, "self"); + + public static final SegmentTypeEnum AUTH0 = new SegmentTypeEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + SegmentTypeEnum(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 SegmentTypeEnum && this.string.equals(((SegmentTypeEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SELF: + return visitor.visitSelf(); + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static SegmentTypeEnum valueOf(String value) { + switch (value) { + case "self": + return SELF; + case "auth0": + return AUTH0; + default: + return new SegmentTypeEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + SELF, + + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitSelf(); + + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SegmentTypeFilterEnum.java b/src/main/java/com/auth0/client/mgmt/types/SegmentTypeFilterEnum.java new file mode 100644 index 00000000..6bf20a5c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SegmentTypeFilterEnum.java @@ -0,0 +1,84 @@ +/** + * 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 SegmentTypeFilterEnum { + public static final SegmentTypeFilterEnum SELF = new SegmentTypeFilterEnum(Value.SELF, "self"); + + public static final SegmentTypeFilterEnum AUTH0 = new SegmentTypeFilterEnum(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + SegmentTypeFilterEnum(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 SegmentTypeFilterEnum + && this.string.equals(((SegmentTypeFilterEnum) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case SELF: + return visitor.visitSelf(); + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static SegmentTypeFilterEnum valueOf(String value) { + switch (value) { + case "self": + return SELF; + case "auth0": + return AUTH0; + default: + return new SegmentTypeFilterEnum(Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + SELF, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitSelf(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java index dbf18618..f1c9846e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java @@ -224,7 +224,6 @@ public Builder from(SelfServiceProfileSsoTicketConnectionConfig other) { } /** - *

                                                              The name of the connection that will be created as a part of the Self-Service Enterprise Configuration flow.

                                                              *

                                                              The name of the connection that will be created as a part of the Self-Service Enterprise Configuration flow.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java index 617b8d17..51864cee 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java @@ -149,7 +149,6 @@ public Builder from(SelfServiceProfileSsoTicketEnabledOrganization other) { } /** - *

                                                              Organization identifier.

                                                              *

                                                              Organization identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java index a00467d2..fdacf54b 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java @@ -10,21 +10,26 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SelfServiceProfileSsoTicketGoogleWorkspaceConfig.Builder.class) public final class SelfServiceProfileSsoTicketGoogleWorkspaceConfig { private final boolean syncUsers; + private final Optional syncGroups; + private final Map additionalProperties; private SelfServiceProfileSsoTicketGoogleWorkspaceConfig( - boolean syncUsers, Map additionalProperties) { + boolean syncUsers, Optional syncGroups, Map additionalProperties) { this.syncUsers = syncUsers; + this.syncGroups = syncGroups; this.additionalProperties = additionalProperties; } @@ -36,6 +41,14 @@ public boolean getSyncUsers() { return syncUsers; } + /** + * @return Whether to enable Google Workspace Directory Sync for groups during the self-service flow. + */ + @JsonProperty("sync_groups") + public Optional getSyncGroups() { + return syncGroups; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -49,12 +62,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(SelfServiceProfileSsoTicketGoogleWorkspaceConfig other) { - return syncUsers == other.syncUsers; + return syncUsers == other.syncUsers && syncGroups.equals(other.syncGroups); } @java.lang.Override public int hashCode() { - return Objects.hash(this.syncUsers); + return Objects.hash(this.syncUsers, this.syncGroups); } @java.lang.Override @@ -81,12 +94,21 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Whether to enable Google Workspace Directory Sync for groups during the self-service flow.

                                                              + */ + _FinalStage syncGroups(Optional syncGroups); + + _FinalStage syncGroups(Boolean syncGroups); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements SyncUsersStage, _FinalStage { private boolean syncUsers; + private Optional syncGroups = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -95,11 +117,11 @@ private Builder() {} @java.lang.Override public Builder from(SelfServiceProfileSsoTicketGoogleWorkspaceConfig other) { syncUsers(other.getSyncUsers()); + syncGroups(other.getSyncGroups()); return this; } /** - *

                                                              Whether to enable Google Workspace Directory Sync for users during the self-service flow.

                                                              *

                                                              Whether to enable Google Workspace Directory Sync for users during the self-service flow.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -110,9 +132,29 @@ public _FinalStage syncUsers(boolean syncUsers) { return this; } + /** + *

                                                              Whether to enable Google Workspace Directory Sync for groups during the self-service flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage syncGroups(Boolean syncGroups) { + this.syncGroups = Optional.ofNullable(syncGroups); + return this; + } + + /** + *

                                                              Whether to enable Google Workspace Directory Sync for groups during the self-service flow.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "sync_groups", nulls = Nulls.SKIP) + public _FinalStage syncGroups(Optional syncGroups) { + this.syncGroups = syncGroups; + return this; + } + @java.lang.Override public SelfServiceProfileSsoTicketGoogleWorkspaceConfig build() { - return new SelfServiceProfileSsoTicketGoogleWorkspaceConfig(syncUsers, additionalProperties); + return new SelfServiceProfileSsoTicketGoogleWorkspaceConfig(syncUsers, syncGroups, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketUniversalLogoutConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketUniversalLogoutConfig.java new file mode 100644 index 00000000..5f430b23 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketUniversalLogoutConfig.java @@ -0,0 +1,129 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SelfServiceProfileSsoTicketUniversalLogoutConfig.Builder.class) +public final class SelfServiceProfileSsoTicketUniversalLogoutConfig { + private final boolean allowConfiguration; + + private final Map additionalProperties; + + private SelfServiceProfileSsoTicketUniversalLogoutConfig( + boolean allowConfiguration, Map additionalProperties) { + this.allowConfiguration = allowConfiguration; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether the end user can set up Universal Logout during the Self-Service Enterprise Configuration flow. + */ + @JsonProperty("allow_configuration") + public boolean getAllowConfiguration() { + return allowConfiguration; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SelfServiceProfileSsoTicketUniversalLogoutConfig + && equalTo((SelfServiceProfileSsoTicketUniversalLogoutConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SelfServiceProfileSsoTicketUniversalLogoutConfig other) { + return allowConfiguration == other.allowConfiguration; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.allowConfiguration); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AllowConfigurationStage builder() { + return new Builder(); + } + + public interface AllowConfigurationStage { + /** + *

                                                              Whether the end user can set up Universal Logout during the Self-Service Enterprise Configuration flow.

                                                              + */ + _FinalStage allowConfiguration(boolean allowConfiguration); + + Builder from(SelfServiceProfileSsoTicketUniversalLogoutConfig other); + } + + public interface _FinalStage { + SelfServiceProfileSsoTicketUniversalLogoutConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AllowConfigurationStage, _FinalStage { + private boolean allowConfiguration; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SelfServiceProfileSsoTicketUniversalLogoutConfig other) { + allowConfiguration(other.getAllowConfiguration()); + return this; + } + + /** + *

                                                              Whether the end user can set up Universal Logout during the Self-Service Enterprise Configuration flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("allow_configuration") + public _FinalStage allowConfiguration(boolean allowConfiguration) { + this.allowConfiguration = allowConfiguration; + return this; + } + + @java.lang.Override + public SelfServiceProfileSsoTicketUniversalLogoutConfig build() { + return new SelfServiceProfileSsoTicketUniversalLogoutConfig(allowConfiguration, 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/SelfServiceProfileUserAttribute.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileUserAttribute.java index c53f1418..257debf9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileUserAttribute.java +++ b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileUserAttribute.java @@ -141,7 +141,6 @@ public Builder from(SelfServiceProfileUserAttribute other) { } /** - *

                                                              Identifier of this attribute.

                                                              *

                                                              Identifier of this attribute.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -153,7 +152,6 @@ public DescriptionStage name(@NotNull String name) { } /** - *

                                                              Description of this attribute.

                                                              *

                                                              Description of this attribute.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -165,7 +163,6 @@ public IsOptionalStage description(@NotNull String description) { } /** - *

                                                              Determines if this attribute is required

                                                              *

                                                              Determines if this attribute is required

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionActorClaimValue.java b/src/main/java/com/auth0/client/mgmt/types/SessionActorClaimValue.java new file mode 100644 index 00000000..99859a91 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SessionActorClaimValue.java @@ -0,0 +1,105 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SessionActorClaimValue.Deserializer.class) +public final class SessionActorClaimValue { + private final Object value; + + private final int type; + + private SessionActorClaimValue(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((boolean) this.value); + } else if (this.type == 2) { + return visitor.visit((double) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SessionActorClaimValue && equalTo((SessionActorClaimValue) other); + } + + private boolean equalTo(SessionActorClaimValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SessionActorClaimValue of(String value) { + return new SessionActorClaimValue(value, 0); + } + + public static SessionActorClaimValue of(boolean value) { + return new SessionActorClaimValue(value, 1); + } + + public static SessionActorClaimValue of(double value) { + return new SessionActorClaimValue(value, 2); + } + + public interface Visitor { + T visit(String value); + + T visit(boolean value); + + T visit(double value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SessionActorClaimValue.class); + } + + @java.lang.Override + public SessionActorClaimValue deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + if (value instanceof Boolean) { + return of((Boolean) value); + } + if (value instanceof Double) { + return of((Double) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionActorMetadata.java b/src/main/java/com/auth0/client/mgmt/types/SessionActorMetadata.java new file mode 100644 index 00000000..dea0963c --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SessionActorMetadata.java @@ -0,0 +1,128 @@ +/** + * 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 = SessionActorMetadata.Builder.class) +public final class SessionActorMetadata { + private final String sub; + + private final Map additionalProperties; + + private SessionActorMetadata(String sub, Map additionalProperties) { + this.sub = sub; + this.additionalProperties = additionalProperties; + } + + /** + * @return Subject identifier of the actor + */ + @JsonProperty("sub") + public String getSub() { + return sub; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SessionActorMetadata && equalTo((SessionActorMetadata) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SessionActorMetadata other) { + return sub.equals(other.sub); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.sub); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static SubStage builder() { + return new Builder(); + } + + public interface SubStage { + /** + *

                                                              Subject identifier of the actor

                                                              + */ + _FinalStage sub(@NotNull String sub); + + Builder from(SessionActorMetadata other); + } + + public interface _FinalStage { + SessionActorMetadata build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements SubStage, _FinalStage { + private String sub; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SessionActorMetadata other) { + sub(other.getSub()); + return this; + } + + /** + *

                                                              Subject identifier of the actor

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("sub") + public _FinalStage sub(@NotNull String sub) { + this.sub = Objects.requireNonNull(sub, "sub must not be null"); + return this; + } + + @java.lang.Override + public SessionActorMetadata build() { + return new SessionActorMetadata(sub, 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/SessionAuthenticationSignal.java b/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java index 13fc734e..f2fe4268 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 49a66ea1..e853684e 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; @@ -50,22 +50,25 @@ public final class SessionResponseContent { private final OptionalNullable> sessionMetadata; + private final Optional actor; + private final Map additionalProperties; 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, Optional cookie, OptionalNullable> sessionMetadata, + Optional actor, Map additionalProperties) { this.id = id; this.userId = userId; @@ -80,6 +83,7 @@ private SessionResponseContent( this.authentication = authentication; this.cookie = cookie; this.sessionMetadata = sessionMetadata; + this.actor = actor; this.additionalProperties = additionalProperties; } @@ -99,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; } @@ -161,6 +189,47 @@ public OptionalNullable> getSessionMetadata() { return sessionMetadata; } + @JsonProperty("actor") + 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() { @@ -191,7 +260,8 @@ private boolean equalTo(SessionResponseContent other) { && clients.equals(other.clients) && authentication.equals(other.authentication) && cookie.equals(other.cookie) - && sessionMetadata.equals(other.sessionMetadata); + && sessionMetadata.equals(other.sessionMetadata) + && actor.equals(other.actor); } @java.lang.Override @@ -209,7 +279,8 @@ public int hashCode() { this.clients, this.authentication, this.cookie, - this.sessionMetadata); + this.sessionMetadata, + this.actor); } @java.lang.Override @@ -227,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(); @@ -249,6 +320,8 @@ public static final class Builder { private OptionalNullable> sessionMetadata = OptionalNullable.absent(); + private Optional actor = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -268,6 +341,7 @@ public Builder from(SessionResponseContent other) { authentication(other.getAuthentication()); cookie(other.getCookie()); sessionMetadata(other.getSessionMetadata()); + actor(other.getActor()); return this; } @@ -300,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; } @@ -443,6 +637,17 @@ public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable actor) { + this.actor = actor; + return this; + } + + public Builder actor(SessionActorMetadata actor) { + this.actor = Optional.ofNullable(actor); + return this; + } + public SessionResponseContent build() { return new SessionResponseContent( id, @@ -458,6 +663,7 @@ public SessionResponseContent build() { authentication, cookie, sessionMetadata, + actor, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java index aafa490b..4b656ddf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetDefaultCustomDomainRequestContent.java @@ -99,7 +99,6 @@ public Builder from(SetDefaultCustomDomainRequestContent other) { } /** - *

                                                              The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain.

                                                              *

                                                              The domain to set as the default custom domain. Must be a verified custom domain or the canonical domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SetEmailFactorSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetEmailFactorSettingsResponseContent.java new file mode 100644 index 00000000..914e4ad3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SetEmailFactorSettingsResponseContent.java @@ -0,0 +1,161 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetEmailFactorSettingsResponseContent.Builder.class) +public final class SetEmailFactorSettingsResponseContent { + private final int otpLength; + + private final int otpExpirationTime; + + private final Map additionalProperties; + + private SetEmailFactorSettingsResponseContent( + int otpLength, int otpExpirationTime, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public int getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public int getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetEmailFactorSettingsResponseContent + && equalTo((SetEmailFactorSettingsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetEmailFactorSettingsResponseContent other) { + return otpLength == other.otpLength && otpExpirationTime == other.otpExpirationTime; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OtpLengthStage builder() { + return new Builder(); + } + + public interface OtpLengthStage { + /** + *

                                                              The length of the OTP code.

                                                              + */ + OtpExpirationTimeStage otpLength(int otpLength); + + Builder from(SetEmailFactorSettingsResponseContent other); + } + + public interface OtpExpirationTimeStage { + /** + *

                                                              The OTP expiration time in seconds.

                                                              + */ + _FinalStage otpExpirationTime(int otpExpirationTime); + } + + public interface _FinalStage { + SetEmailFactorSettingsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OtpLengthStage, OtpExpirationTimeStage, _FinalStage { + private int otpLength; + + private int otpExpirationTime; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetEmailFactorSettingsResponseContent other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

                                                              The length of the OTP code.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_length") + public OtpExpirationTimeStage otpLength(int otpLength) { + this.otpLength = otpLength; + return this; + } + + /** + *

                                                              The OTP expiration time in seconds.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_expiration_time") + public _FinalStage otpExpirationTime(int otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + @java.lang.Override + public SetEmailFactorSettingsResponseContent build() { + return new SetEmailFactorSettingsResponseContent(otpLength, otpExpirationTime, 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/SetGuardianFactorPhoneTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneTemplatesResponseContent.java index 24ca6daa..4e6034a7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneTemplatesResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneTemplatesResponseContent.java @@ -122,7 +122,6 @@ public Builder from(SetGuardianFactorPhoneTemplatesResponseContent other) { } /** - *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMess } /** - *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java index e504e2b3..51259f38 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java @@ -97,7 +97,6 @@ public Builder from(SetGuardianFactorResponseContent other) { } /** - *

                                                              Whether this factor is enabled (true) or disabled (false).

                                                              *

                                                              Whether this factor is enabled (true) or disabled (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java index efe4cbbe..3ec9d35a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java @@ -122,7 +122,6 @@ public Builder from(SetGuardianFactorSmsTemplatesResponseContent other) { } /** - *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              *

                                                              Message sent to the user when they are invited to enroll with a phone number.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -134,7 +133,6 @@ public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMess } /** - *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              *

                                                              Message sent to the user when they are prompted to verify their account.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianSettingsRequestContent.java new file mode 100644 index 00000000..90c37822 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SetGuardianSettingsRequestContent.java @@ -0,0 +1,245 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetGuardianSettingsRequestContent.Builder.class) +public final class SetGuardianSettingsRequestContent { + private final boolean displayRememberMeCheckbox; + + private final boolean rememberMeDefaultValue; + + private final int mfaSessionInactivityTimeout; + + private final int mfaSessionOverallTimeout; + + private final Map additionalProperties; + + private SetGuardianSettingsRequestContent( + boolean displayRememberMeCheckbox, + boolean rememberMeDefaultValue, + int mfaSessionInactivityTimeout, + int mfaSessionOverallTimeout, + Map additionalProperties) { + this.displayRememberMeCheckbox = displayRememberMeCheckbox; + this.rememberMeDefaultValue = rememberMeDefaultValue; + this.mfaSessionInactivityTimeout = mfaSessionInactivityTimeout; + this.mfaSessionOverallTimeout = mfaSessionOverallTimeout; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login. + */ + @JsonProperty("display_remember_me_checkbox") + public boolean getDisplayRememberMeCheckbox() { + return displayRememberMeCheckbox; + } + + /** + * @return Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login. + */ + @JsonProperty("remember_me_default_value") + public boolean getRememberMeDefaultValue() { + return rememberMeDefaultValue; + } + + /** + * @return Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout. + */ + @JsonProperty("mfa_session_inactivity_timeout") + public int getMfaSessionInactivityTimeout() { + return mfaSessionInactivityTimeout; + } + + /** + * @return Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days. + */ + @JsonProperty("mfa_session_overall_timeout") + public int getMfaSessionOverallTimeout() { + return mfaSessionOverallTimeout; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetGuardianSettingsRequestContent && equalTo((SetGuardianSettingsRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetGuardianSettingsRequestContent other) { + return displayRememberMeCheckbox == other.displayRememberMeCheckbox + && rememberMeDefaultValue == other.rememberMeDefaultValue + && mfaSessionInactivityTimeout == other.mfaSessionInactivityTimeout + && mfaSessionOverallTimeout == other.mfaSessionOverallTimeout; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.displayRememberMeCheckbox, + this.rememberMeDefaultValue, + this.mfaSessionInactivityTimeout, + this.mfaSessionOverallTimeout); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DisplayRememberMeCheckboxStage builder() { + return new Builder(); + } + + public interface DisplayRememberMeCheckboxStage { + /** + *

                                                              Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + */ + RememberMeDefaultValueStage displayRememberMeCheckbox(boolean displayRememberMeCheckbox); + + Builder from(SetGuardianSettingsRequestContent other); + } + + public interface RememberMeDefaultValueStage { + /** + *

                                                              Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + */ + MfaSessionInactivityTimeoutStage rememberMeDefaultValue(boolean rememberMeDefaultValue); + } + + public interface MfaSessionInactivityTimeoutStage { + /** + *

                                                              Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout.

                                                              + */ + MfaSessionOverallTimeoutStage mfaSessionInactivityTimeout(int mfaSessionInactivityTimeout); + } + + public interface MfaSessionOverallTimeoutStage { + /** + *

                                                              Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days.

                                                              + */ + _FinalStage mfaSessionOverallTimeout(int mfaSessionOverallTimeout); + } + + public interface _FinalStage { + SetGuardianSettingsRequestContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements DisplayRememberMeCheckboxStage, + RememberMeDefaultValueStage, + MfaSessionInactivityTimeoutStage, + MfaSessionOverallTimeoutStage, + _FinalStage { + private boolean displayRememberMeCheckbox; + + private boolean rememberMeDefaultValue; + + private int mfaSessionInactivityTimeout; + + private int mfaSessionOverallTimeout; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetGuardianSettingsRequestContent other) { + displayRememberMeCheckbox(other.getDisplayRememberMeCheckbox()); + rememberMeDefaultValue(other.getRememberMeDefaultValue()); + mfaSessionInactivityTimeout(other.getMfaSessionInactivityTimeout()); + mfaSessionOverallTimeout(other.getMfaSessionOverallTimeout()); + return this; + } + + /** + *

                                                              Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("display_remember_me_checkbox") + public RememberMeDefaultValueStage displayRememberMeCheckbox(boolean displayRememberMeCheckbox) { + this.displayRememberMeCheckbox = displayRememberMeCheckbox; + return this; + } + + /** + *

                                                              Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("remember_me_default_value") + public MfaSessionInactivityTimeoutStage rememberMeDefaultValue(boolean rememberMeDefaultValue) { + this.rememberMeDefaultValue = rememberMeDefaultValue; + return this; + } + + /** + *

                                                              Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("mfa_session_inactivity_timeout") + public MfaSessionOverallTimeoutStage mfaSessionInactivityTimeout(int mfaSessionInactivityTimeout) { + this.mfaSessionInactivityTimeout = mfaSessionInactivityTimeout; + return this; + } + + /** + *

                                                              Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("mfa_session_overall_timeout") + public _FinalStage mfaSessionOverallTimeout(int mfaSessionOverallTimeout) { + this.mfaSessionOverallTimeout = mfaSessionOverallTimeout; + return this; + } + + @java.lang.Override + public SetGuardianSettingsRequestContent build() { + return new SetGuardianSettingsRequestContent( + displayRememberMeCheckbox, + rememberMeDefaultValue, + mfaSessionInactivityTimeout, + mfaSessionOverallTimeout, + 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/SetGuardianSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianSettingsResponseContent.java new file mode 100644 index 00000000..f84a3cfe --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SetGuardianSettingsResponseContent.java @@ -0,0 +1,246 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetGuardianSettingsResponseContent.Builder.class) +public final class SetGuardianSettingsResponseContent { + private final boolean displayRememberMeCheckbox; + + private final boolean rememberMeDefaultValue; + + private final int mfaSessionInactivityTimeout; + + private final int mfaSessionOverallTimeout; + + private final Map additionalProperties; + + private SetGuardianSettingsResponseContent( + boolean displayRememberMeCheckbox, + boolean rememberMeDefaultValue, + int mfaSessionInactivityTimeout, + int mfaSessionOverallTimeout, + Map additionalProperties) { + this.displayRememberMeCheckbox = displayRememberMeCheckbox; + this.rememberMeDefaultValue = rememberMeDefaultValue; + this.mfaSessionInactivityTimeout = mfaSessionInactivityTimeout; + this.mfaSessionOverallTimeout = mfaSessionOverallTimeout; + this.additionalProperties = additionalProperties; + } + + /** + * @return Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login. + */ + @JsonProperty("display_remember_me_checkbox") + public boolean getDisplayRememberMeCheckbox() { + return displayRememberMeCheckbox; + } + + /** + * @return Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login. + */ + @JsonProperty("remember_me_default_value") + public boolean getRememberMeDefaultValue() { + return rememberMeDefaultValue; + } + + /** + * @return Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout. + */ + @JsonProperty("mfa_session_inactivity_timeout") + public int getMfaSessionInactivityTimeout() { + return mfaSessionInactivityTimeout; + } + + /** + * @return Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days. + */ + @JsonProperty("mfa_session_overall_timeout") + public int getMfaSessionOverallTimeout() { + return mfaSessionOverallTimeout; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetGuardianSettingsResponseContent + && equalTo((SetGuardianSettingsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetGuardianSettingsResponseContent other) { + return displayRememberMeCheckbox == other.displayRememberMeCheckbox + && rememberMeDefaultValue == other.rememberMeDefaultValue + && mfaSessionInactivityTimeout == other.mfaSessionInactivityTimeout + && mfaSessionOverallTimeout == other.mfaSessionOverallTimeout; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.displayRememberMeCheckbox, + this.rememberMeDefaultValue, + this.mfaSessionInactivityTimeout, + this.mfaSessionOverallTimeout); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static DisplayRememberMeCheckboxStage builder() { + return new Builder(); + } + + public interface DisplayRememberMeCheckboxStage { + /** + *

                                                              Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + */ + RememberMeDefaultValueStage displayRememberMeCheckbox(boolean displayRememberMeCheckbox); + + Builder from(SetGuardianSettingsResponseContent other); + } + + public interface RememberMeDefaultValueStage { + /** + *

                                                              Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + */ + MfaSessionInactivityTimeoutStage rememberMeDefaultValue(boolean rememberMeDefaultValue); + } + + public interface MfaSessionInactivityTimeoutStage { + /** + *

                                                              Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout.

                                                              + */ + MfaSessionOverallTimeoutStage mfaSessionInactivityTimeout(int mfaSessionInactivityTimeout); + } + + public interface MfaSessionOverallTimeoutStage { + /** + *

                                                              Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days.

                                                              + */ + _FinalStage mfaSessionOverallTimeout(int mfaSessionOverallTimeout); + } + + public interface _FinalStage { + SetGuardianSettingsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements DisplayRememberMeCheckboxStage, + RememberMeDefaultValueStage, + MfaSessionInactivityTimeoutStage, + MfaSessionOverallTimeoutStage, + _FinalStage { + private boolean displayRememberMeCheckbox; + + private boolean rememberMeDefaultValue; + + private int mfaSessionInactivityTimeout; + + private int mfaSessionOverallTimeout; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetGuardianSettingsResponseContent other) { + displayRememberMeCheckbox(other.getDisplayRememberMeCheckbox()); + rememberMeDefaultValue(other.getRememberMeDefaultValue()); + mfaSessionInactivityTimeout(other.getMfaSessionInactivityTimeout()); + mfaSessionOverallTimeout(other.getMfaSessionOverallTimeout()); + return this; + } + + /** + *

                                                              Determines whether to display the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("display_remember_me_checkbox") + public RememberMeDefaultValueStage displayRememberMeCheckbox(boolean displayRememberMeCheckbox) { + this.displayRememberMeCheckbox = displayRememberMeCheckbox; + return this; + } + + /** + *

                                                              Determines the default state of the "Remember Me" checkbox on the MFA prompt in Universal Login.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("remember_me_default_value") + public MfaSessionInactivityTimeoutStage rememberMeDefaultValue(boolean rememberMeDefaultValue) { + this.rememberMeDefaultValue = rememberMeDefaultValue; + return this; + } + + /** + *

                                                              Duration of inactivity after which the user will be prompted for MFA. Represented as seconds. Minimum duration is 1 hour, maximum is 30 days, and cannot exceed the overall timeout.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("mfa_session_inactivity_timeout") + public MfaSessionOverallTimeoutStage mfaSessionInactivityTimeout(int mfaSessionInactivityTimeout) { + this.mfaSessionInactivityTimeout = mfaSessionInactivityTimeout; + return this; + } + + /** + *

                                                              Maximum duration after which the user will be prompted for MFA regardless of activity. Represented as seconds. Minimum duration is 1 hour, maximum is 90 days.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("mfa_session_overall_timeout") + public _FinalStage mfaSessionOverallTimeout(int mfaSessionOverallTimeout) { + this.mfaSessionOverallTimeout = mfaSessionOverallTimeout; + return this; + } + + @java.lang.Override + public SetGuardianSettingsResponseContent build() { + return new SetGuardianSettingsResponseContent( + displayRememberMeCheckbox, + rememberMeDefaultValue, + mfaSessionInactivityTimeout, + mfaSessionOverallTimeout, + 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/SetNetworkAclRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclRequestContent.java index 11890ffa..abee3e98 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclRequestContent.java @@ -166,7 +166,6 @@ public ActiveStage description(@NotNull String description) { } /** - *

                                                              Indicates whether or not this access control list is actively being used

                                                              *

                                                              Indicates whether or not this access control list is actively being used

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SetPhoneFactorSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetPhoneFactorSettingsResponseContent.java new file mode 100644 index 00000000..81050564 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SetPhoneFactorSettingsResponseContent.java @@ -0,0 +1,161 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SetPhoneFactorSettingsResponseContent.Builder.class) +public final class SetPhoneFactorSettingsResponseContent { + private final int otpLength; + + private final int otpExpirationTime; + + private final Map additionalProperties; + + private SetPhoneFactorSettingsResponseContent( + int otpLength, int otpExpirationTime, Map additionalProperties) { + this.otpLength = otpLength; + this.otpExpirationTime = otpExpirationTime; + this.additionalProperties = additionalProperties; + } + + /** + * @return The length of the OTP code. + */ + @JsonProperty("otp_length") + public int getOtpLength() { + return otpLength; + } + + /** + * @return The OTP expiration time in seconds. + */ + @JsonProperty("otp_expiration_time") + public int getOtpExpirationTime() { + return otpExpirationTime; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SetPhoneFactorSettingsResponseContent + && equalTo((SetPhoneFactorSettingsResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SetPhoneFactorSettingsResponseContent other) { + return otpLength == other.otpLength && otpExpirationTime == other.otpExpirationTime; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.otpLength, this.otpExpirationTime); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static OtpLengthStage builder() { + return new Builder(); + } + + public interface OtpLengthStage { + /** + *

                                                              The length of the OTP code.

                                                              + */ + OtpExpirationTimeStage otpLength(int otpLength); + + Builder from(SetPhoneFactorSettingsResponseContent other); + } + + public interface OtpExpirationTimeStage { + /** + *

                                                              The OTP expiration time in seconds.

                                                              + */ + _FinalStage otpExpirationTime(int otpExpirationTime); + } + + public interface _FinalStage { + SetPhoneFactorSettingsResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements OtpLengthStage, OtpExpirationTimeStage, _FinalStage { + private int otpLength; + + private int otpExpirationTime; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SetPhoneFactorSettingsResponseContent other) { + otpLength(other.getOtpLength()); + otpExpirationTime(other.getOtpExpirationTime()); + return this; + } + + /** + *

                                                              The length of the OTP code.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_length") + public OtpExpirationTimeStage otpLength(int otpLength) { + this.otpLength = otpLength; + return this; + } + + /** + *

                                                              The OTP expiration time in seconds.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("otp_expiration_time") + public _FinalStage otpExpirationTime(int otpExpirationTime) { + this.otpExpirationTime = otpExpirationTime; + return this; + } + + @java.lang.Override + public SetPhoneFactorSettingsResponseContent build() { + return new SetPhoneFactorSettingsResponseContent(otpLength, otpExpirationTime, 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/SetRulesConfigRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigRequestContent.java index fe34bbee..7dc2bf11 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigRequestContent.java @@ -98,7 +98,6 @@ public Builder from(SetRulesConfigRequestContent other) { } /** - *

                                                              Value for a rules config variable.

                                                              *

                                                              Value for a rules config variable.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java index c4194eca..c215e5b4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java @@ -119,7 +119,6 @@ public Builder from(SetRulesConfigResponseContent other) { } /** - *

                                                              Key for a rules config variable.

                                                              *

                                                              Key for a rules config variable.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,7 +130,6 @@ public ValueStage key(@NotNull String key) { } /** - *

                                                              Value for a rules config variable.

                                                              *

                                                              Value for a rules config variable.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/Sidebar.java b/src/main/java/com/auth0/client/mgmt/types/Sidebar.java new file mode 100644 index 00000000..d7dbc0dc --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/Sidebar.java @@ -0,0 +1,106 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Sidebar.Builder.class) +public final class Sidebar { + private final Optional> components; + + private final Map additionalProperties; + + private Sidebar(Optional> components, Map additionalProperties) { + this.components = components; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("components") + public Optional> getComponents() { + return components; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Sidebar && equalTo((Sidebar) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Sidebar other) { + return components.equals(other.components); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.components); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> components = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(Sidebar other) { + components(other.getComponents()); + return this; + } + + @JsonSetter(value = "components", nulls = Nulls.SKIP) + public Builder components(Optional> components) { + this.components = components; + return this; + } + + public Builder components(List components) { + this.components = Optional.ofNullable(components); + return this; + } + + public Sidebar build() { + return new Sidebar(components, 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/SidebarComponent.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponent.java new file mode 100644 index 00000000..0f2c9be2 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponent.java @@ -0,0 +1,346 @@ +/** + * 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.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; + +public final class SidebarComponent { + private final Value value; + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private SidebarComponent(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static SidebarComponent sidebarComponentAuth0ExternalLink(SidebarComponentAuth0ExternalLink value) { + return new SidebarComponent(new SidebarComponentAuth0ExternalLinkValue(value)); + } + + public static SidebarComponent sidebarComponentAuth0InternalLink(SidebarComponentAuth0InternalLink value) { + return new SidebarComponent(new SidebarComponentAuth0InternalLinkValue(value)); + } + + public static SidebarComponent sidebarComponentAuth0ExternalLinkV2(SidebarComponentAuth0ExternalLinkV2 value) { + return new SidebarComponent(new SidebarComponentAuth0ExternalLinkV2Value(value)); + } + + public static SidebarComponent sidebarComponentAuth0InternalLinkV2(SidebarComponentAuth0InternalLinkV2 value) { + return new SidebarComponent(new SidebarComponentAuth0InternalLinkV2Value(value)); + } + + public boolean isSidebarComponentAuth0ExternalLink() { + return value instanceof SidebarComponentAuth0ExternalLinkValue; + } + + public boolean isSidebarComponentAuth0InternalLink() { + return value instanceof SidebarComponentAuth0InternalLinkValue; + } + + public boolean isSidebarComponentAuth0ExternalLinkV2() { + return value instanceof SidebarComponentAuth0ExternalLinkV2Value; + } + + public boolean isSidebarComponentAuth0InternalLinkV2() { + return value instanceof SidebarComponentAuth0InternalLinkV2Value; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getSidebarComponentAuth0ExternalLink() { + if (isSidebarComponentAuth0ExternalLink()) { + return Optional.of(((SidebarComponentAuth0ExternalLinkValue) value).value); + } + return Optional.empty(); + } + + public Optional getSidebarComponentAuth0InternalLink() { + if (isSidebarComponentAuth0InternalLink()) { + return Optional.of(((SidebarComponentAuth0InternalLinkValue) value).value); + } + return Optional.empty(); + } + + public Optional getSidebarComponentAuth0ExternalLinkV2() { + if (isSidebarComponentAuth0ExternalLinkV2()) { + return Optional.of(((SidebarComponentAuth0ExternalLinkV2Value) value).value); + } + return Optional.empty(); + } + + public Optional getSidebarComponentAuth0InternalLinkV2() { + if (isSidebarComponentAuth0InternalLinkV2()) { + return Optional.of(((SidebarComponentAuth0InternalLinkV2Value) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponent && value.equals(((SidebarComponent) other).value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + return value.toString(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitSidebarComponentAuth0ExternalLink(SidebarComponentAuth0ExternalLink sidebarComponentAuth0ExternalLink); + + T visitSidebarComponentAuth0InternalLink(SidebarComponentAuth0InternalLink sidebarComponentAuth0InternalLink); + + T visitSidebarComponentAuth0ExternalLinkV2( + SidebarComponentAuth0ExternalLinkV2 sidebarComponentAuth0ExternalLinkV2); + + T visitSidebarComponentAuth0InternalLinkV2( + SidebarComponentAuth0InternalLinkV2 sidebarComponentAuth0InternalLinkV2); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(SidebarComponentAuth0ExternalLinkValue.class), + @JsonSubTypes.Type(SidebarComponentAuth0InternalLinkValue.class), + @JsonSubTypes.Type(SidebarComponentAuth0ExternalLinkV2Value.class), + @JsonSubTypes.Type(SidebarComponentAuth0InternalLinkV2Value.class) + }) + @JsonIgnoreProperties(ignoreUnknown = true) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("sidebar:component:auth0:external_link") + @JsonIgnoreProperties("type") + private static final class SidebarComponentAuth0ExternalLinkValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private SidebarComponentAuth0ExternalLink value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private SidebarComponentAuth0ExternalLinkValue() {} + + private SidebarComponentAuth0ExternalLinkValue(SidebarComponentAuth0ExternalLink value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitSidebarComponentAuth0ExternalLink(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0ExternalLinkValue + && equalTo((SidebarComponentAuth0ExternalLinkValue) other); + } + + private boolean equalTo(SidebarComponentAuth0ExternalLinkValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "SidebarComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("sidebar:component:auth0:internal_link") + @JsonIgnoreProperties("type") + private static final class SidebarComponentAuth0InternalLinkValue implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private SidebarComponentAuth0InternalLink value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private SidebarComponentAuth0InternalLinkValue() {} + + private SidebarComponentAuth0InternalLinkValue(SidebarComponentAuth0InternalLink value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitSidebarComponentAuth0InternalLink(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0InternalLinkValue + && equalTo((SidebarComponentAuth0InternalLinkValue) other); + } + + private boolean equalTo(SidebarComponentAuth0InternalLinkValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "SidebarComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("sidebar:component:auth0:external_link:v2") + @JsonIgnoreProperties("type") + private static final class SidebarComponentAuth0ExternalLinkV2Value implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private SidebarComponentAuth0ExternalLinkV2 value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private SidebarComponentAuth0ExternalLinkV2Value() {} + + private SidebarComponentAuth0ExternalLinkV2Value(SidebarComponentAuth0ExternalLinkV2 value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitSidebarComponentAuth0ExternalLinkV2(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0ExternalLinkV2Value + && equalTo((SidebarComponentAuth0ExternalLinkV2Value) other); + } + + private boolean equalTo(SidebarComponentAuth0ExternalLinkV2Value other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "SidebarComponent{" + "value: " + value + "}"; + } + } + + @JsonTypeName("sidebar:component:auth0:internal_link:v2") + @JsonIgnoreProperties("type") + private static final class SidebarComponentAuth0InternalLinkV2Value implements Value { + @JsonUnwrapped + @JsonIgnoreProperties(value = "type", allowSetters = true) + private SidebarComponentAuth0InternalLinkV2 value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private SidebarComponentAuth0InternalLinkV2Value() {} + + private SidebarComponentAuth0InternalLinkV2Value(SidebarComponentAuth0InternalLinkV2 value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitSidebarComponentAuth0InternalLinkV2(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0InternalLinkV2Value + && equalTo((SidebarComponentAuth0InternalLinkV2Value) other); + } + + private boolean equalTo(SidebarComponentAuth0InternalLinkV2Value other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "SidebarComponent{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("type") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "SidebarComponent{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLink.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLink.java new file mode 100644 index 00000000..eb9a2480 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLink.java @@ -0,0 +1,119 @@ +/** + * 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 = SidebarComponentAuth0ExternalLink.Builder.class) +public final class SidebarComponentAuth0ExternalLink { + private final SidebarComponentAuth0ExternalLinkConfig config; + + private final Map additionalProperties; + + private SidebarComponentAuth0ExternalLink( + SidebarComponentAuth0ExternalLinkConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public SidebarComponentAuth0ExternalLinkConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0ExternalLink && equalTo((SidebarComponentAuth0ExternalLink) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0ExternalLink other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull SidebarComponentAuth0ExternalLinkConfig config); + + Builder from(SidebarComponentAuth0ExternalLink other); + } + + public interface _FinalStage { + SidebarComponentAuth0ExternalLink build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private SidebarComponentAuth0ExternalLinkConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0ExternalLink other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull SidebarComponentAuth0ExternalLinkConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public SidebarComponentAuth0ExternalLink build() { + return new SidebarComponentAuth0ExternalLink(config, 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/SidebarComponentAuth0ExternalLinkConfig.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLinkConfig.java new file mode 100644 index 00000000..8e36e630 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLinkConfig.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SidebarComponentAuth0ExternalLinkConfig.Builder.class) +public final class SidebarComponentAuth0ExternalLinkConfig { + private final String label; + + private final String url; + + private final Optional icon; + + private final Map additionalProperties; + + private SidebarComponentAuth0ExternalLinkConfig( + String label, String url, Optional icon, Map additionalProperties) { + this.label = label; + this.url = url; + this.icon = icon; + this.additionalProperties = additionalProperties; + } + + /** + * @return Text shown for the link. + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * @return External URL to navigate to. + */ + @JsonProperty("url") + public String getUrl() { + return url; + } + + /** + * @return Name of the icon displayed next to the link label. + */ + @JsonProperty("icon") + public Optional getIcon() { + return icon; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0ExternalLinkConfig + && equalTo((SidebarComponentAuth0ExternalLinkConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0ExternalLinkConfig other) { + return label.equals(other.label) && url.equals(other.url) && icon.equals(other.icon); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.label, this.url, this.icon); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LabelStage builder() { + return new Builder(); + } + + public interface LabelStage { + /** + *

                                                              Text shown for the link.

                                                              + */ + UrlStage label(@NotNull String label); + + Builder from(SidebarComponentAuth0ExternalLinkConfig other); + } + + public interface UrlStage { + /** + *

                                                              External URL to navigate to.

                                                              + */ + _FinalStage url(@NotNull String url); + } + + public interface _FinalStage { + SidebarComponentAuth0ExternalLinkConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + _FinalStage icon(Optional icon); + + _FinalStage icon(String icon); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LabelStage, UrlStage, _FinalStage { + private String label; + + private String url; + + private Optional icon = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0ExternalLinkConfig other) { + label(other.getLabel()); + url(other.getUrl()); + icon(other.getIcon()); + return this; + } + + /** + *

                                                              Text shown for the link.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("label") + public UrlStage label(@NotNull String label) { + this.label = Objects.requireNonNull(label, "label must not be null"); + return this; + } + + /** + *

                                                              External URL to navigate to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("url") + public _FinalStage url(@NotNull String url) { + this.url = Objects.requireNonNull(url, "url must not be null"); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage icon(String icon) { + this.icon = Optional.ofNullable(icon); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon", nulls = Nulls.SKIP) + public _FinalStage icon(Optional icon) { + this.icon = icon; + return this; + } + + @java.lang.Override + public SidebarComponentAuth0ExternalLinkConfig build() { + return new SidebarComponentAuth0ExternalLinkConfig(label, url, icon, 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/SidebarComponentAuth0ExternalLinkV2.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLinkV2.java new file mode 100644 index 00000000..87969168 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLinkV2.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 = SidebarComponentAuth0ExternalLinkV2.Builder.class) +public final class SidebarComponentAuth0ExternalLinkV2 { + private final SidebarComponentAuth0ExternalLinkV2Config config; + + private final Map additionalProperties; + + private SidebarComponentAuth0ExternalLinkV2( + SidebarComponentAuth0ExternalLinkV2Config config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public SidebarComponentAuth0ExternalLinkV2Config getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0ExternalLinkV2 + && equalTo((SidebarComponentAuth0ExternalLinkV2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0ExternalLinkV2 other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull SidebarComponentAuth0ExternalLinkV2Config config); + + Builder from(SidebarComponentAuth0ExternalLinkV2 other); + } + + public interface _FinalStage { + SidebarComponentAuth0ExternalLinkV2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private SidebarComponentAuth0ExternalLinkV2Config config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0ExternalLinkV2 other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull SidebarComponentAuth0ExternalLinkV2Config config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public SidebarComponentAuth0ExternalLinkV2 build() { + return new SidebarComponentAuth0ExternalLinkV2(config, 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/SidebarComponentAuth0ExternalLinkV2Config.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLinkV2Config.java new file mode 100644 index 00000000..34ed5960 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0ExternalLinkV2Config.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SidebarComponentAuth0ExternalLinkV2Config.Builder.class) +public final class SidebarComponentAuth0ExternalLinkV2Config { + private final String label; + + private final String href; + + private final Optional icon; + + private final Map additionalProperties; + + private SidebarComponentAuth0ExternalLinkV2Config( + String label, String href, Optional icon, Map additionalProperties) { + this.label = label; + this.href = href; + this.icon = icon; + this.additionalProperties = additionalProperties; + } + + /** + * @return Text shown for the link. + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * @return External URL to navigate to. + */ + @JsonProperty("href") + public String getHref() { + return href; + } + + /** + * @return Name of the icon displayed next to the link label. + */ + @JsonProperty("icon") + public Optional getIcon() { + return icon; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0ExternalLinkV2Config + && equalTo((SidebarComponentAuth0ExternalLinkV2Config) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0ExternalLinkV2Config other) { + return label.equals(other.label) && href.equals(other.href) && icon.equals(other.icon); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.label, this.href, this.icon); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LabelStage builder() { + return new Builder(); + } + + public interface LabelStage { + /** + *

                                                              Text shown for the link.

                                                              + */ + HrefStage label(@NotNull String label); + + Builder from(SidebarComponentAuth0ExternalLinkV2Config other); + } + + public interface HrefStage { + /** + *

                                                              External URL to navigate to.

                                                              + */ + _FinalStage href(@NotNull String href); + } + + public interface _FinalStage { + SidebarComponentAuth0ExternalLinkV2Config build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + _FinalStage icon(Optional icon); + + _FinalStage icon(String icon); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LabelStage, HrefStage, _FinalStage { + private String label; + + private String href; + + private Optional icon = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0ExternalLinkV2Config other) { + label(other.getLabel()); + href(other.getHref()); + icon(other.getIcon()); + return this; + } + + /** + *

                                                              Text shown for the link.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("label") + public HrefStage label(@NotNull String label) { + this.label = Objects.requireNonNull(label, "label must not be null"); + return this; + } + + /** + *

                                                              External URL to navigate to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("href") + public _FinalStage href(@NotNull String href) { + this.href = Objects.requireNonNull(href, "href must not be null"); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage icon(String icon) { + this.icon = Optional.ofNullable(icon); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon", nulls = Nulls.SKIP) + public _FinalStage icon(Optional icon) { + this.icon = icon; + return this; + } + + @java.lang.Override + public SidebarComponentAuth0ExternalLinkV2Config build() { + return new SidebarComponentAuth0ExternalLinkV2Config(label, href, icon, 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/SidebarComponentAuth0InternalLink.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLink.java new file mode 100644 index 00000000..1debf52f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLink.java @@ -0,0 +1,119 @@ +/** + * 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 = SidebarComponentAuth0InternalLink.Builder.class) +public final class SidebarComponentAuth0InternalLink { + private final SidebarComponentAuth0InternalLinkConfig config; + + private final Map additionalProperties; + + private SidebarComponentAuth0InternalLink( + SidebarComponentAuth0InternalLinkConfig config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public SidebarComponentAuth0InternalLinkConfig getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0InternalLink && equalTo((SidebarComponentAuth0InternalLink) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0InternalLink other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull SidebarComponentAuth0InternalLinkConfig config); + + Builder from(SidebarComponentAuth0InternalLink other); + } + + public interface _FinalStage { + SidebarComponentAuth0InternalLink build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private SidebarComponentAuth0InternalLinkConfig config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0InternalLink other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull SidebarComponentAuth0InternalLinkConfig config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public SidebarComponentAuth0InternalLink build() { + return new SidebarComponentAuth0InternalLink(config, 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/SidebarComponentAuth0InternalLinkConfig.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLinkConfig.java new file mode 100644 index 00000000..6b2d67d6 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLinkConfig.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SidebarComponentAuth0InternalLinkConfig.Builder.class) +public final class SidebarComponentAuth0InternalLinkConfig { + private final String label; + + private final String to; + + private final Optional icon; + + private final Map additionalProperties; + + private SidebarComponentAuth0InternalLinkConfig( + String label, String to, Optional icon, Map additionalProperties) { + this.label = label; + this.to = to; + this.icon = icon; + this.additionalProperties = additionalProperties; + } + + /** + * @return Text shown for the link. + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * @return Slug of the internal portal page to navigate to. + */ + @JsonProperty("to") + public String getTo() { + return to; + } + + /** + * @return Name of the icon displayed next to the link label. + */ + @JsonProperty("icon") + public Optional getIcon() { + return icon; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0InternalLinkConfig + && equalTo((SidebarComponentAuth0InternalLinkConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0InternalLinkConfig other) { + return label.equals(other.label) && to.equals(other.to) && icon.equals(other.icon); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.label, this.to, this.icon); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LabelStage builder() { + return new Builder(); + } + + public interface LabelStage { + /** + *

                                                              Text shown for the link.

                                                              + */ + ToStage label(@NotNull String label); + + Builder from(SidebarComponentAuth0InternalLinkConfig other); + } + + public interface ToStage { + /** + *

                                                              Slug of the internal portal page to navigate to.

                                                              + */ + _FinalStage to(@NotNull String to); + } + + public interface _FinalStage { + SidebarComponentAuth0InternalLinkConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + _FinalStage icon(Optional icon); + + _FinalStage icon(String icon); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LabelStage, ToStage, _FinalStage { + private String label; + + private String to; + + private Optional icon = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0InternalLinkConfig other) { + label(other.getLabel()); + to(other.getTo()); + icon(other.getIcon()); + return this; + } + + /** + *

                                                              Text shown for the link.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("label") + public ToStage label(@NotNull String label) { + this.label = Objects.requireNonNull(label, "label must not be null"); + return this; + } + + /** + *

                                                              Slug of the internal portal page to navigate to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("to") + public _FinalStage to(@NotNull String to) { + this.to = Objects.requireNonNull(to, "to must not be null"); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage icon(String icon) { + this.icon = Optional.ofNullable(icon); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon", nulls = Nulls.SKIP) + public _FinalStage icon(Optional icon) { + this.icon = icon; + return this; + } + + @java.lang.Override + public SidebarComponentAuth0InternalLinkConfig build() { + return new SidebarComponentAuth0InternalLinkConfig(label, to, icon, 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/SidebarComponentAuth0InternalLinkV2.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLinkV2.java new file mode 100644 index 00000000..8ec3113f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLinkV2.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 = SidebarComponentAuth0InternalLinkV2.Builder.class) +public final class SidebarComponentAuth0InternalLinkV2 { + private final SidebarComponentAuth0InternalLinkV2Config config; + + private final Map additionalProperties; + + private SidebarComponentAuth0InternalLinkV2( + SidebarComponentAuth0InternalLinkV2Config config, Map additionalProperties) { + this.config = config; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("config") + public SidebarComponentAuth0InternalLinkV2Config getConfig() { + return config; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0InternalLinkV2 + && equalTo((SidebarComponentAuth0InternalLinkV2) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0InternalLinkV2 other) { + return config.equals(other.config); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + _FinalStage config(@NotNull SidebarComponentAuth0InternalLinkV2Config config); + + Builder from(SidebarComponentAuth0InternalLinkV2 other); + } + + public interface _FinalStage { + SidebarComponentAuth0InternalLinkV2 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private SidebarComponentAuth0InternalLinkV2Config config; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0InternalLinkV2 other) { + config(other.getConfig()); + return this; + } + + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull SidebarComponentAuth0InternalLinkV2Config config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + @java.lang.Override + public SidebarComponentAuth0InternalLinkV2 build() { + return new SidebarComponentAuth0InternalLinkV2(config, 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/SidebarComponentAuth0InternalLinkV2Config.java b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLinkV2Config.java new file mode 100644 index 00000000..16e3720e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SidebarComponentAuth0InternalLinkV2Config.java @@ -0,0 +1,205 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SidebarComponentAuth0InternalLinkV2Config.Builder.class) +public final class SidebarComponentAuth0InternalLinkV2Config { + private final String label; + + private final String pageSlug; + + private final Optional icon; + + private final Map additionalProperties; + + private SidebarComponentAuth0InternalLinkV2Config( + String label, String pageSlug, Optional icon, Map additionalProperties) { + this.label = label; + this.pageSlug = pageSlug; + this.icon = icon; + this.additionalProperties = additionalProperties; + } + + /** + * @return Text shown for the link. + */ + @JsonProperty("label") + public String getLabel() { + return label; + } + + /** + * @return Slug of the internal portal page to navigate to. + */ + @JsonProperty("page_slug") + public String getPageSlug() { + return pageSlug; + } + + /** + * @return Name of the icon displayed next to the link label. + */ + @JsonProperty("icon") + public Optional getIcon() { + return icon; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SidebarComponentAuth0InternalLinkV2Config + && equalTo((SidebarComponentAuth0InternalLinkV2Config) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SidebarComponentAuth0InternalLinkV2Config other) { + return label.equals(other.label) && pageSlug.equals(other.pageSlug) && icon.equals(other.icon); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.label, this.pageSlug, this.icon); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LabelStage builder() { + return new Builder(); + } + + public interface LabelStage { + /** + *

                                                              Text shown for the link.

                                                              + */ + PageSlugStage label(@NotNull String label); + + Builder from(SidebarComponentAuth0InternalLinkV2Config other); + } + + public interface PageSlugStage { + /** + *

                                                              Slug of the internal portal page to navigate to.

                                                              + */ + _FinalStage pageSlug(@NotNull String pageSlug); + } + + public interface _FinalStage { + SidebarComponentAuth0InternalLinkV2Config build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + _FinalStage icon(Optional icon); + + _FinalStage icon(String icon); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LabelStage, PageSlugStage, _FinalStage { + private String label; + + private String pageSlug; + + private Optional icon = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SidebarComponentAuth0InternalLinkV2Config other) { + label(other.getLabel()); + pageSlug(other.getPageSlug()); + icon(other.getIcon()); + return this; + } + + /** + *

                                                              Text shown for the link.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("label") + public PageSlugStage label(@NotNull String label) { + this.label = Objects.requireNonNull(label, "label must not be null"); + return this; + } + + /** + *

                                                              Slug of the internal portal page to navigate to.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("page_slug") + public _FinalStage pageSlug(@NotNull String pageSlug) { + this.pageSlug = Objects.requireNonNull(pageSlug, "pageSlug must not be null"); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage icon(String icon) { + this.icon = Optional.ofNullable(icon); + return this; + } + + /** + *

                                                              Name of the icon displayed next to the link label.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "icon", nulls = Nulls.SKIP) + public _FinalStage icon(Optional icon) { + this.icon = icon; + return this; + } + + @java.lang.Override + public SidebarComponentAuth0InternalLinkV2Config build() { + return new SidebarComponentAuth0InternalLinkV2Config(label, pageSlug, icon, 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/SigningKeys.java b/src/main/java/com/auth0/client/mgmt/types/SigningKeys.java index 86f9b33c..b9a8db92 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SigningKeys.java +++ b/src/main/java/com/auth0/client/mgmt/types/SigningKeys.java @@ -349,7 +349,6 @@ public Builder from(SigningKeys other) { } /** - *

                                                              The key id of the signing key

                                                              *

                                                              The key id of the signing key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -361,7 +360,6 @@ public CertStage kid(@NotNull String kid) { } /** - *

                                                              The public certificate of the signing key

                                                              *

                                                              The public certificate of the signing key

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -373,7 +371,6 @@ public FingerprintStage cert(@NotNull String cert) { } /** - *

                                                              The cert fingerprint

                                                              *

                                                              The cert fingerprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -385,7 +382,6 @@ public ThumbprintStage fingerprint(@NotNull String fingerprint) { } /** - *

                                                              The cert thumbprint

                                                              *

                                                              The cert thumbprint

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java index b4c4a38d..5c6a11e0 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/types/SubscribeEventsRequestParameters.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -10,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; 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; @@ -57,7 +59,8 @@ public Optional> getEventType() { /** * @return Opaque token representing position in the stream. If not provided, stream will start from the latest events. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -68,7 +71,8 @@ public OptionalNullable getFrom() { /** * @return RFC-3339 timestamp indicating where to start streaming events from. This should only be used on the initial query when a cursor may not be available. Subsequent requests should use the cursor (from) as it will be more accurate. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from_timestamp") public OptionalNullable getFromTimestamp() { if (fromTimestamp == null) { return OptionalNullable.absent(); @@ -76,6 +80,24 @@ public OptionalNullable getFromTimestamp() { return fromTimestamp; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("event_type") + private Optional> _getEventType() { + return eventType; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from_timestamp") + private OptionalNullable _getFromTimestamp() { + return fromTimestamp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreCustomTokenExchangeStage.java b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreCustomTokenExchangeStage.java new file mode 100644 index 00000000..e9cd02c8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreCustomTokenExchangeStage.java @@ -0,0 +1,141 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SuspiciousIpThrottlingPreCustomTokenExchangeStage.Builder.class) +public final class SuspiciousIpThrottlingPreCustomTokenExchangeStage { + private final Optional maxAttempts; + + private final Optional rate; + + private final Map additionalProperties; + + private SuspiciousIpThrottlingPreCustomTokenExchangeStage( + Optional maxAttempts, Optional rate, Map additionalProperties) { + this.maxAttempts = maxAttempts; + this.rate = rate; + this.additionalProperties = additionalProperties; + } + + /** + * @return Total number of attempts allowed. + */ + @JsonProperty("max_attempts") + public Optional getMaxAttempts() { + return maxAttempts; + } + + /** + * @return Interval of time, given in milliseconds, at which new attempts are granted. + */ + @JsonProperty("rate") + public Optional getRate() { + return rate; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SuspiciousIpThrottlingPreCustomTokenExchangeStage + && equalTo((SuspiciousIpThrottlingPreCustomTokenExchangeStage) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SuspiciousIpThrottlingPreCustomTokenExchangeStage other) { + return maxAttempts.equals(other.maxAttempts) && rate.equals(other.rate); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.maxAttempts, this.rate); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional maxAttempts = Optional.empty(); + + private Optional rate = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(SuspiciousIpThrottlingPreCustomTokenExchangeStage other) { + maxAttempts(other.getMaxAttempts()); + rate(other.getRate()); + return this; + } + + /** + *

                                                              Total number of attempts allowed.

                                                              + */ + @JsonSetter(value = "max_attempts", nulls = Nulls.SKIP) + public Builder maxAttempts(Optional maxAttempts) { + this.maxAttempts = maxAttempts; + return this; + } + + public Builder maxAttempts(Integer maxAttempts) { + this.maxAttempts = Optional.ofNullable(maxAttempts); + return this; + } + + /** + *

                                                              Interval of time, given in milliseconds, at which new attempts are granted.

                                                              + */ + @JsonSetter(value = "rate", nulls = Nulls.SKIP) + public Builder rate(Optional rate) { + this.rate = rate; + return this; + } + + public Builder rate(Integer rate) { + this.rate = Optional.ofNullable(rate); + return this; + } + + public SuspiciousIpThrottlingPreCustomTokenExchangeStage build() { + return new SuspiciousIpThrottlingPreCustomTokenExchangeStage(maxAttempts, rate, 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/SuspiciousIpThrottlingStage.java b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingStage.java index 8a22c967..0c8ed619 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingStage.java +++ b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingStage.java @@ -24,14 +24,18 @@ public final class SuspiciousIpThrottlingStage { private final Optional preUserRegistration; + private final Optional preCustomTokenExchange; + private final Map additionalProperties; private SuspiciousIpThrottlingStage( Optional preLogin, Optional preUserRegistration, + Optional preCustomTokenExchange, Map additionalProperties) { this.preLogin = preLogin; this.preUserRegistration = preUserRegistration; + this.preCustomTokenExchange = preCustomTokenExchange; this.additionalProperties = additionalProperties; } @@ -45,6 +49,11 @@ public Optional getPreUserRegist return preUserRegistration; } + @JsonProperty("pre-custom-token-exchange") + public Optional getPreCustomTokenExchange() { + return preCustomTokenExchange; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -57,12 +66,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(SuspiciousIpThrottlingStage other) { - return preLogin.equals(other.preLogin) && preUserRegistration.equals(other.preUserRegistration); + return preLogin.equals(other.preLogin) + && preUserRegistration.equals(other.preUserRegistration) + && preCustomTokenExchange.equals(other.preCustomTokenExchange); } @java.lang.Override public int hashCode() { - return Objects.hash(this.preLogin, this.preUserRegistration); + return Objects.hash(this.preLogin, this.preUserRegistration, this.preCustomTokenExchange); } @java.lang.Override @@ -80,6 +91,8 @@ public static final class Builder { private Optional preUserRegistration = Optional.empty(); + private Optional preCustomTokenExchange = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -88,6 +101,7 @@ private Builder() {} public Builder from(SuspiciousIpThrottlingStage other) { preLogin(other.getPreLogin()); preUserRegistration(other.getPreUserRegistration()); + preCustomTokenExchange(other.getPreCustomTokenExchange()); return this; } @@ -114,8 +128,22 @@ public Builder preUserRegistration(SuspiciousIpThrottlingPreUserRegistrationStag return this; } + @JsonSetter(value = "pre-custom-token-exchange", nulls = Nulls.SKIP) + public Builder preCustomTokenExchange( + Optional preCustomTokenExchange) { + this.preCustomTokenExchange = preCustomTokenExchange; + return this; + } + + public Builder preCustomTokenExchange( + SuspiciousIpThrottlingPreCustomTokenExchangeStage preCustomTokenExchange) { + this.preCustomTokenExchange = Optional.ofNullable(preCustomTokenExchange); + return this; + } + public SuspiciousIpThrottlingStage build() { - return new SuspiciousIpThrottlingStage(preLogin, preUserRegistration, additionalProperties); + return new SuspiciousIpThrottlingStage( + preLogin, preUserRegistration, preCustomTokenExchange, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java b/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java index 2dd23798..f3275396 100644 --- a/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java +++ b/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupPayload.java @@ -10,10 +10,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -21,10 +23,24 @@ public final class SynchronizedGroupPayload { private final String id; + private final Optional name; + + private final Optional email; + + private final Optional directMembersCount; + private final Map additionalProperties; - private SynchronizedGroupPayload(String id, Map additionalProperties) { + private SynchronizedGroupPayload( + String id, + Optional name, + Optional email, + Optional directMembersCount, + Map additionalProperties) { this.id = id; + this.name = name; + this.email = email; + this.directMembersCount = directMembersCount; this.additionalProperties = additionalProperties; } @@ -36,6 +52,30 @@ public String getId() { return id; } + /** + * @return Google Workspace Directory group name. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return Google Workspace Directory group email. + */ + @JsonProperty("email") + public Optional getEmail() { + return email; + } + + /** + * @return Number of direct members in the Google Workspace Directory group. + */ + @JsonProperty("direct_members_count") + public Optional getDirectMembersCount() { + return directMembersCount; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -48,12 +88,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(SynchronizedGroupPayload other) { - return id.equals(other.id); + return id.equals(other.id) + && name.equals(other.name) + && email.equals(other.email) + && directMembersCount.equals(other.directMembersCount); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id); + return Objects.hash(this.id, this.name, this.email, this.directMembersCount); } @java.lang.Override @@ -80,12 +123,39 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              Google Workspace Directory group name.

                                                              + */ + _FinalStage name(Optional name); + + _FinalStage name(String name); + + /** + *

                                                              Google Workspace Directory group email.

                                                              + */ + _FinalStage email(Optional email); + + _FinalStage email(String email); + + /** + *

                                                              Number of direct members in the Google Workspace Directory group.

                                                              + */ + _FinalStage directMembersCount(Optional directMembersCount); + + _FinalStage directMembersCount(Integer directMembersCount); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements IdStage, _FinalStage { private String id; + private Optional directMembersCount = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -94,11 +164,13 @@ private Builder() {} @java.lang.Override public Builder from(SynchronizedGroupPayload other) { id(other.getId()); + name(other.getName()); + email(other.getEmail()); + directMembersCount(other.getDirectMembersCount()); return this; } /** - *

                                                              Google Workspace Directory group ID.

                                                              *

                                                              Google Workspace Directory group ID.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -109,9 +181,69 @@ public _FinalStage id(@NotNull String id) { return this; } + /** + *

                                                              Number of direct members in the Google Workspace Directory group.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage directMembersCount(Integer directMembersCount) { + this.directMembersCount = Optional.ofNullable(directMembersCount); + return this; + } + + /** + *

                                                              Number of direct members in the Google Workspace Directory group.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "direct_members_count", nulls = Nulls.SKIP) + public _FinalStage directMembersCount(Optional directMembersCount) { + this.directMembersCount = directMembersCount; + return this; + } + + /** + *

                                                              Google Workspace Directory group email.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage email(String email) { + this.email = Optional.ofNullable(email); + return this; + } + + /** + *

                                                              Google Workspace Directory group email.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "email", nulls = Nulls.SKIP) + public _FinalStage email(Optional email) { + this.email = email; + return this; + } + + /** + *

                                                              Google Workspace Directory group name.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

                                                              Google Workspace Directory group name.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; + return this; + } + @java.lang.Override public SynchronizedGroupPayload build() { - return new SynchronizedGroupPayload(id, additionalProperties); + return new SynchronizedGroupPayload(id, name, email, directMembersCount, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupSelectionId.java b/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupSelectionId.java new file mode 100644 index 00000000..aed19ce8 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SynchronizedGroupSelectionId.java @@ -0,0 +1,128 @@ +/** + * 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 = SynchronizedGroupSelectionId.Builder.class) +public final class SynchronizedGroupSelectionId { + private final String id; + + private final Map additionalProperties; + + private SynchronizedGroupSelectionId(String id, Map additionalProperties) { + this.id = id; + this.additionalProperties = additionalProperties; + } + + /** + * @return Google Workspace Directory group ID. + */ + @JsonProperty("id") + public String getId() { + return id; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SynchronizedGroupSelectionId && equalTo((SynchronizedGroupSelectionId) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SynchronizedGroupSelectionId other) { + return id.equals(other.id); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + /** + *

                                                              Google Workspace Directory group ID.

                                                              + */ + _FinalStage id(@NotNull String id); + + Builder from(SynchronizedGroupSelectionId other); + } + + public interface _FinalStage { + SynchronizedGroupSelectionId build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SynchronizedGroupSelectionId other) { + id(other.getId()); + return this; + } + + /** + *

                                                              Google Workspace Directory group ID.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + public SynchronizedGroupSelectionId build() { + return new SynchronizedGroupSelectionId(id, 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/SystemRoleOwnerId.java b/src/main/java/com/auth0/client/mgmt/types/SystemRoleOwnerId.java new file mode 100644 index 00000000..ca4adc34 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/SystemRoleOwnerId.java @@ -0,0 +1,73 @@ +/** + * 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 SystemRoleOwnerId { + public static final SystemRoleOwnerId AUTH0 = new SystemRoleOwnerId(Value.AUTH0, "auth0"); + + private final Value value; + + private final String string; + + SystemRoleOwnerId(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 SystemRoleOwnerId && this.string.equals(((SystemRoleOwnerId) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case AUTH0: + return visitor.visitAuth0(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static SystemRoleOwnerId valueOf(String value) { + switch (value) { + case "auth0": + return AUTH0; + default: + return new SystemRoleOwnerId(Value.UNKNOWN, value); + } + } + + public enum Value { + AUTH0, + + UNKNOWN + } + + public interface Visitor { + T visitAuth0(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java index 8f91d41a..6c6452fb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java @@ -68,7 +68,7 @@ public final class TenantSettingsFlags { private final Optional improvedSignupBotDetectionInClassic; - private final Optional genaiTrial; + private final Optional localResourceDiscovery; private final Optional enableDynamicClientRegistration; @@ -105,7 +105,7 @@ private TenantSettingsFlags( Optional mfaShowFactorListOnEnrollment, Optional removeAlgFromJwks, Optional improvedSignupBotDetectionInClassic, - Optional genaiTrial, + Optional localResourceDiscovery, Optional enableDynamicClientRegistration, Optional disableManagementApiSmsObfuscation, Optional trustAzureAdfsEmailVerifiedConnectionProperty, @@ -135,7 +135,7 @@ private TenantSettingsFlags( this.mfaShowFactorListOnEnrollment = mfaShowFactorListOnEnrollment; this.removeAlgFromJwks = removeAlgFromJwks; this.improvedSignupBotDetectionInClassic = improvedSignupBotDetectionInClassic; - this.genaiTrial = genaiTrial; + this.localResourceDiscovery = localResourceDiscovery; this.enableDynamicClientRegistration = enableDynamicClientRegistration; this.disableManagementApiSmsObfuscation = disableManagementApiSmsObfuscation; this.trustAzureAdfsEmailVerifiedConnectionProperty = trustAzureAdfsEmailVerifiedConnectionProperty; @@ -296,7 +296,7 @@ public Optional getDashboardLogStreamsNext() { } /** - * @return Enables new insights activity page view + * @return Deprecated. This flag has no effect and is retained only for backward compatibility */ @JsonProperty("dashboard_insights_view") public Optional getDashboardInsightsView() { @@ -336,11 +336,11 @@ public Optional getImprovedSignupBotDetectionInClassic() { } /** - * @return This tenant signed up for the Auth4GenAI trail + * @return Whether the Local Resource Discovery endpoint is enabled (true) or disabled (false). */ - @JsonProperty("genai_trial") - public Optional getGenaiTrial() { - return genaiTrial; + @JsonProperty("local_resource_discovery") + public Optional getLocalResourceDiscovery() { + return localResourceDiscovery; } /** @@ -412,7 +412,7 @@ private boolean equalTo(TenantSettingsFlags other) { && mfaShowFactorListOnEnrollment.equals(other.mfaShowFactorListOnEnrollment) && removeAlgFromJwks.equals(other.removeAlgFromJwks) && improvedSignupBotDetectionInClassic.equals(other.improvedSignupBotDetectionInClassic) - && genaiTrial.equals(other.genaiTrial) + && localResourceDiscovery.equals(other.localResourceDiscovery) && enableDynamicClientRegistration.equals(other.enableDynamicClientRegistration) && disableManagementApiSmsObfuscation.equals(other.disableManagementApiSmsObfuscation) && trustAzureAdfsEmailVerifiedConnectionProperty.equals( @@ -447,7 +447,7 @@ public int hashCode() { this.mfaShowFactorListOnEnrollment, this.removeAlgFromJwks, this.improvedSignupBotDetectionInClassic, - this.genaiTrial, + this.localResourceDiscovery, this.enableDynamicClientRegistration, this.disableManagementApiSmsObfuscation, this.trustAzureAdfsEmailVerifiedConnectionProperty, @@ -513,7 +513,7 @@ public static final class Builder { private Optional improvedSignupBotDetectionInClassic = Optional.empty(); - private Optional genaiTrial = Optional.empty(); + private Optional localResourceDiscovery = Optional.empty(); private Optional enableDynamicClientRegistration = Optional.empty(); @@ -553,7 +553,7 @@ public Builder from(TenantSettingsFlags other) { mfaShowFactorListOnEnrollment(other.getMfaShowFactorListOnEnrollment()); removeAlgFromJwks(other.getRemoveAlgFromJwks()); improvedSignupBotDetectionInClassic(other.getImprovedSignupBotDetectionInClassic()); - genaiTrial(other.getGenaiTrial()); + localResourceDiscovery(other.getLocalResourceDiscovery()); enableDynamicClientRegistration(other.getEnableDynamicClientRegistration()); disableManagementApiSmsObfuscation(other.getDisableManagementApiSmsObfuscation()); trustAzureAdfsEmailVerifiedConnectionProperty(other.getTrustAzureAdfsEmailVerifiedConnectionProperty()); @@ -831,7 +831,7 @@ public Builder dashboardLogStreamsNext(Boolean dashboardLogStreamsNext) { } /** - *

                                                              Enables new insights activity page view

                                                              + *

                                                              Deprecated. This flag has no effect and is retained only for backward compatibility

                                                              */ @JsonSetter(value = "dashboard_insights_view", nulls = Nulls.SKIP) public Builder dashboardInsightsView(Optional dashboardInsightsView) { @@ -901,16 +901,16 @@ public Builder improvedSignupBotDetectionInClassic(Boolean improvedSignupBotDete } /** - *

                                                              This tenant signed up for the Auth4GenAI trail

                                                              + *

                                                              Whether the Local Resource Discovery endpoint is enabled (true) or disabled (false).

                                                              */ - @JsonSetter(value = "genai_trial", nulls = Nulls.SKIP) - public Builder genaiTrial(Optional genaiTrial) { - this.genaiTrial = genaiTrial; + @JsonSetter(value = "local_resource_discovery", nulls = Nulls.SKIP) + public Builder localResourceDiscovery(Optional localResourceDiscovery) { + this.localResourceDiscovery = localResourceDiscovery; return this; } - public Builder genaiTrial(Boolean genaiTrial) { - this.genaiTrial = Optional.ofNullable(genaiTrial); + public Builder localResourceDiscovery(Boolean localResourceDiscovery) { + this.localResourceDiscovery = Optional.ofNullable(localResourceDiscovery); return this; } @@ -999,7 +999,7 @@ public TenantSettingsFlags build() { mfaShowFactorListOnEnrollment, removeAlgFromJwks, improvedSignupBotDetectionInClassic, - genaiTrial, + localResourceDiscovery, enableDynamicClientRegistration, disableManagementApiSmsObfuscation, trustAzureAdfsEmailVerifiedConnectionProperty, diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.java index 0795c4c3..33e7c95e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.java +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.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,17 +18,23 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.Nullable; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TenantSettingsSessions.Builder.class) public final class TenantSettingsSessions { private final Optional oidcLogoutPromptEnabled; + private final OptionalNullable anonymous; + private final Map additionalProperties; private TenantSettingsSessions( - Optional oidcLogoutPromptEnabled, Map additionalProperties) { + Optional oidcLogoutPromptEnabled, + OptionalNullable anonymous, + Map additionalProperties) { this.oidcLogoutPromptEnabled = oidcLogoutPromptEnabled; + this.anonymous = anonymous; this.additionalProperties = additionalProperties; } @@ -38,6 +46,21 @@ public Optional getOidcLogoutPromptEnabled() { return oidcLogoutPromptEnabled; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("anonymous") + public OptionalNullable getAnonymous() { + if (anonymous == null) { + return OptionalNullable.absent(); + } + return anonymous; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("anonymous") + private OptionalNullable _getAnonymous() { + return anonymous; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -50,12 +73,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(TenantSettingsSessions other) { - return oidcLogoutPromptEnabled.equals(other.oidcLogoutPromptEnabled); + return oidcLogoutPromptEnabled.equals(other.oidcLogoutPromptEnabled) && anonymous.equals(other.anonymous); } @java.lang.Override public int hashCode() { - return Objects.hash(this.oidcLogoutPromptEnabled); + return Objects.hash(this.oidcLogoutPromptEnabled, this.anonymous); } @java.lang.Override @@ -71,6 +94,8 @@ public static Builder builder() { public static final class Builder { private Optional oidcLogoutPromptEnabled = Optional.empty(); + private OptionalNullable anonymous = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -78,6 +103,7 @@ private Builder() {} public Builder from(TenantSettingsSessions other) { oidcLogoutPromptEnabled(other.getOidcLogoutPromptEnabled()); + anonymous(other.getAnonymous()); return this; } @@ -95,8 +121,39 @@ public Builder oidcLogoutPromptEnabled(Boolean oidcLogoutPromptEnabled) { return this; } + @JsonSetter(value = "anonymous", nulls = Nulls.SKIP) + public Builder anonymous(@Nullable OptionalNullable anonymous) { + this.anonymous = anonymous; + return this; + } + + public Builder anonymous(TenantSettingsSessionsAnonymous anonymous) { + this.anonymous = OptionalNullable.of(anonymous); + return this; + } + + public Builder anonymous(Optional anonymous) { + if (anonymous.isPresent()) { + this.anonymous = OptionalNullable.of(anonymous.get()); + } else { + this.anonymous = OptionalNullable.absent(); + } + return this; + } + + public Builder anonymous(com.auth0.client.mgmt.core.Nullable anonymous) { + if (anonymous.isNull()) { + this.anonymous = OptionalNullable.ofNull(); + } else if (anonymous.isEmpty()) { + this.anonymous = OptionalNullable.absent(); + } else { + this.anonymous = OptionalNullable.of(anonymous.get()); + } + return this; + } + public TenantSettingsSessions build() { - return new TenantSettingsSessions(oidcLogoutPromptEnabled, additionalProperties); + return new TenantSettingsSessions(oidcLogoutPromptEnabled, anonymous, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessionsAnonymous.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessionsAnonymous.java new file mode 100644 index 00000000..a3821792 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessionsAnonymous.java @@ -0,0 +1,142 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = TenantSettingsSessionsAnonymous.Builder.class) +public final class TenantSettingsSessionsAnonymous { + private final Optional lifetimeInMinutes; + + private final Optional activateCookie; + + private final Map additionalProperties; + + private TenantSettingsSessionsAnonymous( + Optional lifetimeInMinutes, + Optional activateCookie, + Map additionalProperties) { + this.lifetimeInMinutes = lifetimeInMinutes; + this.activateCookie = activateCookie; + this.additionalProperties = additionalProperties; + } + + /** + * @return Anonymous session lifetime, in minutes. Defaults to 43200 (30 days); maximum 525600 (1 year). + */ + @JsonProperty("lifetime_in_minutes") + public Optional getLifetimeInMinutes() { + return lifetimeInMinutes; + } + + /** + * @return Whether anonymous session requests return the auth0_anon cookie. Defaults to enabled; set to false to stop issuing the cookie. + */ + @JsonProperty("activate_cookie") + public Optional getActivateCookie() { + return activateCookie; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TenantSettingsSessionsAnonymous && equalTo((TenantSettingsSessionsAnonymous) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(TenantSettingsSessionsAnonymous other) { + return lifetimeInMinutes.equals(other.lifetimeInMinutes) && activateCookie.equals(other.activateCookie); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.lifetimeInMinutes, this.activateCookie); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional lifetimeInMinutes = Optional.empty(); + + private Optional activateCookie = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(TenantSettingsSessionsAnonymous other) { + lifetimeInMinutes(other.getLifetimeInMinutes()); + activateCookie(other.getActivateCookie()); + return this; + } + + /** + *

                                                              Anonymous session lifetime, in minutes. Defaults to 43200 (30 days); maximum 525600 (1 year).

                                                              + */ + @JsonSetter(value = "lifetime_in_minutes", nulls = Nulls.SKIP) + public Builder lifetimeInMinutes(Optional lifetimeInMinutes) { + this.lifetimeInMinutes = lifetimeInMinutes; + return this; + } + + public Builder lifetimeInMinutes(Integer lifetimeInMinutes) { + this.lifetimeInMinutes = Optional.ofNullable(lifetimeInMinutes); + return this; + } + + /** + *

                                                              Whether anonymous session requests return the auth0_anon cookie. Defaults to enabled; set to false to stop issuing the cookie.

                                                              + */ + @JsonSetter(value = "activate_cookie", nulls = Nulls.SKIP) + public Builder activateCookie(Optional activateCookie) { + this.activateCookie = activateCookie; + return this; + } + + public Builder activateCookie(Boolean activateCookie) { + this.activateCookie = Optional.ofNullable(activateCookie); + return this; + } + + public TenantSettingsSessionsAnonymous build() { + return new TenantSettingsSessionsAnonymous(lifetimeInMinutes, activateCookie, 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/TestCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/TestCustomDomainResponseContent.java index 9b0d0c99..c7ab7dc7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TestCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/TestCustomDomainResponseContent.java @@ -121,7 +121,6 @@ public Builder from(TestCustomDomainResponseContent other) { } /** - *

                                                              Result of the operation.

                                                              *

                                                              Result of the operation.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/ThirdPartyClientAccessConfig.java b/src/main/java/com/auth0/client/mgmt/types/ThirdPartyClientAccessConfig.java new file mode 100644 index 00000000..895d0d70 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ThirdPartyClientAccessConfig.java @@ -0,0 +1,127 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ThirdPartyClientAccessConfig.Builder.class) +public final class ThirdPartyClientAccessConfig { + private final boolean allowConfiguration; + + private final Map additionalProperties; + + private ThirdPartyClientAccessConfig(boolean allowConfiguration, Map additionalProperties) { + this.allowConfiguration = allowConfiguration; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether third-party applications can configure the connection as a domain-level connection during the Self-Service Enterprise Configuration flow. + */ + @JsonProperty("allow_configuration") + public boolean getAllowConfiguration() { + return allowConfiguration; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ThirdPartyClientAccessConfig && equalTo((ThirdPartyClientAccessConfig) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ThirdPartyClientAccessConfig other) { + return allowConfiguration == other.allowConfiguration; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.allowConfiguration); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AllowConfigurationStage builder() { + return new Builder(); + } + + public interface AllowConfigurationStage { + /** + *

                                                              Whether third-party applications can configure the connection as a domain-level connection during the Self-Service Enterprise Configuration flow.

                                                              + */ + _FinalStage allowConfiguration(boolean allowConfiguration); + + Builder from(ThirdPartyClientAccessConfig other); + } + + public interface _FinalStage { + ThirdPartyClientAccessConfig build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AllowConfigurationStage, _FinalStage { + private boolean allowConfiguration; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ThirdPartyClientAccessConfig other) { + allowConfiguration(other.getAllowConfiguration()); + return this; + } + + /** + *

                                                              Whether third-party applications can configure the connection as a domain-level connection during the Self-Service Enterprise Configuration flow.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("allow_configuration") + public _FinalStage allowConfiguration(boolean allowConfiguration) { + this.allowConfiguration = allowConfiguration; + return this; + } + + @java.lang.Override + public ThirdPartyClientAccessConfig build() { + return new ThirdPartyClientAccessConfig(allowConfiguration, 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/TokenExchangeProfilesListRequest.java b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java index 7cff000d..f4f87be1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java +++ b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java @@ -3,13 +3,14 @@ */ 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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private TokenExchangeProfilesListRequest( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenVaultPrivilegedAccessGrant.java b/src/main/java/com/auth0/client/mgmt/types/TokenVaultPrivilegedAccessGrant.java new file mode 100644 index 00000000..97a2c8a3 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/TokenVaultPrivilegedAccessGrant.java @@ -0,0 +1,163 @@ +/** + * 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 = TokenVaultPrivilegedAccessGrant.Builder.class) +public final class TokenVaultPrivilegedAccessGrant { + private final String connection; + + private final List scopes; + + private final Map additionalProperties; + + private TokenVaultPrivilegedAccessGrant( + String connection, List scopes, Map additionalProperties) { + this.connection = connection; + this.scopes = scopes; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("connection") + public String getConnection() { + return connection; + } + + @JsonProperty("scopes") + public List getScopes() { + return scopes; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TokenVaultPrivilegedAccessGrant && equalTo((TokenVaultPrivilegedAccessGrant) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(TokenVaultPrivilegedAccessGrant other) { + return connection.equals(other.connection) && scopes.equals(other.scopes); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.connection, this.scopes); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConnectionStage builder() { + return new Builder(); + } + + public interface ConnectionStage { + _FinalStage connection(@NotNull String connection); + + Builder from(TokenVaultPrivilegedAccessGrant other); + } + + public interface _FinalStage { + TokenVaultPrivilegedAccessGrant build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage scopes(List scopes); + + _FinalStage addScopes(String scopes); + + _FinalStage addAllScopes(List scopes); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConnectionStage, _FinalStage { + private String connection; + + private List scopes = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(TokenVaultPrivilegedAccessGrant other) { + connection(other.getConnection()); + scopes(other.getScopes()); + return this; + } + + @java.lang.Override + @JsonSetter("connection") + public _FinalStage connection(@NotNull String connection) { + this.connection = Objects.requireNonNull(connection, "connection must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllScopes(List scopes) { + if (scopes != null) { + this.scopes.addAll(scopes); + } + return this; + } + + @java.lang.Override + public _FinalStage addScopes(String scopes) { + this.scopes.add(scopes); + return this; + } + + @java.lang.Override + @JsonSetter(value = "scopes", nulls = Nulls.SKIP) + public _FinalStage scopes(List scopes) { + this.scopes.clear(); + if (scopes != null) { + this.scopes.addAll(scopes); + } + return this; + } + + @java.lang.Override + public TokenVaultPrivilegedAccessGrant build() { + return new TokenVaultPrivilegedAccessGrant(connection, scopes, 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/TooManyRequestsErrorBody.java b/src/main/java/com/auth0/client/mgmt/types/TooManyRequestsErrorBody.java new file mode 100644 index 00000000..cbe79de4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/TooManyRequestsErrorBody.java @@ -0,0 +1,166 @@ +/** + * 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 = TooManyRequestsErrorBody.Builder.class) +public final class TooManyRequestsErrorBody { + private final String message; + + private final String statusCode; + + private final TooManyRequestsErrorBodyError error; + + private final Map additionalProperties; + + private TooManyRequestsErrorBody( + String message, + String statusCode, + TooManyRequestsErrorBodyError error, + Map additionalProperties) { + this.message = message; + this.statusCode = statusCode; + this.error = error; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("message") + public String getMessage() { + return message; + } + + @JsonProperty("statusCode") + public String getStatusCode() { + return statusCode; + } + + @JsonProperty("error") + public TooManyRequestsErrorBodyError getError() { + return error; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TooManyRequestsErrorBody && equalTo((TooManyRequestsErrorBody) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(TooManyRequestsErrorBody other) { + return message.equals(other.message) && statusCode.equals(other.statusCode) && error.equals(other.error); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.message, this.statusCode, this.error); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static MessageStage builder() { + return new Builder(); + } + + public interface MessageStage { + StatusCodeStage message(@NotNull String message); + + Builder from(TooManyRequestsErrorBody other); + } + + public interface StatusCodeStage { + ErrorStage statusCode(@NotNull String statusCode); + } + + public interface ErrorStage { + _FinalStage error(@NotNull TooManyRequestsErrorBodyError error); + } + + public interface _FinalStage { + TooManyRequestsErrorBody build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements MessageStage, StatusCodeStage, ErrorStage, _FinalStage { + private String message; + + private String statusCode; + + private TooManyRequestsErrorBodyError error; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(TooManyRequestsErrorBody other) { + message(other.getMessage()); + statusCode(other.getStatusCode()); + error(other.getError()); + return this; + } + + @java.lang.Override + @JsonSetter("message") + public StatusCodeStage message(@NotNull String message) { + this.message = Objects.requireNonNull(message, "message must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("statusCode") + public ErrorStage statusCode(@NotNull String statusCode) { + this.statusCode = Objects.requireNonNull(statusCode, "statusCode must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("error") + public _FinalStage error(@NotNull TooManyRequestsErrorBodyError error) { + this.error = Objects.requireNonNull(error, "error must not be null"); + return this; + } + + @java.lang.Override + public TooManyRequestsErrorBody build() { + return new TooManyRequestsErrorBody(message, statusCode, error, 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/TooManyRequestsErrorBodyError.java b/src/main/java/com/auth0/client/mgmt/types/TooManyRequestsErrorBodyError.java new file mode 100644 index 00000000..45fd6527 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/TooManyRequestsErrorBodyError.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 TooManyRequestsErrorBodyError { + public static final TooManyRequestsErrorBodyError TOO_MANY_REQUESTS = + new TooManyRequestsErrorBodyError(Value.TOO_MANY_REQUESTS, "Too Many Requests"); + + private final Value value; + + private final String string; + + TooManyRequestsErrorBodyError(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 TooManyRequestsErrorBodyError + && this.string.equals(((TooManyRequestsErrorBodyError) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case TOO_MANY_REQUESTS: + return visitor.visitTooManyRequests(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static TooManyRequestsErrorBodyError valueOf(String value) { + switch (value) { + case "Too Many Requests": + return TOO_MANY_REQUESTS; + default: + return new TooManyRequestsErrorBodyError(Value.UNKNOWN, value); + } + } + + public enum Value { + TOO_MANY_REQUESTS, + + UNKNOWN + } + + public interface Visitor { + T visitTooManyRequests(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateAnonymousSessions.java b/src/main/java/com/auth0/client/mgmt/types/UpdateAnonymousSessions.java new file mode 100644 index 00000000..66128e82 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateAnonymousSessions.java @@ -0,0 +1,127 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateAnonymousSessions.Builder.class) +public final class UpdateAnonymousSessions { + private final boolean active; + + private final Map additionalProperties; + + private UpdateAnonymousSessions(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return If set to true, this client is allowed to create anonymous sessions. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateAnonymousSessions && equalTo((UpdateAnonymousSessions) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateAnonymousSessions other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              If set to true, this client is allowed to create anonymous sessions.

                                                              + */ + _FinalStage active(boolean active); + + Builder from(UpdateAnonymousSessions other); + } + + public interface _FinalStage { + UpdateAnonymousSessions build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateAnonymousSessions other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              If set to true, this client is allowed to create anonymous sessions.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public UpdateAnonymousSessions build() { + return new UpdateAnonymousSessions(active, 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/UpdateBrandingThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingThemeResponseContent.java index 80d8ee4d..bddfd226 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingThemeResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingThemeResponseContent.java @@ -10,10 +10,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -27,6 +29,8 @@ public final class UpdateBrandingThemeResponseContent { private final BrandingThemeFonts fonts; + private final Optional identifiers; + private final BrandingThemePageBackground pageBackground; private final String themeId; @@ -40,6 +44,7 @@ private UpdateBrandingThemeResponseContent( BrandingThemeColors colors, String displayName, BrandingThemeFonts fonts, + Optional identifiers, BrandingThemePageBackground pageBackground, String themeId, BrandingThemeWidget widget, @@ -48,6 +53,7 @@ private UpdateBrandingThemeResponseContent( this.colors = colors; this.displayName = displayName; this.fonts = fonts; + this.identifiers = identifiers; this.pageBackground = pageBackground; this.themeId = themeId; this.widget = widget; @@ -77,6 +83,11 @@ public BrandingThemeFonts getFonts() { return fonts; } + @JsonProperty("identifiers") + public Optional getIdentifiers() { + return identifiers; + } + @JsonProperty("page_background") public BrandingThemePageBackground getPageBackground() { return pageBackground; @@ -112,6 +123,7 @@ private boolean equalTo(UpdateBrandingThemeResponseContent other) { && colors.equals(other.colors) && displayName.equals(other.displayName) && fonts.equals(other.fonts) + && identifiers.equals(other.identifiers) && pageBackground.equals(other.pageBackground) && themeId.equals(other.themeId) && widget.equals(other.widget); @@ -124,6 +136,7 @@ public int hashCode() { this.colors, this.displayName, this.fonts, + this.identifiers, this.pageBackground, this.themeId, this.widget); @@ -180,6 +193,10 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage identifiers(Optional identifiers); + + _FinalStage identifiers(BrandingThemeIdentifiers identifiers); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -206,6 +223,8 @@ public static final class Builder private BrandingThemeWidget widget; + private Optional identifiers = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -217,6 +236,7 @@ public Builder from(UpdateBrandingThemeResponseContent other) { colors(other.getColors()); displayName(other.getDisplayName()); fonts(other.getFonts()); + identifiers(other.getIdentifiers()); pageBackground(other.getPageBackground()); themeId(other.getThemeId()); widget(other.getWidget()); @@ -238,7 +258,6 @@ public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { } /** - *

                                                              Display Name

                                                              *

                                                              Display Name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -264,7 +283,6 @@ public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBack } /** - *

                                                              Theme Id

                                                              *

                                                              Theme Id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -282,10 +300,31 @@ public _FinalStage widget(@NotNull BrandingThemeWidget widget) { return this; } + @java.lang.Override + public _FinalStage identifiers(BrandingThemeIdentifiers identifiers) { + this.identifiers = Optional.ofNullable(identifiers); + return this; + } + + @java.lang.Override + @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) + public _FinalStage identifiers(Optional identifiers) { + this.identifiers = identifiers; + return this; + } + @java.lang.Override public UpdateBrandingThemeResponseContent build() { return new UpdateBrandingThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); + borders, + colors, + displayName, + fonts, + identifiers, + pageBackground, + themeId, + widget, + additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java index 111c01fe..f2b288d7 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java @@ -29,6 +29,8 @@ public final class UpdateBruteForceSettingsResponseContent { private final Optional mode; + private final Optional formSubmissionMode; + private final Optional maxAttempts; private final Map additionalProperties; @@ -38,12 +40,14 @@ private UpdateBruteForceSettingsResponseContent( Optional> shields, Optional> allowlist, Optional mode, + Optional formSubmissionMode, Optional maxAttempts, Map additionalProperties) { this.enabled = enabled; this.shields = shields; this.allowlist = allowlist; this.mode = mode; + this.formSubmissionMode = formSubmissionMode; this.maxAttempts = maxAttempts; this.additionalProperties = additionalProperties; } @@ -78,6 +82,11 @@ public Optional getMode() { return mode; } + @JsonProperty("form_submission_mode") + public Optional getFormSubmissionMode() { + return formSubmissionMode; + } + /** * @return Maximum number of unsuccessful attempts. */ @@ -103,12 +112,14 @@ private boolean equalTo(UpdateBruteForceSettingsResponseContent other) { && shields.equals(other.shields) && allowlist.equals(other.allowlist) && mode.equals(other.mode) + && formSubmissionMode.equals(other.formSubmissionMode) && maxAttempts.equals(other.maxAttempts); } @java.lang.Override public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.mode, this.maxAttempts); + return Objects.hash( + this.enabled, this.shields, this.allowlist, this.mode, this.formSubmissionMode, this.maxAttempts); } @java.lang.Override @@ -130,6 +141,8 @@ public static final class Builder { private Optional mode = Optional.empty(); + private Optional formSubmissionMode = Optional.empty(); + private Optional maxAttempts = Optional.empty(); @JsonAnySetter @@ -142,6 +155,7 @@ public Builder from(UpdateBruteForceSettingsResponseContent other) { shields(other.getShields()); allowlist(other.getAllowlist()); mode(other.getMode()); + formSubmissionMode(other.getFormSubmissionMode()); maxAttempts(other.getMaxAttempts()); return this; } @@ -200,6 +214,17 @@ public Builder mode(BruteForceProtectionModeEnum mode) { return this; } + @JsonSetter(value = "form_submission_mode", nulls = Nulls.SKIP) + public Builder formSubmissionMode(Optional formSubmissionMode) { + this.formSubmissionMode = formSubmissionMode; + return this; + } + + public Builder formSubmissionMode(BruteForceProtectionFormSubmissionModeEnum formSubmissionMode) { + this.formSubmissionMode = Optional.ofNullable(formSubmissionMode); + return this; + } + /** *

                                                              Maximum number of unsuccessful attempts.

                                                              */ @@ -216,7 +241,7 @@ public Builder maxAttempts(Integer maxAttempts) { public UpdateBruteForceSettingsResponseContent build() { return new UpdateBruteForceSettingsResponseContent( - enabled, shields, allowlist, mode, maxAttempts, additionalProperties); + enabled, shields, allowlist, mode, formSubmissionMode, maxAttempts, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientProfileRequestContent.java new file mode 100644 index 00000000..c8d63753 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientProfileRequestContent.java @@ -0,0 +1,213 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateClientProfileRequestContent.Builder.class) +public final class UpdateClientProfileRequestContent { + private final Optional name; + + private final OptionalNullable description; + + private final Optional clientConfiguration; + + private final Optional applyPolicy; + + private final Map additionalProperties; + + private UpdateClientProfileRequestContent( + Optional name, + OptionalNullable description, + Optional clientConfiguration, + Optional applyPolicy, + Map additionalProperties) { + this.name = name; + this.description = description; + this.clientConfiguration = clientConfiguration; + this.applyPolicy = applyPolicy; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("name") + public Optional getName() { + return name; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + public OptionalNullable getDescription() { + if (description == null) { + return OptionalNullable.absent(); + } + return description; + } + + @JsonProperty("client_configuration") + public Optional getClientConfiguration() { + return clientConfiguration; + } + + @JsonProperty("apply_policy") + public Optional getApplyPolicy() { + return applyPolicy; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("description") + private OptionalNullable _getDescription() { + return description; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateClientProfileRequestContent && equalTo((UpdateClientProfileRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateClientProfileRequestContent other) { + return name.equals(other.name) + && description.equals(other.description) + && clientConfiguration.equals(other.clientConfiguration) + && applyPolicy.equals(other.applyPolicy); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.description, this.clientConfiguration, this.applyPolicy); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private OptionalNullable description = OptionalNullable.absent(); + + private Optional clientConfiguration = Optional.empty(); + + private Optional applyPolicy = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateClientProfileRequestContent other) { + name(other.getName()); + description(other.getDescription()); + clientConfiguration(other.getClientConfiguration()); + applyPolicy(other.getApplyPolicy()); + return this; + } + + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(@Nullable OptionalNullable description) { + this.description = description; + return this; + } + + public Builder description(String description) { + this.description = OptionalNullable.of(description); + return this; + } + + public Builder description(Optional description) { + if (description.isPresent()) { + this.description = OptionalNullable.of(description.get()); + } else { + this.description = OptionalNullable.absent(); + } + return this; + } + + public Builder description(com.auth0.client.mgmt.core.Nullable description) { + if (description.isNull()) { + this.description = OptionalNullable.ofNull(); + } else if (description.isEmpty()) { + this.description = OptionalNullable.absent(); + } else { + this.description = OptionalNullable.of(description.get()); + } + return this; + } + + @JsonSetter(value = "client_configuration", nulls = Nulls.SKIP) + public Builder clientConfiguration(Optional clientConfiguration) { + this.clientConfiguration = clientConfiguration; + return this; + } + + public Builder clientConfiguration(ClientProfileClientConfiguration clientConfiguration) { + this.clientConfiguration = Optional.ofNullable(clientConfiguration); + return this; + } + + @JsonSetter(value = "apply_policy", nulls = Nulls.SKIP) + public Builder applyPolicy(Optional applyPolicy) { + this.applyPolicy = applyPolicy; + return this; + } + + public Builder applyPolicy(ClientProfileApplyPolicy applyPolicy) { + this.applyPolicy = Optional.ofNullable(applyPolicy); + return this; + } + + public UpdateClientProfileRequestContent build() { + return new UpdateClientProfileRequestContent( + name, description, clientConfiguration, applyPolicy, 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/UpdateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java index e6159838..8892364c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java @@ -82,6 +82,12 @@ public final class UpdateClientRequestContent { private final OptionalNullable tokenQuota; + private final OptionalNullable identityAssertionAuthorizationGrant; + + private final OptionalNullable anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional formTemplate; private final Optional addons; @@ -126,14 +132,22 @@ public final class UpdateClientRequestContent { private final OptionalNullable expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final OptionalNullable myOrganizationConfiguration; + private final OptionalNullable googleAccountLinking; + private final OptionalNullable> asyncApprovalNotificationChannels; private final Optional thirdPartySecurityMode; private final Optional redirectionPolicy; + private final OptionalNullable agentId; + + private final OptionalNullable oidcSupport; + private final Map additionalProperties; private UpdateClientRequestContent( @@ -166,6 +180,9 @@ private UpdateClientRequestContent( Optional customLoginPage, Optional customLoginPagePreview, OptionalNullable tokenQuota, + OptionalNullable identityAssertionAuthorizationGrant, + OptionalNullable anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional formTemplate, Optional addons, Optional> clientMetadata, @@ -188,10 +205,14 @@ private UpdateClientRequestContent( OptionalNullable tokenExchange, OptionalNullable parRequestExpiry, OptionalNullable expressConfiguration, + Optional b2BIntegrationConfiguration, OptionalNullable myOrganizationConfiguration, + OptionalNullable googleAccountLinking, OptionalNullable> asyncApprovalNotificationChannels, Optional thirdPartySecurityMode, Optional redirectionPolicy, + OptionalNullable agentId, + OptionalNullable oidcSupport, Map additionalProperties) { this.name = name; this.description = description; @@ -222,6 +243,9 @@ private UpdateClientRequestContent( this.customLoginPage = customLoginPage; this.customLoginPagePreview = customLoginPagePreview; this.tokenQuota = tokenQuota; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.formTemplate = formTemplate; this.addons = addons; this.clientMetadata = clientMetadata; @@ -244,10 +268,14 @@ private UpdateClientRequestContent( this.tokenExchange = tokenExchange; this.parRequestExpiry = parRequestExpiry; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.thirdPartySecurityMode = thirdPartySecurityMode; this.redirectionPolicy = redirectionPolicy; + this.agentId = agentId; + this.oidcSupport = oidcSupport; this.additionalProperties = additionalProperties; } @@ -485,6 +513,29 @@ public OptionalNullable getTokenQuota() { return tokenQuota; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("identity_assertion_authorization_grant") + public OptionalNullable getIdentityAssertionAuthorizationGrant() { + if (identityAssertionAuthorizationGrant == null) { + return OptionalNullable.absent(); + } + return identityAssertionAuthorizationGrant; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("anonymous_sessions") + public OptionalNullable getAnonymousSessions() { + if (anonymousSessions == null) { + return OptionalNullable.absent(); + } + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + /** * @return Form template for WS-Federation protocol */ @@ -673,6 +724,11 @@ public OptionalNullable getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("my_organization_configuration") public OptionalNullable getMyOrganizationConfiguration() { @@ -682,6 +738,15 @@ public OptionalNullable getMyOrganizatio return myOrganizationConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("google_account_linking") + public OptionalNullable getGoogleAccountLinking() { + if (googleAccountLinking == null) { + return OptionalNullable.absent(); + } + return googleAccountLinking; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("async_approval_notification_channels") public OptionalNullable> getAsyncApprovalNotificationChannels() { @@ -701,6 +766,27 @@ public Optional getRedirectionPolicy() { return redirectionPolicy; } + /** + * @return ID of the agent to associate with this client, or null to remove the association. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("agent_id") + public OptionalNullable getAgentId() { + if (agentId == null) { + return OptionalNullable.absent(); + } + return agentId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("oidc_support") + public OptionalNullable getOidcSupport() { + if (oidcSupport == null) { + return OptionalNullable.absent(); + } + return oidcSupport; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("session_transfer") private OptionalNullable _getSessionTransfer() { @@ -731,6 +817,18 @@ private OptionalNullable _getTokenQuota() { return tokenQuota; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("identity_assertion_authorization_grant") + private OptionalNullable _getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("anonymous_sessions") + private OptionalNullable _getAnonymousSessions() { + return anonymousSessions; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("native_social_login") private OptionalNullable _getNativeSocialLogin() { @@ -815,12 +913,30 @@ private OptionalNullable _getMyOrganizat return myOrganizationConfiguration; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("google_account_linking") + private OptionalNullable _getGoogleAccountLinking() { + return googleAccountLinking; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("async_approval_notification_channels") private OptionalNullable> _getAsyncApprovalNotificationChannels() { return asyncApprovalNotificationChannels; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("agent_id") + private OptionalNullable _getAgentId() { + return agentId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("oidc_support") + private OptionalNullable _getOidcSupport() { + return oidcSupport; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -862,6 +978,9 @@ private boolean equalTo(UpdateClientRequestContent other) { && customLoginPage.equals(other.customLoginPage) && customLoginPagePreview.equals(other.customLoginPagePreview) && tokenQuota.equals(other.tokenQuota) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && formTemplate.equals(other.formTemplate) && addons.equals(other.addons) && clientMetadata.equals(other.clientMetadata) @@ -885,10 +1004,14 @@ private boolean equalTo(UpdateClientRequestContent other) { && tokenExchange.equals(other.tokenExchange) && parRequestExpiry.equals(other.parRequestExpiry) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) - && redirectionPolicy.equals(other.redirectionPolicy); + && redirectionPolicy.equals(other.redirectionPolicy) + && agentId.equals(other.agentId) + && oidcSupport.equals(other.oidcSupport); } @java.lang.Override @@ -923,6 +1046,9 @@ public int hashCode() { this.customLoginPage, this.customLoginPagePreview, this.tokenQuota, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.formTemplate, this.addons, this.clientMetadata, @@ -945,10 +1071,14 @@ public int hashCode() { this.tokenExchange, this.parRequestExpiry, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, + this.googleAccountLinking, this.asyncApprovalNotificationChannels, this.thirdPartySecurityMode, - this.redirectionPolicy); + this.redirectionPolicy, + this.agentId, + this.oidcSupport); } @java.lang.Override @@ -1021,6 +1151,14 @@ public static final class Builder { private OptionalNullable tokenQuota = OptionalNullable.absent(); + private OptionalNullable identityAssertionAuthorizationGrant = + OptionalNullable.absent(); + + private OptionalNullable anonymousSessions = OptionalNullable.absent(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + private Optional formTemplate = Optional.empty(); private Optional addons = Optional.empty(); @@ -1068,9 +1206,14 @@ public static final class Builder { private OptionalNullable expressConfiguration = OptionalNullable.absent(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private OptionalNullable myOrganizationConfiguration = OptionalNullable.absent(); + private OptionalNullable googleAccountLinking = + OptionalNullable.absent(); + private OptionalNullable> asyncApprovalNotificationChannels = OptionalNullable.absent(); @@ -1078,6 +1221,10 @@ public static final class Builder { private Optional redirectionPolicy = Optional.empty(); + private OptionalNullable agentId = OptionalNullable.absent(); + + private OptionalNullable oidcSupport = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -1113,6 +1260,9 @@ public Builder from(UpdateClientRequestContent other) { customLoginPage(other.getCustomLoginPage()); customLoginPagePreview(other.getCustomLoginPagePreview()); tokenQuota(other.getTokenQuota()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); formTemplate(other.getFormTemplate()); addons(other.getAddons()); clientMetadata(other.getClientMetadata()); @@ -1135,10 +1285,14 @@ public Builder from(UpdateClientRequestContent other) { tokenExchange(other.getTokenExchange()); parRequestExpiry(other.getParRequestExpiry()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); redirectionPolicy(other.getRedirectionPolicy()); + agentId(other.getAgentId()); + oidcSupport(other.getOidcSupport()); return this; } @@ -1634,6 +1788,92 @@ public Builder tokenQuota(com.auth0.client.mgmt.core.Nullable return this; } + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + @Nullable + OptionalNullable + identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + UpdateIdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = OptionalNullable.of(identityAssertionAuthorizationGrant); + return this; + } + + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + if (identityAssertionAuthorizationGrant.isPresent()) { + this.identityAssertionAuthorizationGrant = + OptionalNullable.of(identityAssertionAuthorizationGrant.get()); + } else { + this.identityAssertionAuthorizationGrant = OptionalNullable.absent(); + } + return this; + } + + public Builder identityAssertionAuthorizationGrant( + com.auth0.client.mgmt.core.Nullable + identityAssertionAuthorizationGrant) { + if (identityAssertionAuthorizationGrant.isNull()) { + this.identityAssertionAuthorizationGrant = OptionalNullable.ofNull(); + } else if (identityAssertionAuthorizationGrant.isEmpty()) { + this.identityAssertionAuthorizationGrant = OptionalNullable.absent(); + } else { + this.identityAssertionAuthorizationGrant = + OptionalNullable.of(identityAssertionAuthorizationGrant.get()); + } + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(@Nullable OptionalNullable anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(UpdateAnonymousSessions anonymousSessions) { + this.anonymousSessions = OptionalNullable.of(anonymousSessions); + return this; + } + + public Builder anonymousSessions(Optional anonymousSessions) { + if (anonymousSessions.isPresent()) { + this.anonymousSessions = OptionalNullable.of(anonymousSessions.get()); + } else { + this.anonymousSessions = OptionalNullable.absent(); + } + return this; + } + + public Builder anonymousSessions( + com.auth0.client.mgmt.core.Nullable anonymousSessions) { + if (anonymousSessions.isNull()) { + this.anonymousSessions = OptionalNullable.ofNull(); + } else if (anonymousSessions.isEmpty()) { + this.anonymousSessions = OptionalNullable.absent(); + } else { + this.anonymousSessions = OptionalNullable.of(anonymousSessions.get()); + } + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + /** *

                                                              Form template for WS-Federation protocol

                                                              */ @@ -2190,6 +2430,17 @@ public Builder expressConfiguration( return this; } + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) public Builder myOrganizationConfiguration( @Nullable OptionalNullable myOrganizationConfiguration) { @@ -2225,6 +2476,39 @@ public Builder myOrganizationConfiguration( return this; } + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking( + @Nullable OptionalNullable googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfigurationOrNull googleAccountLinking) { + this.googleAccountLinking = OptionalNullable.of(googleAccountLinking); + return this; + } + + public Builder googleAccountLinking(Optional googleAccountLinking) { + if (googleAccountLinking.isPresent()) { + this.googleAccountLinking = OptionalNullable.of(googleAccountLinking.get()); + } else { + this.googleAccountLinking = OptionalNullable.absent(); + } + return this; + } + + public Builder googleAccountLinking( + com.auth0.client.mgmt.core.Nullable googleAccountLinking) { + if (googleAccountLinking.isNull()) { + this.googleAccountLinking = OptionalNullable.ofNull(); + } else if (googleAccountLinking.isEmpty()) { + this.googleAccountLinking = OptionalNullable.absent(); + } else { + this.googleAccountLinking = OptionalNullable.of(googleAccountLinking.get()); + } + return this; + } + @JsonSetter(value = "async_approval_notification_channels", nulls = Nulls.SKIP) public Builder asyncApprovalNotificationChannels( @Nullable @@ -2285,6 +2569,71 @@ public Builder redirectionPolicy(ClientRedirectionPolicyEnum redirectionPolicy) return this; } + /** + *

                                                              ID of the agent to associate with this client, or null to remove the association.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(@Nullable OptionalNullable agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = OptionalNullable.of(agentId); + return this; + } + + public Builder agentId(Optional agentId) { + if (agentId.isPresent()) { + this.agentId = OptionalNullable.of(agentId.get()); + } else { + this.agentId = OptionalNullable.absent(); + } + return this; + } + + public Builder agentId(com.auth0.client.mgmt.core.Nullable agentId) { + if (agentId.isNull()) { + this.agentId = OptionalNullable.ofNull(); + } else if (agentId.isEmpty()) { + this.agentId = OptionalNullable.absent(); + } else { + this.agentId = OptionalNullable.of(agentId.get()); + } + return this; + } + + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(@Nullable OptionalNullable oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupportPatch oidcSupport) { + this.oidcSupport = OptionalNullable.of(oidcSupport); + return this; + } + + public Builder oidcSupport(Optional oidcSupport) { + if (oidcSupport.isPresent()) { + this.oidcSupport = OptionalNullable.of(oidcSupport.get()); + } else { + this.oidcSupport = OptionalNullable.absent(); + } + return this; + } + + public Builder oidcSupport(com.auth0.client.mgmt.core.Nullable oidcSupport) { + if (oidcSupport.isNull()) { + this.oidcSupport = OptionalNullable.ofNull(); + } else if (oidcSupport.isEmpty()) { + this.oidcSupport = OptionalNullable.absent(); + } else { + this.oidcSupport = OptionalNullable.of(oidcSupport.get()); + } + return this; + } + public UpdateClientRequestContent build() { return new UpdateClientRequestContent( name, @@ -2316,6 +2665,9 @@ public UpdateClientRequestContent build() { customLoginPage, customLoginPagePreview, tokenQuota, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, formTemplate, addons, clientMetadata, @@ -2338,10 +2690,14 @@ public UpdateClientRequestContent build() { tokenExchange, parRequestExpiry, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, asyncApprovalNotificationChannels, thirdPartySecurityMode, redirectionPolicy, + agentId, + oidcSupport, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java index 05f995ff..e1619329 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,6 +27,10 @@ public final class UpdateClientResponseContent { private final Optional clientId; + private final Optional createdAt; + + private final Optional updatedAt; + private final Optional tenant; private final Optional name; @@ -132,10 +137,22 @@ public final class UpdateClientResponseContent { private final Optional expressConfiguration; + private final Optional b2BIntegrationConfiguration; + private final Optional myOrganizationConfiguration; + private final Optional googleAccountLinking; + + private final Optional identityAssertionAuthorizationGrant; + + private final Optional anonymousSessions; + + private final Optional enforceAnonSessionTransferNetworkBinding; + private final Optional thirdPartySecurityMode; + private final Optional oidcSupport; + private final Optional redirectionPolicy; private final Optional resourceServerIdentifier; @@ -146,6 +163,10 @@ public final class UpdateClientResponseContent { private final Optional externalMetadataCreatedBy; + private final Optional externalMetadataStatus; + + private final Optional agentId; + private final Optional externalClientId; private final Optional jwksUri; @@ -154,6 +175,8 @@ public final class UpdateClientResponseContent { private UpdateClientResponseContent( Optional clientId, + Optional createdAt, + Optional updatedAt, Optional tenant, Optional name, Optional description, @@ -207,17 +230,27 @@ private UpdateClientResponseContent( OptionalNullable parRequestExpiry, Optional tokenQuota, Optional expressConfiguration, + Optional b2BIntegrationConfiguration, Optional myOrganizationConfiguration, + Optional googleAccountLinking, + Optional identityAssertionAuthorizationGrant, + Optional anonymousSessions, + Optional enforceAnonSessionTransferNetworkBinding, Optional thirdPartySecurityMode, + Optional oidcSupport, Optional redirectionPolicy, Optional resourceServerIdentifier, Optional> asyncApprovalNotificationChannels, Optional externalMetadataType, Optional externalMetadataCreatedBy, + Optional externalMetadataStatus, + Optional agentId, Optional externalClientId, Optional jwksUri, Map additionalProperties) { this.clientId = clientId; + this.createdAt = createdAt; + this.updatedAt = updatedAt; this.tenant = tenant; this.name = name; this.description = description; @@ -271,13 +304,21 @@ private UpdateClientResponseContent( this.parRequestExpiry = parRequestExpiry; this.tokenQuota = tokenQuota; this.expressConfiguration = expressConfiguration; + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; this.myOrganizationConfiguration = myOrganizationConfiguration; + this.googleAccountLinking = googleAccountLinking; + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + this.anonymousSessions = anonymousSessions; + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; this.thirdPartySecurityMode = thirdPartySecurityMode; + this.oidcSupport = oidcSupport; this.redirectionPolicy = redirectionPolicy; this.resourceServerIdentifier = resourceServerIdentifier; this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; this.externalMetadataType = externalMetadataType; this.externalMetadataCreatedBy = externalMetadataCreatedBy; + this.externalMetadataStatus = externalMetadataStatus; + this.agentId = agentId; this.externalClientId = externalClientId; this.jwksUri = jwksUri; this.additionalProperties = additionalProperties; @@ -291,6 +332,22 @@ public Optional getClientId() { return clientId; } + /** + * @return The ISO 8601 timestamp of when this client was created. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The ISO 8601 timestamp of when this client was last updated. + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + /** * @return Name of the tenant this client belongs to. */ @@ -680,16 +737,46 @@ public Optional getExpressConfiguration() { return expressConfiguration; } + @JsonProperty("b2b_integration_configuration") + public Optional getB2BIntegrationConfiguration() { + return b2BIntegrationConfiguration; + } + @JsonProperty("my_organization_configuration") public Optional getMyOrganizationConfiguration() { return myOrganizationConfiguration; } + @JsonProperty("google_account_linking") + public Optional getGoogleAccountLinking() { + return googleAccountLinking; + } + + @JsonProperty("identity_assertion_authorization_grant") + public Optional getIdentityAssertionAuthorizationGrant() { + return identityAssertionAuthorizationGrant; + } + + @JsonProperty("anonymous_sessions") + public Optional getAnonymousSessions() { + return anonymousSessions; + } + + @JsonProperty("enforce_anon_session_transfer_network_binding") + public Optional getEnforceAnonSessionTransferNetworkBinding() { + return enforceAnonSessionTransferNetworkBinding; + } + @JsonProperty("third_party_security_mode") public Optional getThirdPartySecurityMode() { return thirdPartySecurityMode; } + @JsonProperty("oidc_support") + public Optional getOidcSupport() { + return oidcSupport; + } + @JsonProperty("redirection_policy") public Optional getRedirectionPolicy() { return redirectionPolicy; @@ -718,6 +805,19 @@ public Optional getExternalMetadataCreatedB return externalMetadataCreatedBy; } + @JsonProperty("external_metadata_status") + public Optional getExternalMetadataStatus() { + return externalMetadataStatus; + } + + /** + * @return ID of the agent associated with this client. + */ + @JsonProperty("agent_id") + public Optional getAgentId() { + return agentId; + } + /** * @return An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers. */ @@ -795,6 +895,8 @@ public Map getAdditionalProperties() { private boolean equalTo(UpdateClientResponseContent other) { return clientId.equals(other.clientId) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt) && tenant.equals(other.tenant) && name.equals(other.name) && description.equals(other.description) @@ -849,13 +951,21 @@ private boolean equalTo(UpdateClientResponseContent other) { && parRequestExpiry.equals(other.parRequestExpiry) && tokenQuota.equals(other.tokenQuota) && expressConfiguration.equals(other.expressConfiguration) + && b2BIntegrationConfiguration.equals(other.b2BIntegrationConfiguration) && myOrganizationConfiguration.equals(other.myOrganizationConfiguration) + && googleAccountLinking.equals(other.googleAccountLinking) + && identityAssertionAuthorizationGrant.equals(other.identityAssertionAuthorizationGrant) + && anonymousSessions.equals(other.anonymousSessions) + && enforceAnonSessionTransferNetworkBinding.equals(other.enforceAnonSessionTransferNetworkBinding) && thirdPartySecurityMode.equals(other.thirdPartySecurityMode) + && oidcSupport.equals(other.oidcSupport) && redirectionPolicy.equals(other.redirectionPolicy) && resourceServerIdentifier.equals(other.resourceServerIdentifier) && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels) && externalMetadataType.equals(other.externalMetadataType) && externalMetadataCreatedBy.equals(other.externalMetadataCreatedBy) + && externalMetadataStatus.equals(other.externalMetadataStatus) + && agentId.equals(other.agentId) && externalClientId.equals(other.externalClientId) && jwksUri.equals(other.jwksUri); } @@ -864,6 +974,8 @@ private boolean equalTo(UpdateClientResponseContent other) { public int hashCode() { return Objects.hash( this.clientId, + this.createdAt, + this.updatedAt, this.tenant, this.name, this.description, @@ -917,13 +1029,21 @@ public int hashCode() { this.parRequestExpiry, this.tokenQuota, this.expressConfiguration, + this.b2BIntegrationConfiguration, this.myOrganizationConfiguration, + this.googleAccountLinking, + this.identityAssertionAuthorizationGrant, + this.anonymousSessions, + this.enforceAnonSessionTransferNetworkBinding, this.thirdPartySecurityMode, + this.oidcSupport, this.redirectionPolicy, this.resourceServerIdentifier, this.asyncApprovalNotificationChannels, this.externalMetadataType, this.externalMetadataCreatedBy, + this.externalMetadataStatus, + this.agentId, this.externalClientId, this.jwksUri); } @@ -941,6 +1061,10 @@ public static Builder builder() { public static final class Builder { private Optional clientId = Optional.empty(); + private Optional createdAt = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + private Optional tenant = Optional.empty(); private Optional name = Optional.empty(); @@ -1048,10 +1172,23 @@ public static final class Builder { private Optional expressConfiguration = Optional.empty(); + private Optional b2BIntegrationConfiguration = Optional.empty(); + private Optional myOrganizationConfiguration = Optional.empty(); + private Optional googleAccountLinking = Optional.empty(); + + private Optional identityAssertionAuthorizationGrant = Optional.empty(); + + private Optional anonymousSessions = Optional.empty(); + + private Optional enforceAnonSessionTransferNetworkBinding = + Optional.empty(); + private Optional thirdPartySecurityMode = Optional.empty(); + private Optional oidcSupport = Optional.empty(); + private Optional redirectionPolicy = Optional.empty(); private Optional resourceServerIdentifier = Optional.empty(); @@ -1063,6 +1200,10 @@ public static final class Builder { private Optional externalMetadataCreatedBy = Optional.empty(); + private Optional externalMetadataStatus = Optional.empty(); + + private Optional agentId = Optional.empty(); + private Optional externalClientId = Optional.empty(); private Optional jwksUri = Optional.empty(); @@ -1074,6 +1215,8 @@ private Builder() {} public Builder from(UpdateClientResponseContent other) { clientId(other.getClientId()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); tenant(other.getTenant()); name(other.getName()); description(other.getDescription()); @@ -1127,13 +1270,21 @@ public Builder from(UpdateClientResponseContent other) { parRequestExpiry(other.getParRequestExpiry()); tokenQuota(other.getTokenQuota()); expressConfiguration(other.getExpressConfiguration()); + b2BIntegrationConfiguration(other.getB2BIntegrationConfiguration()); myOrganizationConfiguration(other.getMyOrganizationConfiguration()); + googleAccountLinking(other.getGoogleAccountLinking()); + identityAssertionAuthorizationGrant(other.getIdentityAssertionAuthorizationGrant()); + anonymousSessions(other.getAnonymousSessions()); + enforceAnonSessionTransferNetworkBinding(other.getEnforceAnonSessionTransferNetworkBinding()); thirdPartySecurityMode(other.getThirdPartySecurityMode()); + oidcSupport(other.getOidcSupport()); redirectionPolicy(other.getRedirectionPolicy()); resourceServerIdentifier(other.getResourceServerIdentifier()); asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); externalMetadataType(other.getExternalMetadataType()); externalMetadataCreatedBy(other.getExternalMetadataCreatedBy()); + externalMetadataStatus(other.getExternalMetadataStatus()); + agentId(other.getAgentId()); externalClientId(other.getExternalClientId()); jwksUri(other.getJwksUri()); return this; @@ -1153,6 +1304,34 @@ public Builder clientId(String clientId) { return this; } + /** + *

                                                              The ISO 8601 timestamp of when this client was created.

                                                              + */ + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public Builder createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

                                                              The ISO 8601 timestamp of when this client was last updated.

                                                              + */ + @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) + public Builder updatedAt(Optional updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + /** *

                                                              Name of the tenant this client belongs to.

                                                              */ @@ -2000,6 +2179,17 @@ public Builder expressConfiguration(ExpressConfiguration expressConfiguration) { return this; } + @JsonSetter(value = "b2b_integration_configuration", nulls = Nulls.SKIP) + public Builder b2BIntegrationConfiguration(Optional b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = b2BIntegrationConfiguration; + return this; + } + + public Builder b2BIntegrationConfiguration(B2BIntegrationConfiguration b2BIntegrationConfiguration) { + this.b2BIntegrationConfiguration = Optional.ofNullable(b2BIntegrationConfiguration); + return this; + } + @JsonSetter(value = "my_organization_configuration", nulls = Nulls.SKIP) public Builder myOrganizationConfiguration( Optional myOrganizationConfiguration) { @@ -2013,6 +2203,55 @@ public Builder myOrganizationConfiguration( return this; } + @JsonSetter(value = "google_account_linking", nulls = Nulls.SKIP) + public Builder googleAccountLinking(Optional googleAccountLinking) { + this.googleAccountLinking = googleAccountLinking; + return this; + } + + public Builder googleAccountLinking(GoogleAccountLinkingConfiguration googleAccountLinking) { + this.googleAccountLinking = Optional.ofNullable(googleAccountLinking); + return this; + } + + @JsonSetter(value = "identity_assertion_authorization_grant", nulls = Nulls.SKIP) + public Builder identityAssertionAuthorizationGrant( + Optional identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = identityAssertionAuthorizationGrant; + return this; + } + + public Builder identityAssertionAuthorizationGrant( + IdentityAssertionAuthorizationGrant identityAssertionAuthorizationGrant) { + this.identityAssertionAuthorizationGrant = Optional.ofNullable(identityAssertionAuthorizationGrant); + return this; + } + + @JsonSetter(value = "anonymous_sessions", nulls = Nulls.SKIP) + public Builder anonymousSessions(Optional anonymousSessions) { + this.anonymousSessions = anonymousSessions; + return this; + } + + public Builder anonymousSessions(AnonymousSessions anonymousSessions) { + this.anonymousSessions = Optional.ofNullable(anonymousSessions); + return this; + } + + @JsonSetter(value = "enforce_anon_session_transfer_network_binding", nulls = Nulls.SKIP) + public Builder enforceAnonSessionTransferNetworkBinding( + Optional enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = enforceAnonSessionTransferNetworkBinding; + return this; + } + + public Builder enforceAnonSessionTransferNetworkBinding( + ClientAnonymousSessionTransferNetworkBindingEnum enforceAnonSessionTransferNetworkBinding) { + this.enforceAnonSessionTransferNetworkBinding = + Optional.ofNullable(enforceAnonSessionTransferNetworkBinding); + return this; + } + @JsonSetter(value = "third_party_security_mode", nulls = Nulls.SKIP) public Builder thirdPartySecurityMode(Optional thirdPartySecurityMode) { this.thirdPartySecurityMode = thirdPartySecurityMode; @@ -2024,6 +2263,17 @@ public Builder thirdPartySecurityMode(ClientThirdPartySecurityModeEnum thirdPart return this; } + @JsonSetter(value = "oidc_support", nulls = Nulls.SKIP) + public Builder oidcSupport(Optional oidcSupport) { + this.oidcSupport = oidcSupport; + return this; + } + + public Builder oidcSupport(ClientOidcSupport oidcSupport) { + this.oidcSupport = Optional.ofNullable(oidcSupport); + return this; + } + @JsonSetter(value = "redirection_policy", nulls = Nulls.SKIP) public Builder redirectionPolicy(Optional redirectionPolicy) { this.redirectionPolicy = redirectionPolicy; @@ -2085,6 +2335,31 @@ public Builder externalMetadataCreatedBy(ClientExternalMetadataCreatedByEnum ext return this; } + @JsonSetter(value = "external_metadata_status", nulls = Nulls.SKIP) + public Builder externalMetadataStatus(Optional externalMetadataStatus) { + this.externalMetadataStatus = externalMetadataStatus; + return this; + } + + public Builder externalMetadataStatus(ClientExternalMetadataStatusEnum externalMetadataStatus) { + this.externalMetadataStatus = Optional.ofNullable(externalMetadataStatus); + return this; + } + + /** + *

                                                              ID of the agent associated with this client.

                                                              + */ + @JsonSetter(value = "agent_id", nulls = Nulls.SKIP) + public Builder agentId(Optional agentId) { + this.agentId = agentId; + return this; + } + + public Builder agentId(String agentId) { + this.agentId = Optional.ofNullable(agentId); + return this; + } + /** *

                                                              An alternate client identifier to be used during authorization flows. Only supports CIMD-based client identifiers.

                                                              */ @@ -2116,6 +2391,8 @@ public Builder jwksUri(String jwksUri) { public UpdateClientResponseContent build() { return new UpdateClientResponseContent( clientId, + createdAt, + updatedAt, tenant, name, description, @@ -2169,13 +2446,21 @@ public UpdateClientResponseContent build() { parRequestExpiry, tokenQuota, expressConfiguration, + b2BIntegrationConfiguration, myOrganizationConfiguration, + googleAccountLinking, + identityAssertionAuthorizationGrant, + anonymousSessions, + enforceAnonSessionTransferNetworkBinding, thirdPartySecurityMode, + oidcSupport, redirectionPolicy, resourceServerIdentifier, asyncApprovalNotificationChannels, externalMetadataType, externalMetadataCreatedBy, + externalMetadataStatus, + agentId, externalClientId, jwksUri, additionalProperties); 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 e2c953d0..a69842fb 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java @@ -42,6 +42,8 @@ public final class UpdateConnectionOptions { private final Optional customScripts; + private final Optional otpSettings; + private final OptionalNullable authenticationMethods; private final OptionalNullable passkeyOptions; @@ -83,8 +85,6 @@ public final class UpdateConnectionOptions { private final OptionalNullable gatewayAuthentication; - private final OptionalNullable federatedConnectionsAccessTokens; - private final Optional passwordOptions; private final Optional assertionDecryptionSettings; @@ -93,6 +93,10 @@ public final class UpdateConnectionOptions { private final Optional dpopSigningAlg; + private final Optional enablePushedAuthorizationRequests; + + private final Optional pushedAuthorizationRequestEndpoint; + private final OptionalNullable tokenEndpointAuthMethod; private final OptionalNullable tokenEndpointAuthSigningAlg; @@ -101,6 +105,20 @@ public final class UpdateConnectionOptions { private final Optional idTokenSessionExpirySupported; + private final Optional useOauthSpecScope; + + private final OptionalNullable clientId; + + private final OptionalNullable> allowedAudiences; + + private final OptionalNullable discoveryUrl; + + private final OptionalNullable oidcMetadata; + + private final Optional> thumbprints; + + private final Optional> thumbprintsSha384; + private final Map additionalProperties; private UpdateConnectionOptions( @@ -113,6 +131,7 @@ private UpdateConnectionOptions( Optional importMode, OptionalNullable>> configuration, Optional customScripts, + Optional otpSettings, OptionalNullable authenticationMethods, OptionalNullable passkeyOptions, OptionalNullable passwordPolicy, @@ -133,15 +152,23 @@ private UpdateConnectionOptions( OptionalNullable>> upstreamParams, Optional setUserRootAttributes, OptionalNullable gatewayAuthentication, - OptionalNullable federatedConnectionsAccessTokens, Optional passwordOptions, Optional assertionDecryptionSettings, OptionalNullable> idTokenSignedResponseAlgs, Optional dpopSigningAlg, + Optional enablePushedAuthorizationRequests, + Optional pushedAuthorizationRequestEndpoint, OptionalNullable tokenEndpointAuthMethod, OptionalNullable tokenEndpointAuthSigningAlg, Optional tokenEndpointJwtcaAudFormat, Optional idTokenSessionExpirySupported, + Optional useOauthSpecScope, + OptionalNullable clientId, + OptionalNullable> allowedAudiences, + OptionalNullable discoveryUrl, + OptionalNullable oidcMetadata, + Optional> thumbprints, + Optional> thumbprintsSha384, Map additionalProperties) { this.validation = validation; this.nonPersistentAttrs = nonPersistentAttrs; @@ -152,6 +179,7 @@ private UpdateConnectionOptions( this.importMode = importMode; this.configuration = configuration; this.customScripts = customScripts; + this.otpSettings = otpSettings; this.authenticationMethods = authenticationMethods; this.passkeyOptions = passkeyOptions; this.passwordPolicy = passwordPolicy; @@ -172,15 +200,23 @@ private UpdateConnectionOptions( this.upstreamParams = upstreamParams; this.setUserRootAttributes = setUserRootAttributes; this.gatewayAuthentication = gatewayAuthentication; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; this.passwordOptions = passwordOptions; this.assertionDecryptionSettings = assertionDecryptionSettings; this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; this.dpopSigningAlg = dpopSigningAlg; + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; this.tokenEndpointJwtcaAudFormat = tokenEndpointJwtcaAudFormat; this.idTokenSessionExpirySupported = idTokenSessionExpirySupported; + this.useOauthSpecScope = useOauthSpecScope; + this.clientId = clientId; + this.allowedAudiences = allowedAudiences; + this.discoveryUrl = discoveryUrl; + this.oidcMetadata = oidcMetadata; + this.thumbprints = thumbprints; + this.thumbprintsSha384 = thumbprintsSha384; this.additionalProperties = additionalProperties; } @@ -259,6 +295,11 @@ public Optional getCustomScripts() { return customScripts; } + @JsonProperty("otp_settings") + public Optional getOtpSettings() { + return otpSettings; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authentication_methods") public OptionalNullable getAuthenticationMethods() { @@ -395,15 +436,6 @@ public OptionalNullable getGatewayAuthenticatio return gatewayAuthentication; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - @JsonProperty("password_options") public Optional getPasswordOptions() { return passwordOptions; @@ -428,6 +460,16 @@ public Optional getDpopSigningAlg() { return dpopSigningAlg; } + @JsonProperty("enable_pushed_authorization_requests") + public Optional getEnablePushedAuthorizationRequests() { + return enablePushedAuthorizationRequests; + } + + @JsonProperty("pushed_authorization_request_endpoint") + public Optional getPushedAuthorizationRequestEndpoint() { + return pushedAuthorizationRequestEndpoint; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_endpoint_auth_method") public OptionalNullable getTokenEndpointAuthMethod() { @@ -456,6 +498,63 @@ public Optional getIdTokenSessionExpirySupported() { return idTokenSessionExpirySupported; } + @JsonProperty("useOauthSpecScope") + public Optional getUseOauthSpecScope() { + return useOauthSpecScope; + } + + /** + * @return The client ID registered with the identity provider + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + public OptionalNullable getClientId() { + if (clientId == null) { + return OptionalNullable.absent(); + } + return clientId; + } + + /** + * @return Additional Google client IDs accepted as the aud (audience) of Google ID tokens, used by Google native login and Google Streamlined Linking. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allowed_audiences") + public OptionalNullable> getAllowedAudiences() { + if (allowedAudiences == null) { + return OptionalNullable.absent(); + } + return allowedAudiences; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("discovery_url") + public OptionalNullable getDiscoveryUrl() { + if (discoveryUrl == null) { + return OptionalNullable.absent(); + } + return discoveryUrl; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("oidc_metadata") + public OptionalNullable getOidcMetadata() { + if (oidcMetadata == null) { + return OptionalNullable.absent(); + } + return oidcMetadata; + } + + @JsonProperty("thumbprints") + public Optional> getThumbprints() { + return thumbprints; + } + + @JsonProperty("thumbprints_sha384") + public Optional> getThumbprintsSha384() { + return thumbprintsSha384; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("validation") private OptionalNullable _getValidation() { @@ -529,12 +628,6 @@ private OptionalNullable _getGatewayAuthenticat return gatewayAuthentication; } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("id_token_signed_response_algs") private OptionalNullable> _getIdTokenSignedResponseAlgs() { @@ -553,6 +646,30 @@ private OptionalNullable _getTokenEnd return tokenEndpointAuthSigningAlg; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("client_id") + private OptionalNullable _getClientId() { + return clientId; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("allowed_audiences") + private OptionalNullable> _getAllowedAudiences() { + return allowedAudiences; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("discovery_url") + private OptionalNullable _getDiscoveryUrl() { + return discoveryUrl; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("oidc_metadata") + private OptionalNullable _getOidcMetadata() { + return oidcMetadata; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -574,6 +691,7 @@ private boolean equalTo(UpdateConnectionOptions other) { && importMode.equals(other.importMode) && configuration.equals(other.configuration) && customScripts.equals(other.customScripts) + && otpSettings.equals(other.otpSettings) && authenticationMethods.equals(other.authenticationMethods) && passkeyOptions.equals(other.passkeyOptions) && passwordPolicy.equals(other.passwordPolicy) @@ -594,15 +712,23 @@ private boolean equalTo(UpdateConnectionOptions other) { && upstreamParams.equals(other.upstreamParams) && setUserRootAttributes.equals(other.setUserRootAttributes) && gatewayAuthentication.equals(other.gatewayAuthentication) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) && passwordOptions.equals(other.passwordOptions) && assertionDecryptionSettings.equals(other.assertionDecryptionSettings) && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) && dpopSigningAlg.equals(other.dpopSigningAlg) + && enablePushedAuthorizationRequests.equals(other.enablePushedAuthorizationRequests) + && pushedAuthorizationRequestEndpoint.equals(other.pushedAuthorizationRequestEndpoint) && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) && tokenEndpointAuthSigningAlg.equals(other.tokenEndpointAuthSigningAlg) && tokenEndpointJwtcaAudFormat.equals(other.tokenEndpointJwtcaAudFormat) - && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported); + && idTokenSessionExpirySupported.equals(other.idTokenSessionExpirySupported) + && useOauthSpecScope.equals(other.useOauthSpecScope) + && clientId.equals(other.clientId) + && allowedAudiences.equals(other.allowedAudiences) + && discoveryUrl.equals(other.discoveryUrl) + && oidcMetadata.equals(other.oidcMetadata) + && thumbprints.equals(other.thumbprints) + && thumbprintsSha384.equals(other.thumbprintsSha384); } @java.lang.Override @@ -617,6 +743,7 @@ public int hashCode() { this.importMode, this.configuration, this.customScripts, + this.otpSettings, this.authenticationMethods, this.passkeyOptions, this.passwordPolicy, @@ -637,15 +764,23 @@ public int hashCode() { this.upstreamParams, this.setUserRootAttributes, this.gatewayAuthentication, - this.federatedConnectionsAccessTokens, this.passwordOptions, this.assertionDecryptionSettings, this.idTokenSignedResponseAlgs, this.dpopSigningAlg, + this.enablePushedAuthorizationRequests, + this.pushedAuthorizationRequestEndpoint, this.tokenEndpointAuthMethod, this.tokenEndpointAuthSigningAlg, this.tokenEndpointJwtcaAudFormat, - this.idTokenSessionExpirySupported); + this.idTokenSessionExpirySupported, + this.useOauthSpecScope, + this.clientId, + this.allowedAudiences, + this.discoveryUrl, + this.oidcMetadata, + this.thumbprints, + this.thumbprintsSha384); } @java.lang.Override @@ -677,6 +812,8 @@ public static final class Builder { private Optional customScripts = Optional.empty(); + private Optional otpSettings = Optional.empty(); + private OptionalNullable authenticationMethods = OptionalNullable.absent(); private OptionalNullable passkeyOptions = OptionalNullable.absent(); @@ -720,9 +857,6 @@ public static final class Builder { private OptionalNullable gatewayAuthentication = OptionalNullable.absent(); - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - private Optional passwordOptions = Optional.empty(); private Optional assertionDecryptionSettings = Optional.empty(); @@ -732,6 +866,10 @@ public static final class Builder { private Optional dpopSigningAlg = Optional.empty(); + private Optional enablePushedAuthorizationRequests = Optional.empty(); + + private Optional pushedAuthorizationRequestEndpoint = Optional.empty(); + private OptionalNullable tokenEndpointAuthMethod = OptionalNullable.absent(); @@ -742,6 +880,20 @@ public static final class Builder { private Optional idTokenSessionExpirySupported = Optional.empty(); + private Optional useOauthSpecScope = Optional.empty(); + + private OptionalNullable clientId = OptionalNullable.absent(); + + private OptionalNullable> allowedAudiences = OptionalNullable.absent(); + + private OptionalNullable discoveryUrl = OptionalNullable.absent(); + + private OptionalNullable oidcMetadata = OptionalNullable.absent(); + + private Optional> thumbprints = Optional.empty(); + + private Optional> thumbprintsSha384 = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -757,6 +909,7 @@ public Builder from(UpdateConnectionOptions other) { importMode(other.getImportMode()); configuration(other.getConfiguration()); customScripts(other.getCustomScripts()); + otpSettings(other.getOtpSettings()); authenticationMethods(other.getAuthenticationMethods()); passkeyOptions(other.getPasskeyOptions()); passwordPolicy(other.getPasswordPolicy()); @@ -777,15 +930,23 @@ public Builder from(UpdateConnectionOptions other) { upstreamParams(other.getUpstreamParams()); setUserRootAttributes(other.getSetUserRootAttributes()); gatewayAuthentication(other.getGatewayAuthentication()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); passwordOptions(other.getPasswordOptions()); assertionDecryptionSettings(other.getAssertionDecryptionSettings()); idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); dpopSigningAlg(other.getDpopSigningAlg()); + enablePushedAuthorizationRequests(other.getEnablePushedAuthorizationRequests()); + pushedAuthorizationRequestEndpoint(other.getPushedAuthorizationRequestEndpoint()); tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); tokenEndpointJwtcaAudFormat(other.getTokenEndpointJwtcaAudFormat()); idTokenSessionExpirySupported(other.getIdTokenSessionExpirySupported()); + useOauthSpecScope(other.getUseOauthSpecScope()); + clientId(other.getClientId()); + allowedAudiences(other.getAllowedAudiences()); + discoveryUrl(other.getDiscoveryUrl()); + oidcMetadata(other.getOidcMetadata()); + thumbprints(other.getThumbprints()); + thumbprintsSha384(other.getThumbprintsSha384()); return this; } @@ -967,6 +1128,17 @@ public Builder customScripts(ConnectionCustomScripts customScripts) { return this; } + @JsonSetter(value = "otp_settings", nulls = Nulls.SKIP) + public Builder otpSettings(Optional otpSettings) { + this.otpSettings = otpSettings; + return this; + } + + public Builder otpSettings(ConnectionOtpSettings otpSettings) { + this.otpSettings = Optional.ofNullable(otpSettings); + return this; + } + @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) public Builder authenticationMethods( @Nullable OptionalNullable authenticationMethods) { @@ -1389,43 +1561,6 @@ public Builder gatewayAuthentication( return this; } - @JsonSetter(value = "federated_connections_access_tokens", nulls = Nulls.SKIP) - public Builder federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - return this; - } - - public Builder federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens); - return this; - } - - public Builder federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isPresent()) { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } - return this; - } - - public Builder federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens) { - if (federatedConnectionsAccessTokens.isNull()) { - this.federatedConnectionsAccessTokens = OptionalNullable.ofNull(); - } else if (federatedConnectionsAccessTokens.isEmpty()) { - this.federatedConnectionsAccessTokens = OptionalNullable.absent(); - } else { - this.federatedConnectionsAccessTokens = OptionalNullable.of(federatedConnectionsAccessTokens.get()); - } - return this; - } - @JsonSetter(value = "password_options", nulls = Nulls.SKIP) public Builder passwordOptions(Optional passwordOptions) { this.passwordOptions = passwordOptions; @@ -1496,6 +1631,28 @@ public Builder dpopSigningAlg(ConnectionDpopSigningAlgEnum dpopSigningAlg) { return this; } + @JsonSetter(value = "enable_pushed_authorization_requests", nulls = Nulls.SKIP) + public Builder enablePushedAuthorizationRequests(Optional enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = enablePushedAuthorizationRequests; + return this; + } + + public Builder enablePushedAuthorizationRequests(Boolean enablePushedAuthorizationRequests) { + this.enablePushedAuthorizationRequests = Optional.ofNullable(enablePushedAuthorizationRequests); + return this; + } + + @JsonSetter(value = "pushed_authorization_request_endpoint", nulls = Nulls.SKIP) + public Builder pushedAuthorizationRequestEndpoint(Optional pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = pushedAuthorizationRequestEndpoint; + return this; + } + + public Builder pushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) { + this.pushedAuthorizationRequestEndpoint = Optional.ofNullable(pushedAuthorizationRequestEndpoint); + return this; + } + @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) public Builder tokenEndpointAuthMethod( @Nullable OptionalNullable tokenEndpointAuthMethod) { @@ -1590,6 +1747,169 @@ 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; + } + + /** + *

                                                              The client ID registered with the identity provider

                                                              + */ + @JsonSetter(value = "client_id", nulls = Nulls.SKIP) + public Builder clientId(@Nullable OptionalNullable clientId) { + this.clientId = clientId; + return this; + } + + public Builder clientId(String clientId) { + this.clientId = OptionalNullable.of(clientId); + return this; + } + + public Builder clientId(Optional clientId) { + if (clientId.isPresent()) { + this.clientId = OptionalNullable.of(clientId.get()); + } else { + this.clientId = OptionalNullable.absent(); + } + return this; + } + + public Builder clientId(com.auth0.client.mgmt.core.Nullable clientId) { + if (clientId.isNull()) { + this.clientId = OptionalNullable.ofNull(); + } else if (clientId.isEmpty()) { + this.clientId = OptionalNullable.absent(); + } else { + this.clientId = OptionalNullable.of(clientId.get()); + } + return this; + } + + /** + *

                                                              Additional Google client IDs accepted as the aud (audience) of Google ID tokens, used by Google native login and Google Streamlined Linking.

                                                              + */ + @JsonSetter(value = "allowed_audiences", nulls = Nulls.SKIP) + public Builder allowedAudiences(@Nullable OptionalNullable> allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + public Builder allowedAudiences(List allowedAudiences) { + this.allowedAudiences = OptionalNullable.of(allowedAudiences); + return this; + } + + public Builder allowedAudiences(Optional> allowedAudiences) { + if (allowedAudiences.isPresent()) { + this.allowedAudiences = OptionalNullable.of(allowedAudiences.get()); + } else { + this.allowedAudiences = OptionalNullable.absent(); + } + return this; + } + + public Builder allowedAudiences(com.auth0.client.mgmt.core.Nullable> allowedAudiences) { + if (allowedAudiences.isNull()) { + this.allowedAudiences = OptionalNullable.ofNull(); + } else if (allowedAudiences.isEmpty()) { + this.allowedAudiences = OptionalNullable.absent(); + } else { + this.allowedAudiences = OptionalNullable.of(allowedAudiences.get()); + } + return this; + } + + @JsonSetter(value = "discovery_url", nulls = Nulls.SKIP) + public Builder discoveryUrl(@Nullable OptionalNullable discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder discoveryUrl(String discoveryUrl) { + this.discoveryUrl = OptionalNullable.of(discoveryUrl); + return this; + } + + public Builder discoveryUrl(Optional discoveryUrl) { + if (discoveryUrl.isPresent()) { + this.discoveryUrl = OptionalNullable.of(discoveryUrl.get()); + } else { + this.discoveryUrl = OptionalNullable.absent(); + } + return this; + } + + public Builder discoveryUrl(com.auth0.client.mgmt.core.Nullable discoveryUrl) { + if (discoveryUrl.isNull()) { + this.discoveryUrl = OptionalNullable.ofNull(); + } else if (discoveryUrl.isEmpty()) { + this.discoveryUrl = OptionalNullable.absent(); + } else { + this.discoveryUrl = OptionalNullable.of(discoveryUrl.get()); + } + return this; + } + + @JsonSetter(value = "oidc_metadata", nulls = Nulls.SKIP) + public Builder oidcMetadata(@Nullable OptionalNullable oidcMetadata) { + this.oidcMetadata = oidcMetadata; + return this; + } + + public Builder oidcMetadata(ConnectionsOidcMetadata oidcMetadata) { + this.oidcMetadata = OptionalNullable.of(oidcMetadata); + return this; + } + + public Builder oidcMetadata(Optional oidcMetadata) { + if (oidcMetadata.isPresent()) { + this.oidcMetadata = OptionalNullable.of(oidcMetadata.get()); + } else { + this.oidcMetadata = OptionalNullable.absent(); + } + return this; + } + + public Builder oidcMetadata(com.auth0.client.mgmt.core.Nullable oidcMetadata) { + if (oidcMetadata.isNull()) { + this.oidcMetadata = OptionalNullable.ofNull(); + } else if (oidcMetadata.isEmpty()) { + this.oidcMetadata = OptionalNullable.absent(); + } else { + this.oidcMetadata = OptionalNullable.of(oidcMetadata.get()); + } + return this; + } + + @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) + public Builder thumbprints(Optional> thumbprints) { + this.thumbprints = thumbprints; + return this; + } + + public Builder thumbprints(List thumbprints) { + this.thumbprints = Optional.ofNullable(thumbprints); + return this; + } + + @JsonSetter(value = "thumbprints_sha384", nulls = Nulls.SKIP) + public Builder thumbprintsSha384(Optional> thumbprintsSha384) { + this.thumbprintsSha384 = thumbprintsSha384; + return this; + } + + public Builder thumbprintsSha384(List thumbprintsSha384) { + this.thumbprintsSha384 = Optional.ofNullable(thumbprintsSha384); + return this; + } + public UpdateConnectionOptions build() { return new UpdateConnectionOptions( validation, @@ -1601,6 +1921,7 @@ public UpdateConnectionOptions build() { importMode, configuration, customScripts, + otpSettings, authenticationMethods, passkeyOptions, passwordPolicy, @@ -1621,15 +1942,23 @@ public UpdateConnectionOptions build() { upstreamParams, setUserRootAttributes, gatewayAuthentication, - federatedConnectionsAccessTokens, passwordOptions, assertionDecryptionSettings, idTokenSignedResponseAlgs, dpopSigningAlg, + enablePushedAuthorizationRequests, + pushedAuthorizationRequestEndpoint, tokenEndpointAuthMethod, tokenEndpointAuthSigningAlg, tokenEndpointJwtcaAudFormat, idTokenSessionExpirySupported, + useOauthSpecScope, + clientId, + allowedAudiences, + discoveryUrl, + oidcMetadata, + thumbprints, + thumbprintsSha384, 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 8fc46e12..f826f670 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,10 @@ public final class UpdateConnectionProfileRequestContent { private final Optional strategyOverrides; + private final Optional provisioning; + + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private UpdateConnectionProfileRequestContent( @@ -42,6 +46,8 @@ private UpdateConnectionProfileRequestContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.organization = organization; @@ -49,6 +55,8 @@ private UpdateConnectionProfileRequestContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -82,6 +90,16 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @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 +118,9 @@ 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) + && provisioning.equals(other.provisioning) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -111,7 +131,9 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -137,6 +159,10 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional provisioning = Optional.empty(); + + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -149,6 +175,8 @@ public Builder from(UpdateConnectionProfileRequestContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -218,6 +246,29 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + 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 +277,8 @@ public UpdateConnectionProfileRequestContent build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, + 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 b9ff360f..b52069f2 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,10 @@ public final class UpdateConnectionProfileResponseContent { private final Optional strategyOverrides; + private final Optional provisioning; + + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private UpdateConnectionProfileResponseContent( @@ -45,6 +49,8 @@ private UpdateConnectionProfileResponseContent( Optional> enabledFeatures, Optional connectionConfig, Optional strategyOverrides, + Optional provisioning, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.id = id; this.name = name; @@ -53,6 +59,8 @@ private UpdateConnectionProfileResponseContent( this.enabledFeatures = enabledFeatures; this.connectionConfig = connectionConfig; this.strategyOverrides = strategyOverrides; + this.provisioning = provisioning; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -91,6 +99,16 @@ public Optional getStrategyOverrides() { return strategyOverrides; } + @JsonProperty("provisioning") + public Optional getProvisioning() { + return provisioning; + } + + @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 +128,9 @@ 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) + && provisioning.equals(other.provisioning) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -122,7 +142,9 @@ public int hashCode() { this.connectionNamePrefixTemplate, this.enabledFeatures, this.connectionConfig, - this.strategyOverrides); + this.strategyOverrides, + this.provisioning, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -150,6 +172,10 @@ public static final class Builder { private Optional strategyOverrides = Optional.empty(); + private Optional provisioning = Optional.empty(); + + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -163,6 +189,8 @@ public Builder from(UpdateConnectionProfileResponseContent other) { enabledFeatures(other.getEnabledFeatures()); connectionConfig(other.getConnectionConfig()); strategyOverrides(other.getStrategyOverrides()); + provisioning(other.getProvisioning()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -243,6 +271,29 @@ public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOver return this; } + @JsonSetter(value = "provisioning", nulls = Nulls.SKIP) + public Builder provisioning(Optional provisioning) { + this.provisioning = provisioning; + return this; + } + + public Builder provisioning(ConnectionProfileProvisioning provisioning) { + this.provisioning = Optional.ofNullable(provisioning); + 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 +303,8 @@ public UpdateConnectionProfileResponseContent build() { enabledFeatures, connectionConfig, strategyOverrides, + provisioning, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java index 350b4450..6853bb49 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java @@ -44,6 +44,8 @@ public final class UpdateConnectionRequestContent { private final Optional crossAppAccessRequestingApp; + private final OptionalNullable crossAppAccessResourceApp; + private final Map additionalProperties; private UpdateConnectionRequestContent( @@ -57,6 +59,7 @@ private UpdateConnectionRequestContent( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Map additionalProperties) { this.displayName = displayName; this.options = options; @@ -68,6 +71,7 @@ private UpdateConnectionRequestContent( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -144,6 +148,15 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("options") private OptionalNullable _getOptions() { @@ -156,6 +169,12 @@ private OptionalNullable> _getEnabledClients() { return enabledClients; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,7 +196,8 @@ private boolean equalTo(UpdateConnectionRequestContent other) { && metadata.equals(other.metadata) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) - && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -192,7 +212,8 @@ public int hashCode() { this.metadata, this.authentication, this.connectedAccounts, - this.crossAppAccessRequestingApp); + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -226,6 +247,8 @@ public static final class Builder { private Optional crossAppAccessRequestingApp = Optional.empty(); + private OptionalNullable crossAppAccessResourceApp = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -242,6 +265,7 @@ public Builder from(UpdateConnectionRequestContent other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -410,6 +434,39 @@ public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppA return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(UpdateCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + public Builder crossAppAccessResourceApp(Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + public Builder crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + public UpdateConnectionRequestContent build() { return new UpdateConnectionRequestContent( displayName, @@ -422,6 +479,7 @@ public UpdateConnectionRequestContent build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java index 05027d0b..e6551f71 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,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 = UpdateConnectionRequestContentOidc.Builder.class) @@ -38,6 +40,8 @@ public final class UpdateConnectionRequestContentOidc implements IConnectionComm private final Optional crossAppAccessRequestingApp; + private final OptionalNullable crossAppAccessResourceApp; + private final Optional showAsButton; private final Map additionalProperties; @@ -51,6 +55,7 @@ private UpdateConnectionRequestContentOidc( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Optional showAsButton, Map additionalProperties) { this.displayName = displayName; @@ -61,6 +66,7 @@ private UpdateConnectionRequestContentOidc( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; } @@ -109,11 +115,26 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonProperty("show_as_button") public Optional getShowAsButton() { return showAsButton; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -135,6 +156,7 @@ private boolean equalTo(UpdateConnectionRequestContentOidc other) { && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp) && showAsButton.equals(other.showAsButton); } @@ -149,6 +171,7 @@ public int hashCode() { this.authentication, this.connectedAccounts, this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp, this.showAsButton); } @@ -179,6 +202,9 @@ public static final class Builder { private Optional crossAppAccessRequestingApp = Optional.empty(); + private OptionalNullable crossAppAccessResourceApp = + OptionalNullable.absent(); + private Optional showAsButton = Optional.empty(); @JsonAnySetter @@ -195,6 +221,7 @@ public Builder from(UpdateConnectionRequestContentOidc other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); showAsButton(other.getShowAsButton()); return this; } @@ -287,6 +314,40 @@ public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppA return this; } + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + public Builder crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) public Builder showAsButton(Optional showAsButton) { this.showAsButton = showAsButton; @@ -308,6 +369,7 @@ public UpdateConnectionRequestContentOidc build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, showAsButton, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSaml.java index df2acf51..b1000840 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSaml.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSaml.java @@ -3,6 +3,7 @@ */ package com.auth0.client.mgmt.types; +import com.auth0.client.mgmt.core.NullableNonemptyFilter; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,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 = UpdateConnectionRequestContentSaml.Builder.class) @@ -32,6 +34,10 @@ public final class UpdateConnectionRequestContentSaml implements IConnectionComm private final Optional options; + private final Optional crossAppAccessRequestingApp; + + private final OptionalNullable crossAppAccessResourceApp; + private final Optional showAsButton; private final Map additionalProperties; @@ -42,6 +48,8 @@ private UpdateConnectionRequestContentSaml( Optional isDomainConnection, Optional>> metadata, Optional options, + Optional crossAppAccessRequestingApp, + OptionalNullable crossAppAccessResourceApp, Optional showAsButton, Map additionalProperties) { this.displayName = displayName; @@ -49,6 +57,8 @@ private UpdateConnectionRequestContentSaml( this.isDomainConnection = isDomainConnection; this.metadata = metadata; this.options = options; + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.showAsButton = showAsButton; this.additionalProperties = additionalProperties; } @@ -82,11 +92,31 @@ public Optional getOptions() { return options; } + @JsonProperty("cross_app_access_requesting_app") + public Optional getCrossAppAccessRequestingApp() { + return crossAppAccessRequestingApp; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + public OptionalNullable getCrossAppAccessResourceApp() { + if (crossAppAccessResourceApp == null) { + return OptionalNullable.absent(); + } + return crossAppAccessResourceApp; + } + @JsonProperty("show_as_button") public Optional getShowAsButton() { return showAsButton; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("cross_app_access_resource_app") + private OptionalNullable _getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -105,6 +135,8 @@ private boolean equalTo(UpdateConnectionRequestContentSaml other) { && isDomainConnection.equals(other.isDomainConnection) && metadata.equals(other.metadata) && options.equals(other.options) + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp) && showAsButton.equals(other.showAsButton); } @@ -116,6 +148,8 @@ public int hashCode() { this.isDomainConnection, this.metadata, this.options, + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp, this.showAsButton); } @@ -140,6 +174,11 @@ public static final class Builder { private Optional options = Optional.empty(); + private Optional crossAppAccessRequestingApp = Optional.empty(); + + private OptionalNullable crossAppAccessResourceApp = + OptionalNullable.absent(); + private Optional showAsButton = Optional.empty(); @JsonAnySetter @@ -153,6 +192,8 @@ public Builder from(UpdateConnectionRequestContentSaml other) { isDomainConnection(other.getIsDomainConnection()); metadata(other.getMetadata()); options(other.getOptions()); + crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); showAsButton(other.getShowAsButton()); return this; } @@ -212,6 +253,51 @@ public Builder options(ConnectionOptionsSaml options) { return this; } + @JsonSetter(value = "cross_app_access_requesting_app", nulls = Nulls.SKIP) + public Builder crossAppAccessRequestingApp(Optional crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + return this; + } + + public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppAccessRequestingApp) { + this.crossAppAccessRequestingApp = Optional.ofNullable(crossAppAccessRequestingApp); + return this; + } + + @JsonSetter(value = "cross_app_access_resource_app", nulls = Nulls.SKIP) + public Builder crossAppAccessResourceApp( + @Nullable OptionalNullable crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = crossAppAccessResourceApp; + return this; + } + + public Builder crossAppAccessResourceApp(ConnectionCrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp); + return this; + } + + public Builder crossAppAccessResourceApp( + Optional crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isPresent()) { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } else { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } + return this; + } + + public Builder crossAppAccessResourceApp( + com.auth0.client.mgmt.core.Nullable crossAppAccessResourceApp) { + if (crossAppAccessResourceApp.isNull()) { + this.crossAppAccessResourceApp = OptionalNullable.ofNull(); + } else if (crossAppAccessResourceApp.isEmpty()) { + this.crossAppAccessResourceApp = OptionalNullable.absent(); + } else { + this.crossAppAccessResourceApp = OptionalNullable.of(crossAppAccessResourceApp.get()); + } + return this; + } + @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) public Builder showAsButton(Optional showAsButton) { this.showAsButton = showAsButton; @@ -230,6 +316,8 @@ public UpdateConnectionRequestContentSaml build() { isDomainConnection, metadata, options, + crossAppAccessRequestingApp, + crossAppAccessResourceApp, showAsButton, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java index bcdd4cdf..10c1393c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java @@ -48,6 +48,8 @@ public final class UpdateConnectionResponseContent { private final Optional crossAppAccessRequestingApp; + private final Optional crossAppAccessResourceApp; + private final Map additionalProperties; private UpdateConnectionResponseContent( @@ -64,6 +66,7 @@ private UpdateConnectionResponseContent( Optional authentication, Optional connectedAccounts, Optional crossAppAccessRequestingApp, + Optional crossAppAccessResourceApp, Map additionalProperties) { this.name = name; this.displayName = displayName; @@ -78,6 +81,7 @@ private UpdateConnectionResponseContent( this.authentication = authentication; this.connectedAccounts = connectedAccounts; this.crossAppAccessRequestingApp = crossAppAccessRequestingApp; + this.crossAppAccessResourceApp = crossAppAccessResourceApp; this.additionalProperties = additionalProperties; } @@ -170,6 +174,11 @@ public Optional getCrossAppAccessRequestingApp() { return crossAppAccessRequestingApp; } + @JsonProperty("cross_app_access_resource_app") + public Optional getCrossAppAccessResourceApp() { + return crossAppAccessResourceApp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -194,7 +203,8 @@ private boolean equalTo(UpdateConnectionResponseContent other) { && metadata.equals(other.metadata) && authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts) - && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp); + && crossAppAccessRequestingApp.equals(other.crossAppAccessRequestingApp) + && crossAppAccessResourceApp.equals(other.crossAppAccessResourceApp); } @java.lang.Override @@ -212,7 +222,8 @@ public int hashCode() { this.metadata, this.authentication, this.connectedAccounts, - this.crossAppAccessRequestingApp); + this.crossAppAccessRequestingApp, + this.crossAppAccessResourceApp); } @java.lang.Override @@ -252,6 +263,8 @@ public static final class Builder { private Optional crossAppAccessRequestingApp = Optional.empty(); + private Optional crossAppAccessResourceApp = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -271,6 +284,7 @@ public Builder from(UpdateConnectionResponseContent other) { authentication(other.getAuthentication()); connectedAccounts(other.getConnectedAccounts()); crossAppAccessRequestingApp(other.getCrossAppAccessRequestingApp()); + crossAppAccessResourceApp(other.getCrossAppAccessResourceApp()); return this; } @@ -441,6 +455,17 @@ public Builder crossAppAccessRequestingApp(CrossAppAccessRequestingApp crossAppA 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(CrossAppAccessResourceApp crossAppAccessResourceApp) { + this.crossAppAccessResourceApp = Optional.ofNullable(crossAppAccessResourceApp); + return this; + } + public UpdateConnectionResponseContent build() { return new UpdateConnectionResponseContent( name, @@ -456,6 +481,7 @@ public UpdateConnectionResponseContent build() { authentication, connectedAccounts, crossAppAccessRequestingApp, + crossAppAccessResourceApp, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateCrossAppAccessResourceApp.java b/src/main/java/com/auth0/client/mgmt/types/UpdateCrossAppAccessResourceApp.java new file mode 100644 index 00000000..21a33078 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateCrossAppAccessResourceApp.java @@ -0,0 +1,119 @@ +/** + * 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 = UpdateCrossAppAccessResourceApp.Builder.class) +public final class UpdateCrossAppAccessResourceApp { + private final CrossAppAccessResourceAppStatusEnum status; + + private final Map additionalProperties; + + private UpdateCrossAppAccessResourceApp( + CrossAppAccessResourceAppStatusEnum status, Map additionalProperties) { + this.status = status; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("status") + public CrossAppAccessResourceAppStatusEnum getStatus() { + return status; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateCrossAppAccessResourceApp && equalTo((UpdateCrossAppAccessResourceApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateCrossAppAccessResourceApp 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 CrossAppAccessResourceAppStatusEnum status); + + Builder from(UpdateCrossAppAccessResourceApp other); + } + + public interface _FinalStage { + UpdateCrossAppAccessResourceApp build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements StatusStage, _FinalStage { + private CrossAppAccessResourceAppStatusEnum status; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateCrossAppAccessResourceApp other) { + status(other.getStatus()); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public _FinalStage status(@NotNull CrossAppAccessResourceAppStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + public UpdateCrossAppAccessResourceApp build() { + return new UpdateCrossAppAccessResourceApp(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/UpdateCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java index 8b67001e..e570dd5c 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/UpdateCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainResponseContent.java index 62d8416e..9c5e0a48 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainResponseContent.java @@ -361,7 +361,6 @@ public Builder from(UpdateCustomDomainResponseContent other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -373,7 +372,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -385,7 +383,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

                                                              Whether this is a primary domain (true) or not (false).

                                                              *

                                                              Whether this is a primary domain (true) or not (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCanonicalDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCanonicalDomainResponseContent.java index 97fdeb39..a1327f6c 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCanonicalDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCanonicalDomainResponseContent.java @@ -99,7 +99,6 @@ public Builder from(UpdateDefaultCanonicalDomainResponseContent other) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java index 4779ecd9..9a166c69 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDefaultCustomDomainResponseContent.java @@ -380,7 +380,6 @@ public Builder from(UpdateDefaultCustomDomainResponseContent other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -392,7 +391,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -404,7 +402,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

                                                              Whether this is a primary domain (true) or not (false).

                                                              *

                                                              Whether this is a primary domain (true) or not (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java index 75dfb1d0..37f90ae5 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java @@ -350,7 +350,6 @@ public Builder from(UpdateDirectoryProvisioningResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -362,7 +361,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -374,7 +372,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -386,7 +383,6 @@ public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { } /** - *

                                                              Whether periodic automatic synchronization is enabled

                                                              *

                                                              Whether periodic automatic synchronization is enabled

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -398,7 +394,6 @@ public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) } /** - *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              *

                                                              The timestamp at which the directory provisioning configuration was created

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -410,7 +405,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              *

                                                              The timestamp at which the directory provisioning configuration was last updated

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java index 85ea275e..bd18331d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java @@ -121,7 +121,6 @@ public Builder from(UpdateEnabledClientConnectionsRequestContentItem other) { } /** - *

                                                              The client_id of the client whose status will be changed. Note that the limit per PATCH request is 50 clients.

                                                              *

                                                              The client_id of the client whose status will be changed. Note that the limit per PATCH request is 50 clients.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -133,7 +132,6 @@ public StatusStage clientId(@NotNull String clientId) { } /** - *

                                                              Whether the connection is enabled or not for this client_id

                                                              *

                                                              Whether the connection is enabled or not for this client_id

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateExperimentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateExperimentResponseContent.java new file mode 100644 index 00000000..7194da2b --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateExperimentResponseContent.java @@ -0,0 +1,829 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.ArrayList; +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; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateExperimentResponseContent.Builder.class) +public final class UpdateExperimentResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final String featureFlagId; + + private final Optional featureFlagName; + + private final String authenticationFlow; + + private final AllocationStrategyEnum allocationStrategy; + + private final ExperimentStatusEnum status; + + private final boolean isValid; + + private final Optional defaultConfig; + + private final OptionalNullable> featureFlagSnapshot; + + private final List allocations; + + private final List editableFields; + + private final Optional> levels; + + private final OptionalNullable currentLevel; + + private final Optional startedAt; + + private final Optional endedAt; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private UpdateExperimentResponseContent( + String id, + String name, + Optional description, + String featureFlagId, + Optional featureFlagName, + String authenticationFlow, + AllocationStrategyEnum allocationStrategy, + ExperimentStatusEnum status, + boolean isValid, + Optional defaultConfig, + OptionalNullable> featureFlagSnapshot, + List allocations, + List editableFields, + Optional> levels, + OptionalNullable currentLevel, + Optional startedAt, + Optional endedAt, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.featureFlagId = featureFlagId; + this.featureFlagName = featureFlagName; + this.authenticationFlow = authenticationFlow; + this.allocationStrategy = allocationStrategy; + this.status = status; + this.isValid = isValid; + this.defaultConfig = defaultConfig; + this.featureFlagSnapshot = featureFlagSnapshot; + this.allocations = allocations; + this.editableFields = editableFields; + this.levels = levels; + this.currentLevel = currentLevel; + this.startedAt = startedAt; + this.endedAt = endedAt; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("feature_flag_name") + public Optional getFeatureFlagName() { + return featureFlagName; + } + + @JsonProperty("authentication_flow") + public String getAuthenticationFlow() { + return authenticationFlow; + } + + @JsonProperty("allocation_strategy") + public AllocationStrategyEnum getAllocationStrategy() { + return allocationStrategy; + } + + @JsonProperty("status") + public ExperimentStatusEnum getStatus() { + return status; + } + + /** + * @return Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result. + */ + @JsonProperty("is_valid") + public boolean getIsValid() { + return isValid; + } + + @JsonProperty("default_config") + public Optional getDefaultConfig() { + return defaultConfig; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + public OptionalNullable> getFeatureFlagSnapshot() { + if (featureFlagSnapshot == null) { + return OptionalNullable.absent(); + } + return featureFlagSnapshot; + } + + @JsonProperty("allocations") + public List getAllocations() { + return allocations; + } + + /** + * @return Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic. + */ + @JsonProperty("editable_fields") + public List getEditableFields() { + return editableFields; + } + + /** + * @return Ramp experiment levels configuration. + */ + @JsonProperty("levels") + public Optional> getLevels() { + return levels; + } + + /** + * @return Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + public OptionalNullable getCurrentLevel() { + if (currentLevel == null) { + return OptionalNullable.absent(); + } + return currentLevel; + } + + @JsonProperty("started_at") + public Optional getStartedAt() { + return startedAt; + } + + @JsonProperty("ended_at") + public Optional getEndedAt() { + return endedAt; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("feature_flag_snapshot") + private OptionalNullable> _getFeatureFlagSnapshot() { + return featureFlagSnapshot; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("current_level") + private OptionalNullable _getCurrentLevel() { + return currentLevel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateExperimentResponseContent && equalTo((UpdateExperimentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateExperimentResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && featureFlagId.equals(other.featureFlagId) + && featureFlagName.equals(other.featureFlagName) + && authenticationFlow.equals(other.authenticationFlow) + && allocationStrategy.equals(other.allocationStrategy) + && status.equals(other.status) + && isValid == other.isValid + && defaultConfig.equals(other.defaultConfig) + && featureFlagSnapshot.equals(other.featureFlagSnapshot) + && allocations.equals(other.allocations) + && editableFields.equals(other.editableFields) + && levels.equals(other.levels) + && currentLevel.equals(other.currentLevel) + && startedAt.equals(other.startedAt) + && endedAt.equals(other.endedAt) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.featureFlagId, + this.featureFlagName, + this.authenticationFlow, + this.allocationStrategy, + this.status, + this.isValid, + this.defaultConfig, + this.featureFlagSnapshot, + this.allocations, + this.editableFields, + this.levels, + this.currentLevel, + this.startedAt, + this.endedAt, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(UpdateExperimentResponseContent other); + } + + public interface NameStage { + FeatureFlagIdStage name(@NotNull String name); + } + + public interface FeatureFlagIdStage { + AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId); + } + + public interface AuthenticationFlowStage { + AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow); + } + + public interface AllocationStrategyStage { + StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy); + } + + public interface StatusStage { + IsValidStage status(@NotNull ExperimentStatusEnum status); + } + + public interface IsValidStage { + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + */ + CreatedAtStage isValid(boolean isValid); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + UpdateExperimentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage featureFlagName(Optional featureFlagName); + + _FinalStage featureFlagName(String featureFlagName); + + _FinalStage defaultConfig(Optional defaultConfig); + + _FinalStage defaultConfig(DefaultConfigEnum defaultConfig); + + _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Map featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot); + + _FinalStage featureFlagSnapshot(com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot); + + _FinalStage allocations(List allocations); + + _FinalStage addAllocations(AllocationItem allocations); + + _FinalStage addAllAllocations(List allocations); + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + _FinalStage editableFields(List editableFields); + + _FinalStage addEditableFields(String editableFields); + + _FinalStage addAllEditableFields(List editableFields); + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + _FinalStage levels(Optional> levels); + + _FinalStage levels(List levels); + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + _FinalStage currentLevel(@Nullable OptionalNullable currentLevel); + + _FinalStage currentLevel(Integer currentLevel); + + _FinalStage currentLevel(Optional currentLevel); + + _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel); + + _FinalStage startedAt(Optional startedAt); + + _FinalStage startedAt(OffsetDateTime startedAt); + + _FinalStage endedAt(Optional endedAt); + + _FinalStage endedAt(OffsetDateTime endedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, + NameStage, + FeatureFlagIdStage, + AuthenticationFlowStage, + AllocationStrategyStage, + StatusStage, + IsValidStage, + CreatedAtStage, + UpdatedAtStage, + _FinalStage { + private String id; + + private String name; + + private String featureFlagId; + + private String authenticationFlow; + + private AllocationStrategyEnum allocationStrategy; + + private ExperimentStatusEnum status; + + private boolean isValid; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional endedAt = Optional.empty(); + + private Optional startedAt = Optional.empty(); + + private OptionalNullable currentLevel = OptionalNullable.absent(); + + private Optional> levels = Optional.empty(); + + private List editableFields = new ArrayList<>(); + + private List allocations = new ArrayList<>(); + + private OptionalNullable> featureFlagSnapshot = OptionalNullable.absent(); + + private Optional defaultConfig = Optional.empty(); + + private Optional featureFlagName = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateExperimentResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + featureFlagId(other.getFeatureFlagId()); + featureFlagName(other.getFeatureFlagName()); + authenticationFlow(other.getAuthenticationFlow()); + allocationStrategy(other.getAllocationStrategy()); + status(other.getStatus()); + isValid(other.getIsValid()); + defaultConfig(other.getDefaultConfig()); + featureFlagSnapshot(other.getFeatureFlagSnapshot()); + allocations(other.getAllocations()); + editableFields(other.getEditableFields()); + levels(other.getLevels()); + currentLevel(other.getCurrentLevel()); + startedAt(other.getStartedAt()); + endedAt(other.getEndedAt()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public FeatureFlagIdStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public AuthenticationFlowStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("authentication_flow") + public AllocationStrategyStage authenticationFlow(@NotNull String authenticationFlow) { + this.authenticationFlow = Objects.requireNonNull(authenticationFlow, "authenticationFlow must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("allocation_strategy") + public StatusStage allocationStrategy(@NotNull AllocationStrategyEnum allocationStrategy) { + this.allocationStrategy = Objects.requireNonNull(allocationStrategy, "allocationStrategy must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public IsValidStage status(@NotNull ExperimentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + /** + *

                                                              Whether the experiment is valid and ready to activate, as of its last update. It can lag changes made later to related entities. Call POST /experiments/{id}/validate for the current result.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_valid") + public CreatedAtStage isValid(boolean isValid) { + this.isValid = isValid; + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage endedAt(OffsetDateTime endedAt) { + this.endedAt = Optional.ofNullable(endedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) + public _FinalStage endedAt(Optional endedAt) { + this.endedAt = endedAt; + return this; + } + + @java.lang.Override + public _FinalStage startedAt(OffsetDateTime startedAt) { + this.startedAt = Optional.ofNullable(startedAt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "started_at", nulls = Nulls.SKIP) + public _FinalStage startedAt(Optional startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(com.auth0.client.mgmt.core.Nullable currentLevel) { + if (currentLevel.isNull()) { + this.currentLevel = OptionalNullable.ofNull(); + } else if (currentLevel.isEmpty()) { + this.currentLevel = OptionalNullable.absent(); + } else { + this.currentLevel = OptionalNullable.of(currentLevel.get()); + } + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(Optional currentLevel) { + if (currentLevel.isPresent()) { + this.currentLevel = OptionalNullable.of(currentLevel.get()); + } else { + this.currentLevel = OptionalNullable.absent(); + } + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage currentLevel(Integer currentLevel) { + this.currentLevel = OptionalNullable.of(currentLevel); + return this; + } + + /** + *

                                                              Read-only. The active exposure percentage for the current ramp step. Null when no ramp schedule is active.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "current_level", nulls = Nulls.SKIP) + public _FinalStage currentLevel(@Nullable OptionalNullable currentLevel) { + this.currentLevel = currentLevel; + return this; + } + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage levels(List levels) { + this.levels = Optional.ofNullable(levels); + return this; + } + + /** + *

                                                              Ramp experiment levels configuration.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "levels", nulls = Nulls.SKIP) + public _FinalStage levels(Optional> levels) { + this.levels = levels; + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllEditableFields(List editableFields) { + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addEditableFields(String editableFields) { + this.editableFields.add(editableFields); + return this; + } + + /** + *

                                                              Fields that may be mutated given the experiment's current status. Computed at response time; always current with the API's enforcement logic.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "editable_fields", nulls = Nulls.SKIP) + public _FinalStage editableFields(List editableFields) { + this.editableFields.clear(); + if (editableFields != null) { + this.editableFields.addAll(editableFields); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllAllocations(List allocations) { + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage addAllocations(AllocationItem allocations) { + this.allocations.add(allocations); + return this; + } + + @java.lang.Override + @JsonSetter(value = "allocations", nulls = Nulls.SKIP) + public _FinalStage allocations(List allocations) { + this.allocations.clear(); + if (allocations != null) { + this.allocations.addAll(allocations); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot( + com.auth0.client.mgmt.core.Nullable> featureFlagSnapshot) { + if (featureFlagSnapshot.isNull()) { + this.featureFlagSnapshot = OptionalNullable.ofNull(); + } else if (featureFlagSnapshot.isEmpty()) { + this.featureFlagSnapshot = OptionalNullable.absent(); + } else { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Optional> featureFlagSnapshot) { + if (featureFlagSnapshot.isPresent()) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot.get()); + } else { + this.featureFlagSnapshot = OptionalNullable.absent(); + } + return this; + } + + @java.lang.Override + public _FinalStage featureFlagSnapshot(Map featureFlagSnapshot) { + this.featureFlagSnapshot = OptionalNullable.of(featureFlagSnapshot); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_snapshot", nulls = Nulls.SKIP) + public _FinalStage featureFlagSnapshot(@Nullable OptionalNullable> featureFlagSnapshot) { + this.featureFlagSnapshot = featureFlagSnapshot; + return this; + } + + @java.lang.Override + public _FinalStage defaultConfig(DefaultConfigEnum defaultConfig) { + this.defaultConfig = Optional.ofNullable(defaultConfig); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default_config", nulls = Nulls.SKIP) + public _FinalStage defaultConfig(Optional defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + @java.lang.Override + public _FinalStage featureFlagName(String featureFlagName) { + this.featureFlagName = Optional.ofNullable(featureFlagName); + return this; + } + + @java.lang.Override + @JsonSetter(value = "feature_flag_name", nulls = Nulls.SKIP) + public _FinalStage featureFlagName(Optional featureFlagName) { + this.featureFlagName = featureFlagName; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public UpdateExperimentResponseContent build() { + return new UpdateExperimentResponseContent( + id, + name, + description, + featureFlagId, + featureFlagName, + authenticationFlow, + allocationStrategy, + status, + isValid, + defaultConfig, + featureFlagSnapshot, + allocations, + editableFields, + levels, + currentLevel, + startedAt, + endedAt, + 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/UpdateFeatureFlagResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFeatureFlagResponseContent.java new file mode 100644 index 00000000..b1cf9f7d --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateFeatureFlagResponseContent.java @@ -0,0 +1,313 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateFeatureFlagResponseContent.Builder.class) +public final class UpdateFeatureFlagResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final FeatureFlagTypeEnum type; + + private final FeatureFlagStatusEnum status; + + private final Optional> parameters; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private UpdateFeatureFlagResponseContent( + String id, + String name, + Optional description, + FeatureFlagTypeEnum type, + FeatureFlagStatusEnum status, + Optional> parameters, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.parameters = parameters; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public FeatureFlagTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public FeatureFlagStatusEnum getStatus() { + return status; + } + + @JsonProperty("parameters") + public Optional> getParameters() { + return parameters; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateFeatureFlagResponseContent && equalTo((UpdateFeatureFlagResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateFeatureFlagResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && parameters.equals(other.parameters) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.parameters, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(UpdateFeatureFlagResponseContent other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull FeatureFlagTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull FeatureFlagStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + UpdateFeatureFlagResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage parameters(Optional> parameters); + + _FinalStage parameters(Map parameters); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private FeatureFlagTypeEnum type; + + private FeatureFlagStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional> parameters = Optional.empty(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateFeatureFlagResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + parameters(other.getParameters()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull FeatureFlagTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull FeatureFlagStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage parameters(Map parameters) { + this.parameters = Optional.ofNullable(parameters); + return this; + } + + @java.lang.Override + @JsonSetter(value = "parameters", nulls = Nulls.SKIP) + public _FinalStage parameters(Optional> parameters) { + this.parameters = parameters; + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public UpdateFeatureFlagResponseContent build() { + return new UpdateFeatureFlagResponseContent( + id, name, description, type, status, parameters, 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/UpdateFlowsVaultConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionResponseContent.java index ebda4b62..c4a3bb5e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionResponseContent.java @@ -323,7 +323,6 @@ public Builder from(UpdateFlowsVaultConnectionResponseContent other) { } /** - *

                                                              Flows Vault Connection identifier.

                                                              *

                                                              Flows Vault Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -335,7 +334,6 @@ public AppIdStage id(@NotNull String id) { } /** - *

                                                              Flows Vault Connection app identifier.

                                                              *

                                                              Flows Vault Connection app identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -347,7 +345,6 @@ public NameStage appId(@NotNull String appId) { } /** - *

                                                              Flows Vault Connection name.

                                                              *

                                                              Flows Vault Connection name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -359,7 +356,6 @@ public ReadyStage name(@NotNull String name) { } /** - *

                                                              Whether the Flows Vault Connection is configured.

                                                              *

                                                              Whether the Flows Vault Connection is configured.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -371,7 +367,6 @@ public CreatedAtStage ready(boolean ready) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -383,7 +378,6 @@ public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              *

                                                              The ISO 8601 formatted date when this Flows Vault Connection was updated.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java index 8eebc23f..4c5e4431 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java @@ -223,11 +223,6 @@ public UpdateFlowsVaultConnectionSetup deserialize(JsonParser p, Deserialization } catch (RuntimeException e) { } } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupBigqueryOauthJwt.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("type") && ((Map) value).containsKey("secret_key")) { @@ -319,10 +314,6 @@ public UpdateFlowsVaultConnectionSetup deserialize(JsonParser p, Deserialization } catch (RuntimeException e) { } } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthCode.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("type") && ((Map) value).containsKey("account_id") @@ -333,6 +324,15 @@ public UpdateFlowsVaultConnectionSetup deserialize(JsonParser p, Deserialization } catch (RuntimeException e) { } } + try { + return of( + ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupBigqueryOauthJwt.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthCode.class)); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } 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 5c3d4d1c..712f0764 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/UpdateIdentityAssertionAuthorizationGrant.java b/src/main/java/com/auth0/client/mgmt/types/UpdateIdentityAssertionAuthorizationGrant.java new file mode 100644 index 00000000..254be7f4 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateIdentityAssertionAuthorizationGrant.java @@ -0,0 +1,128 @@ +/** + * 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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateIdentityAssertionAuthorizationGrant.Builder.class) +public final class UpdateIdentityAssertionAuthorizationGrant { + private final boolean active; + + private final Map additionalProperties; + + private UpdateIdentityAssertionAuthorizationGrant(boolean active, Map additionalProperties) { + this.active = active; + this.additionalProperties = additionalProperties; + } + + /** + * @return If set to true, the client can exchange ID-JAGs for access tokens. + */ + @JsonProperty("active") + public boolean getActive() { + return active; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateIdentityAssertionAuthorizationGrant + && equalTo((UpdateIdentityAssertionAuthorizationGrant) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateIdentityAssertionAuthorizationGrant other) { + return active == other.active; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.active); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ActiveStage builder() { + return new Builder(); + } + + public interface ActiveStage { + /** + *

                                                              If set to true, the client can exchange ID-JAGs for access tokens.

                                                              + */ + _FinalStage active(boolean active); + + Builder from(UpdateIdentityAssertionAuthorizationGrant other); + } + + public interface _FinalStage { + UpdateIdentityAssertionAuthorizationGrant build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ActiveStage, _FinalStage { + private boolean active; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateIdentityAssertionAuthorizationGrant other) { + active(other.getActive()); + return this; + } + + /** + *

                                                              If set to true, the client can exchange ID-JAGs for access tokens.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("active") + public _FinalStage active(boolean active) { + this.active = active; + return this; + } + + @java.lang.Override + public UpdateIdentityAssertionAuthorizationGrant build() { + return new UpdateIdentityAssertionAuthorizationGrant(active, 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/UpdateOrganizationAllConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java index c73c1e9f..7ee04a0d 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationAllConnectionResponseContent.java @@ -31,6 +31,8 @@ public final class UpdateOrganizationAllConnectionResponseContent { private final Optional organizationAccessLevel; + private final Optional organizationMemberAccessLevel; + private final Optional isEnabled; private final String connectionId; @@ -45,6 +47,7 @@ private UpdateOrganizationAllConnectionResponseContent( Optional showAsButton, Optional isSignupEnabled, Optional organizationAccessLevel, + Optional organizationMemberAccessLevel, Optional isEnabled, String connectionId, Optional connection, @@ -54,6 +57,7 @@ private UpdateOrganizationAllConnectionResponseContent( this.showAsButton = showAsButton; this.isSignupEnabled = isSignupEnabled; this.organizationAccessLevel = organizationAccessLevel; + this.organizationMemberAccessLevel = organizationMemberAccessLevel; this.isEnabled = isEnabled; this.connectionId = connectionId; this.connection = connection; @@ -97,6 +101,11 @@ public Optional getOrganizationAccessLevel() { return organizationAccessLevel; } + @JsonProperty("organization_member_access_level") + public Optional getOrganizationMemberAccessLevel() { + return organizationMemberAccessLevel; + } + /** * @return Whether the connection is enabled for the organization. */ @@ -136,6 +145,7 @@ private boolean equalTo(UpdateOrganizationAllConnectionResponseContent other) { && showAsButton.equals(other.showAsButton) && isSignupEnabled.equals(other.isSignupEnabled) && organizationAccessLevel.equals(other.organizationAccessLevel) + && organizationMemberAccessLevel.equals(other.organizationMemberAccessLevel) && isEnabled.equals(other.isEnabled) && connectionId.equals(other.connectionId) && connection.equals(other.connection); @@ -149,6 +159,7 @@ public int hashCode() { this.showAsButton, this.isSignupEnabled, this.organizationAccessLevel, + this.organizationMemberAccessLevel, this.isEnabled, this.connectionId, this.connection); @@ -211,6 +222,11 @@ public interface _FinalStage { _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel); + _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel); + + _FinalStage organizationMemberAccessLevel(OrganizationMemberAccessLevelEnum organizationMemberAccessLevel); + /** *

                                                              Whether the connection is enabled for the organization.

                                                              */ @@ -231,6 +247,8 @@ public static final class Builder implements ConnectionIdStage, _FinalStage { private Optional isEnabled = Optional.empty(); + private Optional organizationMemberAccessLevel = Optional.empty(); + private Optional organizationAccessLevel = Optional.empty(); private Optional isSignupEnabled = Optional.empty(); @@ -253,6 +271,7 @@ public Builder from(UpdateOrganizationAllConnectionResponseContent other) { showAsButton(other.getShowAsButton()); isSignupEnabled(other.getIsSignupEnabled()); organizationAccessLevel(other.getOrganizationAccessLevel()); + organizationMemberAccessLevel(other.getOrganizationMemberAccessLevel()); isEnabled(other.getIsEnabled()); connectionId(other.getConnectionId()); connection(other.getConnection()); @@ -260,7 +279,6 @@ public Builder from(UpdateOrganizationAllConnectionResponseContent other) { } /** - *

                                                              Connection identifier.

                                                              *

                                                              Connection identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -304,6 +322,21 @@ public _FinalStage isEnabled(Optional isEnabled) { return this; } + @java.lang.Override + public _FinalStage organizationMemberAccessLevel( + OrganizationMemberAccessLevelEnum organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = Optional.ofNullable(organizationMemberAccessLevel); + return this; + } + + @java.lang.Override + @JsonSetter(value = "organization_member_access_level", nulls = Nulls.SKIP) + public _FinalStage organizationMemberAccessLevel( + Optional organizationMemberAccessLevel) { + this.organizationMemberAccessLevel = organizationMemberAccessLevel; + return this; + } + @java.lang.Override public _FinalStage organizationAccessLevel(OrganizationAccessLevelEnum organizationAccessLevel) { this.organizationAccessLevel = Optional.ofNullable(organizationAccessLevel); @@ -405,6 +438,7 @@ public UpdateOrganizationAllConnectionResponseContent build() { showAsButton, isSignupEnabled, organizationAccessLevel, + organizationMemberAccessLevel, isEnabled, connectionId, connection, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationClientResponseContent.java new file mode 100644 index 00000000..060ae704 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationClientResponseContent.java @@ -0,0 +1,198 @@ +/** + * 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.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateOrganizationClientResponseContent.Builder.class) +public final class UpdateOrganizationClientResponseContent { + private final String clientId; + + private final boolean useForMemberAccess; + + private final Optional client; + + private final Map additionalProperties; + + private UpdateOrganizationClientResponseContent( + String clientId, + boolean useForMemberAccess, + Optional client, + Map additionalProperties) { + this.clientId = clientId; + this.useForMemberAccess = useForMemberAccess; + this.client = client; + this.additionalProperties = additionalProperties; + } + + /** + * @return The identifier of the client associated with the organization. + */ + @JsonProperty("client_id") + public String getClientId() { + return clientId; + } + + /** + * @return Whether this client is used for member access to the organization. + */ + @JsonProperty("use_for_member_access") + public boolean getUseForMemberAccess() { + return useForMemberAccess; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateOrganizationClientResponseContent + && equalTo((UpdateOrganizationClientResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateOrganizationClientResponseContent other) { + return clientId.equals(other.clientId) + && useForMemberAccess == other.useForMemberAccess + && client.equals(other.client); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.clientId, this.useForMemberAccess, this.client); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ClientIdStage builder() { + return new Builder(); + } + + public interface ClientIdStage { + /** + *

                                                              The identifier of the client associated with the organization.

                                                              + */ + UseForMemberAccessStage clientId(@NotNull String clientId); + + Builder from(UpdateOrganizationClientResponseContent other); + } + + public interface UseForMemberAccessStage { + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + */ + _FinalStage useForMemberAccess(boolean useForMemberAccess); + } + + public interface _FinalStage { + UpdateOrganizationClientResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage client(Optional client); + + _FinalStage client(OrganizationClientMetadata client); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ClientIdStage, UseForMemberAccessStage, _FinalStage { + private String clientId; + + private boolean useForMemberAccess; + + private Optional client = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateOrganizationClientResponseContent other) { + clientId(other.getClientId()); + useForMemberAccess(other.getUseForMemberAccess()); + client(other.getClient()); + return this; + } + + /** + *

                                                              The identifier of the client associated with the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("client_id") + public UseForMemberAccessStage clientId(@NotNull String clientId) { + this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); + return this; + } + + /** + *

                                                              Whether this client is used for member access to the organization.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("use_for_member_access") + public _FinalStage useForMemberAccess(boolean useForMemberAccess) { + this.useForMemberAccess = useForMemberAccess; + return this; + } + + @java.lang.Override + public _FinalStage client(OrganizationClientMetadata client) { + this.client = Optional.ofNullable(client); + return this; + } + + @java.lang.Override + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public _FinalStage client(Optional client) { + this.client = client; + return this; + } + + @java.lang.Override + public UpdateOrganizationClientResponseContent build() { + return new UpdateOrganizationClientResponseContent( + clientId, useForMemberAccess, client, 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/UpdateOrganizationDiscoveryDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationDiscoveryDomainResponseContent.java index f687785f..ad61730e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationDiscoveryDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationDiscoveryDomainResponseContent.java @@ -219,7 +219,6 @@ public Builder from(UpdateOrganizationDiscoveryDomainResponseContent other) { } /** - *

                                                              Organization discovery domain identifier.

                                                              *

                                                              Organization discovery domain identifier.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -231,7 +230,6 @@ public DomainStage id(@NotNull String id) { } /** - *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              *

                                                              The domain name to associate with the organization e.g. acme.com.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -250,7 +248,6 @@ public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus st } /** - *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              *

                                                              A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -262,7 +259,6 @@ public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { } /** - *

                                                              The full domain where the TXT record should be added.

                                                              *

                                                              The full domain where the TXT record should be added.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java index 64d4b0d4..bcf96603 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java @@ -33,6 +33,10 @@ public final class UpdateOrganizationRequestContent { private final OptionalNullable tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + private final Map additionalProperties; private UpdateOrganizationRequestContent( @@ -41,12 +45,16 @@ private UpdateOrganizationRequestContent( Optional branding, Optional>> metadata, OptionalNullable tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, Map additionalProperties) { this.displayName = displayName; this.name = name; this.branding = branding; this.metadata = metadata; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; this.additionalProperties = additionalProperties; } @@ -85,6 +93,19 @@ public OptionalNullable getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_quota") private OptionalNullable _getTokenQuota() { @@ -107,12 +128,21 @@ private boolean equalTo(UpdateOrganizationRequestContent other) { && name.equals(other.name) && branding.equals(other.branding) && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive); } @java.lang.Override public int hashCode() { - return Objects.hash(this.displayName, this.name, this.branding, this.metadata, this.tokenQuota); + return Objects.hash( + this.displayName, + this.name, + this.branding, + this.metadata, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive); } @java.lang.Override @@ -136,6 +166,10 @@ public static final class Builder { private OptionalNullable tokenQuota = OptionalNullable.absent(); + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -147,6 +181,8 @@ public Builder from(UpdateOrganizationRequestContent other) { branding(other.getBranding()); metadata(other.getMetadata()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); return this; } @@ -231,9 +267,41 @@ public Builder tokenQuota(com.auth0.client.mgmt.core.Nullable return this; } + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + public UpdateOrganizationRequestContent build() { return new UpdateOrganizationRequestContent( - displayName, name, branding, metadata, tokenQuota, additionalProperties); + displayName, + name, + branding, + metadata, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java index 79f93b23..90550740 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java @@ -33,6 +33,12 @@ public final class UpdateOrganizationResponseContent { private final Optional tokenQuota; + private final Optional thirdPartyClientAccess; + + private final Optional isAppEntitlementActive; + + private final Optional client; + private final Map additionalProperties; private UpdateOrganizationResponseContent( @@ -42,6 +48,9 @@ private UpdateOrganizationResponseContent( Optional branding, Optional>> metadata, Optional tokenQuota, + Optional thirdPartyClientAccess, + Optional isAppEntitlementActive, + Optional client, Map additionalProperties) { this.id = id; this.name = name; @@ -49,6 +58,9 @@ private UpdateOrganizationResponseContent( this.branding = branding; this.metadata = metadata; this.tokenQuota = tokenQuota; + this.thirdPartyClientAccess = thirdPartyClientAccess; + this.isAppEntitlementActive = isAppEntitlementActive; + this.client = client; this.additionalProperties = additionalProperties; } @@ -91,6 +103,24 @@ public Optional getTokenQuota() { return tokenQuota; } + @JsonProperty("third_party_client_access") + public Optional getThirdPartyClientAccess() { + return thirdPartyClientAccess; + } + + /** + * @return Whether app entitlement is active for this organization. + */ + @JsonProperty("is_app_entitlement_active") + public Optional getIsAppEntitlementActive() { + return isAppEntitlementActive; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -108,12 +138,24 @@ private boolean equalTo(UpdateOrganizationResponseContent other) { && displayName.equals(other.displayName) && branding.equals(other.branding) && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); + && tokenQuota.equals(other.tokenQuota) + && thirdPartyClientAccess.equals(other.thirdPartyClientAccess) + && isAppEntitlementActive.equals(other.isAppEntitlementActive) + && client.equals(other.client); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); + return Objects.hash( + this.id, + this.name, + this.displayName, + this.branding, + this.metadata, + this.tokenQuota, + this.thirdPartyClientAccess, + this.isAppEntitlementActive, + this.client); } @java.lang.Override @@ -139,6 +181,12 @@ public static final class Builder { private Optional tokenQuota = Optional.empty(); + private Optional thirdPartyClientAccess = Optional.empty(); + + private Optional isAppEntitlementActive = Optional.empty(); + + private Optional client = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -151,6 +199,9 @@ public Builder from(UpdateOrganizationResponseContent other) { branding(other.getBranding()); metadata(other.getMetadata()); tokenQuota(other.getTokenQuota()); + thirdPartyClientAccess(other.getThirdPartyClientAccess()); + isAppEntitlementActive(other.getIsAppEntitlementActive()); + client(other.getClient()); return this; } @@ -229,9 +280,54 @@ public Builder tokenQuota(TokenQuota tokenQuota) { return this; } + @JsonSetter(value = "third_party_client_access", nulls = Nulls.SKIP) + public Builder thirdPartyClientAccess(Optional thirdPartyClientAccess) { + this.thirdPartyClientAccess = thirdPartyClientAccess; + return this; + } + + public Builder thirdPartyClientAccess(OrganizationThirdPartyClientAccessEnum thirdPartyClientAccess) { + this.thirdPartyClientAccess = Optional.ofNullable(thirdPartyClientAccess); + return this; + } + + /** + *

                                                              Whether app entitlement is active for this organization.

                                                              + */ + @JsonSetter(value = "is_app_entitlement_active", nulls = Nulls.SKIP) + public Builder isAppEntitlementActive(Optional isAppEntitlementActive) { + this.isAppEntitlementActive = isAppEntitlementActive; + return this; + } + + public Builder isAppEntitlementActive(Boolean isAppEntitlementActive) { + this.isAppEntitlementActive = Optional.ofNullable(isAppEntitlementActive); + return this; + } + + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public Builder client(Optional client) { + this.client = client; + return this; + } + + public Builder client(OrganizationClientAssociation client) { + this.client = Optional.ofNullable(client); + return this; + } + public UpdateOrganizationResponseContent build() { return new UpdateOrganizationResponseContent( - id, name, displayName, branding, metadata, tokenQuota, additionalProperties); + id, + name, + displayName, + branding, + metadata, + tokenQuota, + thirdPartyClientAccess, + isAppEntitlementActive, + client, + additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java index 314750ed..75cbd4a8 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java @@ -220,7 +220,6 @@ public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { } /** - *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              *

                                                              Whether the template is enabled (false) or disabled (true).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdatePortalRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdatePortalRequestContent.java new file mode 100644 index 00000000..77181c2f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdatePortalRequestContent.java @@ -0,0 +1,321 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.auth0.client.mgmt.types; + +import com.auth0.client.mgmt.core.NullableNonemptyFilter; +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.Nullable; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdatePortalRequestContent.Builder.class) +public final class UpdatePortalRequestContent { + private final Optional slug; + + private final Optional name; + + private final Optional client; + + private final OptionalNullable navigation; + + private final OptionalNullable pages; + + private final OptionalNullable customCode; + + private final Map additionalProperties; + + private UpdatePortalRequestContent( + Optional slug, + Optional name, + Optional client, + OptionalNullable navigation, + OptionalNullable pages, + OptionalNullable customCode, + Map additionalProperties) { + this.slug = slug; + this.name = name; + this.client = client; + this.navigation = navigation; + this.pages = pages; + this.customCode = customCode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("slug") + public Optional getSlug() { + return slug; + } + + @JsonProperty("name") + public Optional getName() { + return name; + } + + @JsonProperty("client") + public Optional getClient() { + return client; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("navigation") + public OptionalNullable getNavigation() { + if (navigation == null) { + return OptionalNullable.absent(); + } + return navigation; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("pages") + public OptionalNullable getPages() { + if (pages == null) { + return OptionalNullable.absent(); + } + return pages; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_code") + public OptionalNullable getCustomCode() { + if (customCode == null) { + return OptionalNullable.absent(); + } + return customCode; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("navigation") + private OptionalNullable _getNavigation() { + return navigation; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("pages") + private OptionalNullable _getPages() { + return pages; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("custom_code") + private OptionalNullable _getCustomCode() { + return customCode; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdatePortalRequestContent && equalTo((UpdatePortalRequestContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdatePortalRequestContent other) { + return slug.equals(other.slug) + && name.equals(other.name) + && client.equals(other.client) + && navigation.equals(other.navigation) + && pages.equals(other.pages) + && customCode.equals(other.customCode); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.slug, this.name, this.client, this.navigation, this.pages, this.customCode); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional slug = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional client = Optional.empty(); + + private OptionalNullable navigation = OptionalNullable.absent(); + + private OptionalNullable pages = OptionalNullable.absent(); + + private OptionalNullable customCode = OptionalNullable.absent(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdatePortalRequestContent other) { + slug(other.getSlug()); + name(other.getName()); + client(other.getClient()); + navigation(other.getNavigation()); + pages(other.getPages()); + customCode(other.getCustomCode()); + return this; + } + + @JsonSetter(value = "slug", nulls = Nulls.SKIP) + public Builder slug(Optional slug) { + this.slug = slug; + return this; + } + + public Builder slug(String slug) { + this.slug = Optional.ofNullable(slug); + return this; + } + + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + @JsonSetter(value = "client", nulls = Nulls.SKIP) + public Builder client(Optional client) { + this.client = client; + return this; + } + + public Builder client(PortalClientSecretPostRequest client) { + this.client = Optional.ofNullable(client); + return this; + } + + @JsonSetter(value = "navigation", nulls = Nulls.SKIP) + public Builder navigation(@Nullable OptionalNullable navigation) { + this.navigation = navigation; + return this; + } + + public Builder navigation(PortalNavigation navigation) { + this.navigation = OptionalNullable.of(navigation); + return this; + } + + public Builder navigation(Optional navigation) { + if (navigation.isPresent()) { + this.navigation = OptionalNullable.of(navigation.get()); + } else { + this.navigation = OptionalNullable.absent(); + } + return this; + } + + public Builder navigation(com.auth0.client.mgmt.core.Nullable navigation) { + if (navigation.isNull()) { + this.navigation = OptionalNullable.ofNull(); + } else if (navigation.isEmpty()) { + this.navigation = OptionalNullable.absent(); + } else { + this.navigation = OptionalNullable.of(navigation.get()); + } + return this; + } + + @JsonSetter(value = "pages", nulls = Nulls.SKIP) + public Builder pages(@Nullable OptionalNullable pages) { + this.pages = pages; + return this; + } + + public Builder pages(PortalPagesByType pages) { + this.pages = OptionalNullable.of(pages); + return this; + } + + public Builder pages(Optional pages) { + if (pages.isPresent()) { + this.pages = OptionalNullable.of(pages.get()); + } else { + this.pages = OptionalNullable.absent(); + } + return this; + } + + public Builder pages(com.auth0.client.mgmt.core.Nullable pages) { + if (pages.isNull()) { + this.pages = OptionalNullable.ofNull(); + } else if (pages.isEmpty()) { + this.pages = OptionalNullable.absent(); + } else { + this.pages = OptionalNullable.of(pages.get()); + } + return this; + } + + @JsonSetter(value = "custom_code", nulls = Nulls.SKIP) + public Builder customCode(@Nullable OptionalNullable customCode) { + this.customCode = customCode; + return this; + } + + public Builder customCode(PortalCustomCode customCode) { + this.customCode = OptionalNullable.of(customCode); + return this; + } + + public Builder customCode(Optional customCode) { + if (customCode.isPresent()) { + this.customCode = OptionalNullable.of(customCode.get()); + } else { + this.customCode = OptionalNullable.absent(); + } + return this; + } + + public Builder customCode(com.auth0.client.mgmt.core.Nullable customCode) { + if (customCode.isNull()) { + this.customCode = OptionalNullable.ofNull(); + } else if (customCode.isEmpty()) { + this.customCode = OptionalNullable.absent(); + } else { + this.customCode = OptionalNullable.of(customCode.get()); + } + return this; + } + + public UpdatePortalRequestContent build() { + return new UpdatePortalRequestContent( + slug, name, client, navigation, pages, customCode, 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/UpdateRateLimitPolicyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRateLimitPolicyResponseContent.java index 3b534755..8dab5664 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRateLimitPolicyResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateRateLimitPolicyResponseContent.java @@ -232,7 +232,6 @@ public Builder from(UpdateRateLimitPolicyResponseContent other) { } /** - *

                                                              Unique identifier for the Rate Limit Policy.

                                                              *

                                                              Unique identifier for the Rate Limit Policy.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -258,7 +257,6 @@ public ConsumerSelectorStage consumer(@NotNull RateLimitPolicyConsumerEnum consu } /** - *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              *

                                                              Identifier or category within the consumer to which the policy applies. Supported values: client_id:<client_id> to target a specific client by ID, client_id:<cimd_uri> to target a CIMD client by URI, cimd_clients to target all CIMD clients, third_party_clients to target all third-party clients, or default to apply the policy to any consumer identifier not otherwise explicitly targeted.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ 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 42b072e6..34c5f9d2 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/UpdateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java index ace05422..29d79b05 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java @@ -42,14 +42,20 @@ public final class UpdateResourceServerRequestContent { private final Optional tokenLifetime; + private final OptionalNullable tokenLifetimeForAnonymousAccessTokens; + private final Optional tokenDialect; private final Optional enforcePolicies; + private final OptionalNullable accessToken; + private final OptionalNullable tokenEncryption; private final OptionalNullable consentPolicy; + private final Optional requireConsentNonRepudiation; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -58,6 +64,10 @@ public final class UpdateResourceServerRequestContent { private final OptionalNullable authorizationPolicy; + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + private final Map additionalProperties; private UpdateResourceServerRequestContent( @@ -70,14 +80,19 @@ private UpdateResourceServerRequestContent( Optional allowOnlineAccess, Optional allowOnlineAccessWithEphemeralSessions, Optional tokenLifetime, + OptionalNullable tokenLifetimeForAnonymousAccessTokens, Optional tokenDialect, Optional enforcePolicies, + OptionalNullable accessToken, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, OptionalNullable authorizationPolicy, + Optional agentSubjectClaims, + OptionalNullable type, Map additionalProperties) { this.name = name; this.scopes = scopes; @@ -88,14 +103,19 @@ private UpdateResourceServerRequestContent( this.allowOnlineAccess = allowOnlineAccess; this.allowOnlineAccessWithEphemeralSessions = allowOnlineAccessWithEphemeralSessions; this.tokenLifetime = tokenLifetime; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; this.tokenDialect = tokenDialect; this.enforcePolicies = enforcePolicies; + this.accessToken = accessToken; this.tokenEncryption = tokenEncryption; this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; this.authorizationPolicy = authorizationPolicy; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; this.additionalProperties = additionalProperties; } @@ -168,6 +188,18 @@ public Optional getTokenLifetime() { return tokenLifetime; } + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public OptionalNullable getTokenLifetimeForAnonymousAccessTokens() { + if (tokenLifetimeForAnonymousAccessTokens == null) { + return OptionalNullable.absent(); + } + return tokenLifetimeForAnonymousAccessTokens; + } + @JsonProperty("token_dialect") public Optional getTokenDialect() { return tokenDialect; @@ -181,6 +213,15 @@ public Optional getEnforcePolicies() { return enforcePolicies; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") public OptionalNullable getTokenEncryption() { @@ -199,6 +240,14 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") public OptionalNullable> getAuthorizationDetails() { @@ -231,6 +280,32 @@ public OptionalNullable getAuthorizationPolic return authorizationPolicy; } + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + private OptionalNullable _getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -261,6 +336,12 @@ private OptionalNullable _getAuthorizationPol return authorizationPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -283,14 +364,19 @@ private boolean equalTo(UpdateResourceServerRequestContent other) { && allowOnlineAccess.equals(other.allowOnlineAccess) && allowOnlineAccessWithEphemeralSessions.equals(other.allowOnlineAccessWithEphemeralSessions) && tokenLifetime.equals(other.tokenLifetime) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) && tokenDialect.equals(other.tokenDialect) && enforcePolicies.equals(other.enforcePolicies) + && accessToken.equals(other.accessToken) && tokenEncryption.equals(other.tokenEncryption) && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) - && authorizationPolicy.equals(other.authorizationPolicy); + && authorizationPolicy.equals(other.authorizationPolicy) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); } @java.lang.Override @@ -305,14 +391,19 @@ public int hashCode() { this.allowOnlineAccess, this.allowOnlineAccessWithEphemeralSessions, this.tokenLifetime, + this.tokenLifetimeForAnonymousAccessTokens, this.tokenDialect, this.enforcePolicies, + this.accessToken, this.tokenEncryption, this.consentPolicy, + this.requireConsentNonRepudiation, this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, - this.authorizationPolicy); + this.authorizationPolicy, + this.agentSubjectClaims, + this.type); } @java.lang.Override @@ -344,14 +435,20 @@ public static final class Builder { private Optional tokenLifetime = Optional.empty(); + private OptionalNullable tokenLifetimeForAnonymousAccessTokens = OptionalNullable.absent(); + private Optional tokenDialect = Optional.empty(); private Optional enforcePolicies = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable tokenEncryption = OptionalNullable.absent(); private OptionalNullable consentPolicy = OptionalNullable.absent(); + private Optional requireConsentNonRepudiation = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -360,6 +457,10 @@ public static final class Builder { private OptionalNullable authorizationPolicy = OptionalNullable.absent(); + private Optional agentSubjectClaims = Optional.empty(); + + private OptionalNullable type = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -375,14 +476,19 @@ public Builder from(UpdateResourceServerRequestContent other) { allowOnlineAccess(other.getAllowOnlineAccess()); allowOnlineAccessWithEphemeralSessions(other.getAllowOnlineAccessWithEphemeralSessions()); tokenLifetime(other.getTokenLifetime()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); tokenDialect(other.getTokenDialect()); enforcePolicies(other.getEnforcePolicies()); + accessToken(other.getAccessToken()); tokenEncryption(other.getTokenEncryption()); consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); authorizationPolicy(other.getAuthorizationPolicy()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); return this; } @@ -512,6 +618,44 @@ public Builder tokenLifetime(Integer tokenLifetime) { return this; } + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_anonymous_access_tokens", nulls = Nulls.SKIP) + public Builder tokenLifetimeForAnonymousAccessTokens( + @Nullable OptionalNullable tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = OptionalNullable.of(tokenLifetimeForAnonymousAccessTokens); + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens) { + if (tokenLifetimeForAnonymousAccessTokens.isPresent()) { + this.tokenLifetimeForAnonymousAccessTokens = + OptionalNullable.of(tokenLifetimeForAnonymousAccessTokens.get()); + } else { + this.tokenLifetimeForAnonymousAccessTokens = OptionalNullable.absent(); + } + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens( + com.auth0.client.mgmt.core.Nullable tokenLifetimeForAnonymousAccessTokens) { + if (tokenLifetimeForAnonymousAccessTokens.isNull()) { + this.tokenLifetimeForAnonymousAccessTokens = OptionalNullable.ofNull(); + } else if (tokenLifetimeForAnonymousAccessTokens.isEmpty()) { + this.tokenLifetimeForAnonymousAccessTokens = OptionalNullable.absent(); + } else { + this.tokenLifetimeForAnonymousAccessTokens = + OptionalNullable.of(tokenLifetimeForAnonymousAccessTokens.get()); + } + return this; + } + @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) public Builder tokenDialect(Optional tokenDialect) { this.tokenDialect = tokenDialect; @@ -537,6 +681,37 @@ public Builder enforcePolicies(Boolean enforcePolicies) { return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) public Builder tokenEncryption(@Nullable OptionalNullable tokenEncryption) { this.tokenEncryption = tokenEncryption; @@ -601,6 +776,20 @@ public Builder consentPolicy( return this; } + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public Builder requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + + public Builder requireConsentNonRepudiation(Boolean requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = Optional.ofNullable(requireConsentNonRepudiation); + return this; + } + @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; @@ -710,6 +899,48 @@ public Builder authorizationPolicy( return this; } + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public Builder agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + + public Builder agentSubjectClaims(ResourceServerAgentSubjectClaimsSchemaEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + public UpdateResourceServerRequestContent build() { return new UpdateResourceServerRequestContent( name, @@ -721,14 +952,19 @@ public UpdateResourceServerRequestContent build() { allowOnlineAccess, allowOnlineAccessWithEphemeralSessions, tokenLifetime, + tokenLifetimeForAnonymousAccessTokens, tokenDialect, enforcePolicies, + accessToken, tokenEncryption, consentPolicy, + requireConsentNonRepudiation, authorizationDetails, proofOfPossession, subjectTypeAuthorization, authorizationPolicy, + agentSubjectClaims, + type, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java index 6d6e75fd..866e32cf 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java @@ -52,12 +52,18 @@ public final class UpdateResourceServerResponseContent { private final Optional enforcePolicies; + private final Optional tokenLifetimeForAnonymousAccessTokens; + private final Optional tokenDialect; + private final OptionalNullable accessToken; + private final OptionalNullable tokenEncryption; private final OptionalNullable consentPolicy; + private final Optional requireConsentNonRepudiation; + private final OptionalNullable> authorizationDetails; private final OptionalNullable proofOfPossession; @@ -68,6 +74,10 @@ public final class UpdateResourceServerResponseContent { private final Optional clientId; + private final Optional agentSubjectClaims; + + private final OptionalNullable type; + private final Map additionalProperties; private UpdateResourceServerResponseContent( @@ -85,14 +95,19 @@ private UpdateResourceServerResponseContent( Optional tokenLifetime, Optional tokenLifetimeForWeb, Optional enforcePolicies, + Optional tokenLifetimeForAnonymousAccessTokens, Optional tokenDialect, + OptionalNullable accessToken, OptionalNullable tokenEncryption, OptionalNullable consentPolicy, + Optional requireConsentNonRepudiation, OptionalNullable> authorizationDetails, OptionalNullable proofOfPossession, Optional subjectTypeAuthorization, OptionalNullable authorizationPolicy, Optional clientId, + Optional agentSubjectClaims, + OptionalNullable type, Map additionalProperties) { this.id = id; this.name = name; @@ -108,14 +123,19 @@ private UpdateResourceServerResponseContent( this.tokenLifetime = tokenLifetime; this.tokenLifetimeForWeb = tokenLifetimeForWeb; this.enforcePolicies = enforcePolicies; + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; this.tokenDialect = tokenDialect; + this.accessToken = accessToken; this.tokenEncryption = tokenEncryption; this.consentPolicy = consentPolicy; + this.requireConsentNonRepudiation = requireConsentNonRepudiation; this.authorizationDetails = authorizationDetails; this.proofOfPossession = proofOfPossession; this.subjectTypeAuthorization = subjectTypeAuthorization; this.authorizationPolicy = authorizationPolicy; this.clientId = clientId; + this.agentSubjectClaims = agentSubjectClaims; + this.type = type; this.additionalProperties = additionalProperties; } @@ -228,11 +248,28 @@ public Optional getEnforcePolicies() { return enforcePolicies; } + /** + * @return Expiration value (in seconds) for anonymous-session access tokens issued for this API. + */ + @JsonProperty("token_lifetime_for_anonymous_access_tokens") + public Optional getTokenLifetimeForAnonymousAccessTokens() { + return tokenLifetimeForAnonymousAccessTokens; + } + @JsonProperty("token_dialect") public Optional getTokenDialect() { return tokenDialect; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") public OptionalNullable getTokenEncryption() { @@ -251,6 +288,14 @@ public OptionalNullable getConsentPolicy() { return consentPolicy; } + /** + * @return When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled. + */ + @JsonProperty("require_consent_non_repudiation") + public Optional getRequireConsentNonRepudiation() { + return requireConsentNonRepudiation; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("authorization_details") public OptionalNullable> getAuthorizationDetails() { @@ -291,6 +336,26 @@ public Optional getClientId() { return clientId; } + @JsonProperty("agent_subject_claims") + public Optional getAgentSubjectClaims() { + return agentSubjectClaims; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + public OptionalNullable getType() { + if (type == null) { + return OptionalNullable.absent(); + } + return type; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("token_encryption") private OptionalNullable _getTokenEncryption() { @@ -321,6 +386,12 @@ private OptionalNullable _getAuthorizationPol return authorizationPolicy; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("type") + private OptionalNullable _getType() { + return type; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -348,14 +419,19 @@ private boolean equalTo(UpdateResourceServerResponseContent other) { && tokenLifetime.equals(other.tokenLifetime) && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) && enforcePolicies.equals(other.enforcePolicies) + && tokenLifetimeForAnonymousAccessTokens.equals(other.tokenLifetimeForAnonymousAccessTokens) && tokenDialect.equals(other.tokenDialect) + && accessToken.equals(other.accessToken) && tokenEncryption.equals(other.tokenEncryption) && consentPolicy.equals(other.consentPolicy) + && requireConsentNonRepudiation.equals(other.requireConsentNonRepudiation) && authorizationDetails.equals(other.authorizationDetails) && proofOfPossession.equals(other.proofOfPossession) && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) && authorizationPolicy.equals(other.authorizationPolicy) - && clientId.equals(other.clientId); + && clientId.equals(other.clientId) + && agentSubjectClaims.equals(other.agentSubjectClaims) + && type.equals(other.type); } @java.lang.Override @@ -375,14 +451,19 @@ public int hashCode() { this.tokenLifetime, this.tokenLifetimeForWeb, this.enforcePolicies, + this.tokenLifetimeForAnonymousAccessTokens, this.tokenDialect, + this.accessToken, this.tokenEncryption, this.consentPolicy, + this.requireConsentNonRepudiation, this.authorizationDetails, this.proofOfPossession, this.subjectTypeAuthorization, this.authorizationPolicy, - this.clientId); + this.clientId, + this.agentSubjectClaims, + this.type); } @java.lang.Override @@ -424,12 +505,18 @@ public static final class Builder { private Optional enforcePolicies = Optional.empty(); + private Optional tokenLifetimeForAnonymousAccessTokens = Optional.empty(); + private Optional tokenDialect = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable tokenEncryption = OptionalNullable.absent(); private OptionalNullable consentPolicy = OptionalNullable.absent(); + private Optional requireConsentNonRepudiation = Optional.empty(); + private OptionalNullable> authorizationDetails = OptionalNullable.absent(); private OptionalNullable proofOfPossession = OptionalNullable.absent(); @@ -440,6 +527,10 @@ public static final class Builder { private Optional clientId = Optional.empty(); + private Optional agentSubjectClaims = Optional.empty(); + + private OptionalNullable type = OptionalNullable.absent(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -460,14 +551,19 @@ public Builder from(UpdateResourceServerResponseContent other) { tokenLifetime(other.getTokenLifetime()); tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); enforcePolicies(other.getEnforcePolicies()); + tokenLifetimeForAnonymousAccessTokens(other.getTokenLifetimeForAnonymousAccessTokens()); tokenDialect(other.getTokenDialect()); + accessToken(other.getAccessToken()); tokenEncryption(other.getTokenEncryption()); consentPolicy(other.getConsentPolicy()); + requireConsentNonRepudiation(other.getRequireConsentNonRepudiation()); authorizationDetails(other.getAuthorizationDetails()); proofOfPossession(other.getProofOfPossession()); subjectTypeAuthorization(other.getSubjectTypeAuthorization()); authorizationPolicy(other.getAuthorizationPolicy()); clientId(other.getClientId()); + agentSubjectClaims(other.getAgentSubjectClaims()); + type(other.getType()); return this; } @@ -667,6 +763,20 @@ public Builder enforcePolicies(Boolean enforcePolicies) { return this; } + /** + *

                                                              Expiration value (in seconds) for anonymous-session access tokens issued for this API.

                                                              + */ + @JsonSetter(value = "token_lifetime_for_anonymous_access_tokens", nulls = Nulls.SKIP) + public Builder tokenLifetimeForAnonymousAccessTokens(Optional tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = tokenLifetimeForAnonymousAccessTokens; + return this; + } + + public Builder tokenLifetimeForAnonymousAccessTokens(Integer tokenLifetimeForAnonymousAccessTokens) { + this.tokenLifetimeForAnonymousAccessTokens = Optional.ofNullable(tokenLifetimeForAnonymousAccessTokens); + return this; + } + @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) public Builder tokenDialect(Optional tokenDialect) { this.tokenDialect = tokenDialect; @@ -678,6 +788,37 @@ public Builder tokenDialect(ResourceServerTokenDialectResponseEnum tokenDialect) return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) public Builder tokenEncryption(@Nullable OptionalNullable tokenEncryption) { this.tokenEncryption = tokenEncryption; @@ -742,6 +883,20 @@ public Builder consentPolicy( return this; } + /** + *

                                                              When true, the resource server requires every consent approval to be digitally signed, so the approver cannot later deny a consent they granted. When false, consent decisions do not need a signature. Defaults to false. A configured value is still returned even after the related entitlement is disabled.

                                                              + */ + @JsonSetter(value = "require_consent_non_repudiation", nulls = Nulls.SKIP) + public Builder requireConsentNonRepudiation(Optional requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = requireConsentNonRepudiation; + return this; + } + + public Builder requireConsentNonRepudiation(Boolean requireConsentNonRepudiation) { + this.requireConsentNonRepudiation = Optional.ofNullable(requireConsentNonRepudiation); + return this; + } + @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) public Builder authorizationDetails(@Nullable OptionalNullable> authorizationDetails) { this.authorizationDetails = authorizationDetails; @@ -865,6 +1020,48 @@ public Builder clientId(String clientId) { return this; } + @JsonSetter(value = "agent_subject_claims", nulls = Nulls.SKIP) + public Builder agentSubjectClaims(Optional agentSubjectClaims) { + this.agentSubjectClaims = agentSubjectClaims; + return this; + } + + public Builder agentSubjectClaims(ResourceServerAgentSubjectClaimsResponseEnum agentSubjectClaims) { + this.agentSubjectClaims = Optional.ofNullable(agentSubjectClaims); + return this; + } + + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(@Nullable OptionalNullable type) { + this.type = type; + return this; + } + + public Builder type(ResourceServerTypeEnum type) { + this.type = OptionalNullable.of(type); + return this; + } + + public Builder type(Optional type) { + if (type.isPresent()) { + this.type = OptionalNullable.of(type.get()); + } else { + this.type = OptionalNullable.absent(); + } + return this; + } + + public Builder type(com.auth0.client.mgmt.core.Nullable type) { + if (type.isNull()) { + this.type = OptionalNullable.ofNull(); + } else if (type.isEmpty()) { + this.type = OptionalNullable.absent(); + } else { + this.type = OptionalNullable.of(type.get()); + } + return this; + } + public UpdateResourceServerResponseContent build() { return new UpdateResourceServerResponseContent( id, @@ -881,14 +1078,19 @@ public UpdateResourceServerResponseContent build() { tokenLifetime, tokenLifetimeForWeb, enforcePolicies, + tokenLifetimeForAnonymousAccessTokens, tokenDialect, + accessToken, tokenEncryption, consentPolicy, + requireConsentNonRepudiation, authorizationDetails, proofOfPossession, subjectTypeAuthorization, authorizationPolicy, clientId, + agentSubjectClaims, + type, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.java index 475b3669..8f0704d1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.java @@ -99,7 +99,6 @@ public Builder from(UpdateRiskAssessmentsSettingsNewDeviceResponseContent other) } /** - *

                                                              Length of time to remember devices for, in days.

                                                              *

                                                              Length of time to remember devices for, in days.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java index 1f20b862..281f86da 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java @@ -98,7 +98,6 @@ public Builder from(UpdateRiskAssessmentsSettingsResponseContent other) { } /** - *

                                                              Whether or not risk assessment is enabled.

                                                              *

                                                              Whether or not risk assessment is enabled.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java index e2588ade..7b4d5d91 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java @@ -26,16 +26,24 @@ public final class UpdateRoleResponseContent { private final Optional description; + private final Optional type; + + private final Optional ownerId; + private final Map additionalProperties; private UpdateRoleResponseContent( Optional id, Optional name, Optional description, + Optional type, + Optional ownerId, Map additionalProperties) { this.id = id; this.name = name; this.description = description; + this.type = type; + this.ownerId = ownerId; this.additionalProperties = additionalProperties; } @@ -63,6 +71,16 @@ public Optional getDescription() { return description; } + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("owner_id") + public Optional getOwnerId() { + return ownerId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -75,12 +93,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(UpdateRoleResponseContent other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && ownerId.equals(other.ownerId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.description); + return Objects.hash(this.id, this.name, this.description, this.type, this.ownerId); } @java.lang.Override @@ -100,6 +122,10 @@ public static final class Builder { private Optional description = Optional.empty(); + private Optional type = Optional.empty(); + + private Optional ownerId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -109,6 +135,8 @@ public Builder from(UpdateRoleResponseContent other) { id(other.getId()); name(other.getName()); description(other.getDescription()); + type(other.getType()); + ownerId(other.getOwnerId()); return this; } @@ -154,8 +182,30 @@ public Builder description(String description) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(RoleTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) + public Builder ownerId(Optional ownerId) { + this.ownerId = ownerId; + return this; + } + + public Builder ownerId(String ownerId) { + this.ownerId = Optional.ofNullable(ownerId); + return this; + } + public UpdateRoleResponseContent build() { - return new UpdateRoleResponseContent(id, name, description, additionalProperties); + return new UpdateRoleResponseContent(id, name, description, type, ownerId, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java index 7852ae67..8e765d5a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java @@ -284,7 +284,6 @@ public Builder from(UpdateScimConfigurationResponseContent other) { } /** - *

                                                              The connection's identifier

                                                              *

                                                              The connection's identifier

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -296,7 +295,6 @@ public ConnectionNameStage connectionId(@NotNull String connectionId) { } /** - *

                                                              The connection's name

                                                              *

                                                              The connection's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -308,7 +306,6 @@ public StrategyStage connectionName(@NotNull String connectionName) { } /** - *

                                                              The connection's strategy

                                                              *

                                                              The connection's strategy

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -320,7 +317,6 @@ public TenantNameStage strategy(@NotNull String strategy) { } /** - *

                                                              The tenant's name

                                                              *

                                                              The tenant's name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -332,7 +328,6 @@ public UserIdAttributeStage tenantName(@NotNull String tenantName) { } /** - *

                                                              User ID attribute for generating unique user ids

                                                              *

                                                              User ID attribute for generating unique user ids

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -344,7 +339,6 @@ public CreatedAtStage userIdAttribute(@NotNull String userIdAttribute) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was created at

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -356,7 +350,6 @@ public UpdatedOnStage createdAt(@NotNull OffsetDateTime createdAt) { } /** - *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              *

                                                              The ISO 8601 date and time the SCIM configuration was last updated on

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSegmentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSegmentResponseContent.java new file mode 100644 index 00000000..a495541e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateSegmentResponseContent.java @@ -0,0 +1,328 @@ +/** + * 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.time.OffsetDateTime; +import java.util.ArrayList; +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 = UpdateSegmentResponseContent.Builder.class) +public final class UpdateSegmentResponseContent { + private final String id; + + private final String name; + + private final Optional description; + + private final SegmentTypeEnum type; + + private final SegmentStatusEnum status; + + private final List rules; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private UpdateSegmentResponseContent( + String id, + String name, + Optional description, + SegmentTypeEnum type, + SegmentStatusEnum status, + List rules, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.status = status; + this.rules = rules; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("type") + public SegmentTypeEnum getType() { + return type; + } + + @JsonProperty("status") + public SegmentStatusEnum getStatus() { + return status; + } + + @JsonProperty("rules") + public List getRules() { + return rules; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateSegmentResponseContent && equalTo((UpdateSegmentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateSegmentResponseContent other) { + return id.equals(other.id) + && name.equals(other.name) + && description.equals(other.description) + && type.equals(other.type) + && status.equals(other.status) + && rules.equals(other.rules) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.name, + this.description, + this.type, + this.status, + this.rules, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + NameStage id(@NotNull String id); + + Builder from(UpdateSegmentResponseContent other); + } + + public interface NameStage { + TypeStage name(@NotNull String name); + } + + public interface TypeStage { + StatusStage type(@NotNull SegmentTypeEnum type); + } + + public interface StatusStage { + CreatedAtStage status(@NotNull SegmentStatusEnum status); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + UpdateSegmentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage rules(List rules); + + _FinalStage addRules(SegmentRule rules); + + _FinalStage addAllRules(List rules); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, NameStage, TypeStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String name; + + private SegmentTypeEnum type; + + private SegmentStatusEnum status; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private List rules = new ArrayList<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateSegmentResponseContent other) { + id(other.getId()); + name(other.getName()); + description(other.getDescription()); + type(other.getType()); + status(other.getStatus()); + rules(other.getRules()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public NameStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public TypeStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("type") + public StatusStage type(@NotNull SegmentTypeEnum type) { + this.type = Objects.requireNonNull(type, "type must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("status") + public CreatedAtStage status(@NotNull SegmentStatusEnum status) { + this.status = Objects.requireNonNull(status, "status must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage addAllRules(List rules) { + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage addRules(SegmentRule rules) { + this.rules.add(rules); + return this; + } + + @java.lang.Override + @JsonSetter(value = "rules", nulls = Nulls.SKIP) + public _FinalStage rules(List rules) { + this.rules.clear(); + if (rules != null) { + this.rules.addAll(rules); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public UpdateSegmentResponseContent build() { + return new UpdateSegmentResponseContent( + id, name, description, type, status, rules, 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/UpdateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java index 9bc5f1e3..a6b7b9b5 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 2ac2fa6d..266f7b2a 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; @@ -50,22 +50,25 @@ public final class UpdateSessionResponseContent { private final OptionalNullable> sessionMetadata; + private final Optional actor; + private final Map additionalProperties; 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, Optional cookie, OptionalNullable> sessionMetadata, + Optional actor, Map additionalProperties) { this.id = id; this.userId = userId; @@ -80,6 +83,7 @@ private UpdateSessionResponseContent( this.authentication = authentication; this.cookie = cookie; this.sessionMetadata = sessionMetadata; + this.actor = actor; this.additionalProperties = additionalProperties; } @@ -99,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; } @@ -161,6 +189,47 @@ public OptionalNullable> getSessionMetadata() { return sessionMetadata; } + @JsonProperty("actor") + 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() { @@ -191,7 +260,8 @@ private boolean equalTo(UpdateSessionResponseContent other) { && clients.equals(other.clients) && authentication.equals(other.authentication) && cookie.equals(other.cookie) - && sessionMetadata.equals(other.sessionMetadata); + && sessionMetadata.equals(other.sessionMetadata) + && actor.equals(other.actor); } @java.lang.Override @@ -209,7 +279,8 @@ public int hashCode() { this.clients, this.authentication, this.cookie, - this.sessionMetadata); + this.sessionMetadata, + this.actor); } @java.lang.Override @@ -227,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(); @@ -249,6 +320,8 @@ public static final class Builder { private OptionalNullable> sessionMetadata = OptionalNullable.absent(); + private Optional actor = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -268,6 +341,7 @@ public Builder from(UpdateSessionResponseContent other) { authentication(other.getAuthentication()); cookie(other.getCookie()); sessionMetadata(other.getSessionMetadata()); + actor(other.getActor()); return this; } @@ -300,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; } @@ -443,6 +637,17 @@ public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable actor) { + this.actor = actor; + return this; + } + + public Builder actor(SessionActorMetadata actor) { + this.actor = Optional.ofNullable(actor); + return this; + } + public UpdateSessionResponseContent build() { return new UpdateSessionResponseContent( id, @@ -458,6 +663,7 @@ public UpdateSessionResponseContent build() { authentication, cookie, sessionMetadata, + actor, additionalProperties); } diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSupplementalSignalsRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSupplementalSignalsRequestContent.java index ec7bff38..4750b240 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSupplementalSignalsRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateSupplementalSignalsRequestContent.java @@ -98,7 +98,6 @@ public Builder from(UpdateSupplementalSignalsRequestContent other) { } /** - *

                                                              Indicates if incoming Akamai Headers should be processed

                                                              *

                                                              Indicates if incoming Akamai Headers should be processed

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java index 11f51eca..74e2c2ce 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java @@ -68,6 +68,8 @@ public final class UpdateTenantSettingsResponseContent { private final Optional> enabledLocales; + private final OptionalNullable accessToken; + private final OptionalNullable securityHeaders; private final OptionalNullable sessionCookie; @@ -88,12 +90,16 @@ public final class UpdateTenantSettingsResponseContent { private final OptionalNullable authorizationResponseIssParameterSupported; + private final OptionalNullable dpopStrictRefreshTokenBinding; + private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; private final Optional resourceParameterProfile; private final Optional clientIdMetadataDocumentSupported; + private final Optional clientIdMetadataDocumentDynamicRegistrationSupported; + private final Optional phoneConsolidatedExperience; private final Optional enableAiGuide; @@ -129,6 +135,7 @@ private UpdateTenantSettingsResponseContent( Optional> sandboxVersionsAvailable, Optional defaultRedirectionUri, Optional> enabledLocales, + OptionalNullable accessToken, OptionalNullable securityHeaders, OptionalNullable sessionCookie, OptionalNullable sessions, @@ -139,9 +146,11 @@ private UpdateTenantSettingsResponseContent( OptionalNullable mtls, Optional pushedAuthorizationRequestsSupported, OptionalNullable authorizationResponseIssParameterSupported, + OptionalNullable dpopStrictRefreshTokenBinding, OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, Optional resourceParameterProfile, Optional clientIdMetadataDocumentSupported, + Optional clientIdMetadataDocumentDynamicRegistrationSupported, Optional phoneConsolidatedExperience, Optional enableAiGuide, Optional includeSessionMetadataInTenantLogs, @@ -170,6 +179,7 @@ private UpdateTenantSettingsResponseContent( this.sandboxVersionsAvailable = sandboxVersionsAvailable; this.defaultRedirectionUri = defaultRedirectionUri; this.enabledLocales = enabledLocales; + this.accessToken = accessToken; this.securityHeaders = securityHeaders; this.sessionCookie = sessionCookie; this.sessions = sessions; @@ -180,9 +190,12 @@ private UpdateTenantSettingsResponseContent( this.mtls = mtls; this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; + this.dpopStrictRefreshTokenBinding = dpopStrictRefreshTokenBinding; this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; this.resourceParameterProfile = resourceParameterProfile; this.clientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; + this.clientIdMetadataDocumentDynamicRegistrationSupported = + clientIdMetadataDocumentDynamicRegistrationSupported; this.phoneConsolidatedExperience = phoneConsolidatedExperience; this.enableAiGuide = enableAiGuide; this.includeSessionMetadataInTenantLogs = includeSessionMetadataInTenantLogs; @@ -369,6 +382,15 @@ public Optional> getEnabledLocales() { return enabledLocales; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + public OptionalNullable getAccessToken() { + if (accessToken == null) { + return OptionalNullable.absent(); + } + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("security_headers") public OptionalNullable getSecurityHeaders() { @@ -458,6 +480,18 @@ public OptionalNullable getAuthorizationResponseIssParameterSupported() return authorizationResponseIssParameterSupported; } + /** + * @return Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("dpop_strict_refresh_token_binding") + public OptionalNullable getDpopStrictRefreshTokenBinding() { + if (dpopStrictRefreshTokenBinding == null) { + return OptionalNullable.absent(); + } + return dpopStrictRefreshTokenBinding; + } + /** * @return Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. @@ -485,6 +519,14 @@ public Optional getClientIdMetadataDocumentSupported() { return clientIdMetadataDocumentSupported; } + /** + * @return Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled. + */ + @JsonProperty("client_id_metadata_document_dynamic_registration_supported") + public Optional getClientIdMetadataDocumentDynamicRegistrationSupported() { + return clientIdMetadataDocumentDynamicRegistrationSupported; + } + /** * @return Whether Phone Consolidated Experience is enabled for this tenant. */ @@ -549,6 +591,12 @@ private OptionalNullable _getDefaultTokenQuota() { return defaultTokenQuota; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("access_token") + private OptionalNullable _getAccessToken() { + return accessToken; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("security_headers") private OptionalNullable _getSecurityHeaders() { @@ -585,6 +633,12 @@ private OptionalNullable _getAuthorizationResponseIssParameterSupported return authorizationResponseIssParameterSupported; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("dpop_strict_refresh_token_binding") + private OptionalNullable _getDpopStrictRefreshTokenBinding() { + return dpopStrictRefreshTokenBinding; + } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { @@ -626,6 +680,7 @@ private boolean equalTo(UpdateTenantSettingsResponseContent other) { && sandboxVersionsAvailable.equals(other.sandboxVersionsAvailable) && defaultRedirectionUri.equals(other.defaultRedirectionUri) && enabledLocales.equals(other.enabledLocales) + && accessToken.equals(other.accessToken) && securityHeaders.equals(other.securityHeaders) && sessionCookie.equals(other.sessionCookie) && sessions.equals(other.sessions) @@ -636,10 +691,13 @@ private boolean equalTo(UpdateTenantSettingsResponseContent other) { && mtls.equals(other.mtls) && pushedAuthorizationRequestsSupported.equals(other.pushedAuthorizationRequestsSupported) && authorizationResponseIssParameterSupported.equals(other.authorizationResponseIssParameterSupported) + && dpopStrictRefreshTokenBinding.equals(other.dpopStrictRefreshTokenBinding) && skipNonVerifiableCallbackUriConfirmationPrompt.equals( other.skipNonVerifiableCallbackUriConfirmationPrompt) && resourceParameterProfile.equals(other.resourceParameterProfile) && clientIdMetadataDocumentSupported.equals(other.clientIdMetadataDocumentSupported) + && clientIdMetadataDocumentDynamicRegistrationSupported.equals( + other.clientIdMetadataDocumentDynamicRegistrationSupported) && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) && enableAiGuide.equals(other.enableAiGuide) && includeSessionMetadataInTenantLogs.equals(other.includeSessionMetadataInTenantLogs) @@ -672,6 +730,7 @@ public int hashCode() { this.sandboxVersionsAvailable, this.defaultRedirectionUri, this.enabledLocales, + this.accessToken, this.securityHeaders, this.sessionCookie, this.sessions, @@ -682,9 +741,11 @@ public int hashCode() { this.mtls, this.pushedAuthorizationRequestsSupported, this.authorizationResponseIssParameterSupported, + this.dpopStrictRefreshTokenBinding, this.skipNonVerifiableCallbackUriConfirmationPrompt, this.resourceParameterProfile, this.clientIdMetadataDocumentSupported, + this.clientIdMetadataDocumentDynamicRegistrationSupported, this.phoneConsolidatedExperience, this.enableAiGuide, this.includeSessionMetadataInTenantLogs, @@ -747,6 +808,8 @@ public static final class Builder { private Optional> enabledLocales = Optional.empty(); + private OptionalNullable accessToken = OptionalNullable.absent(); + private OptionalNullable securityHeaders = OptionalNullable.absent(); private OptionalNullable sessionCookie = OptionalNullable.absent(); @@ -767,12 +830,16 @@ public static final class Builder { private OptionalNullable authorizationResponseIssParameterSupported = OptionalNullable.absent(); + private OptionalNullable dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); private Optional resourceParameterProfile = Optional.empty(); private Optional clientIdMetadataDocumentSupported = Optional.empty(); + private Optional clientIdMetadataDocumentDynamicRegistrationSupported = Optional.empty(); + private Optional phoneConsolidatedExperience = Optional.empty(); private Optional enableAiGuide = Optional.empty(); @@ -812,6 +879,7 @@ public Builder from(UpdateTenantSettingsResponseContent other) { sandboxVersionsAvailable(other.getSandboxVersionsAvailable()); defaultRedirectionUri(other.getDefaultRedirectionUri()); enabledLocales(other.getEnabledLocales()); + accessToken(other.getAccessToken()); securityHeaders(other.getSecurityHeaders()); sessionCookie(other.getSessionCookie()); sessions(other.getSessions()); @@ -822,9 +890,12 @@ public Builder from(UpdateTenantSettingsResponseContent other) { mtls(other.getMtls()); pushedAuthorizationRequestsSupported(other.getPushedAuthorizationRequestsSupported()); authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); + dpopStrictRefreshTokenBinding(other.getDpopStrictRefreshTokenBinding()); skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); resourceParameterProfile(other.getResourceParameterProfile()); clientIdMetadataDocumentSupported(other.getClientIdMetadataDocumentSupported()); + clientIdMetadataDocumentDynamicRegistrationSupported( + other.getClientIdMetadataDocumentDynamicRegistrationSupported()); phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); enableAiGuide(other.getEnableAiGuide()); includeSessionMetadataInTenantLogs(other.getIncludeSessionMetadataInTenantLogs()); @@ -1224,6 +1295,37 @@ public Builder enabledLocales(List enabledLocales) { return this; } + @JsonSetter(value = "access_token", nulls = Nulls.SKIP) + public Builder accessToken(@Nullable OptionalNullable accessToken) { + this.accessToken = accessToken; + return this; + } + + public Builder accessToken(ResourceServerAccessToken accessToken) { + this.accessToken = OptionalNullable.of(accessToken); + return this; + } + + public Builder accessToken(Optional accessToken) { + if (accessToken.isPresent()) { + this.accessToken = OptionalNullable.of(accessToken.get()); + } else { + this.accessToken = OptionalNullable.absent(); + } + return this; + } + + public Builder accessToken(com.auth0.client.mgmt.core.Nullable accessToken) { + if (accessToken.isNull()) { + this.accessToken = OptionalNullable.ofNull(); + } else if (accessToken.isEmpty()) { + this.accessToken = OptionalNullable.absent(); + } else { + this.accessToken = OptionalNullable.of(accessToken.get()); + } + return this; + } + @JsonSetter(value = "security_headers", nulls = Nulls.SKIP) public Builder securityHeaders( @Nullable OptionalNullable securityHeaders) { @@ -1479,6 +1581,42 @@ public Builder authorizationResponseIssParameterSupported( return this; } + /** + *

                                                              Enables strict DPoP refresh token binding per RFC 9449: all refresh tokens issued to public clients that present a DPoP proof are bound to the sender's key, and the binding is validated on every subsequent exchange. When disabled, DPoP refresh token binding may still apply for specific audiences for backwards compatibility.

                                                              + */ + @JsonSetter(value = "dpop_strict_refresh_token_binding", nulls = Nulls.SKIP) + public Builder dpopStrictRefreshTokenBinding( + @Nullable OptionalNullable dpopStrictRefreshTokenBinding) { + this.dpopStrictRefreshTokenBinding = dpopStrictRefreshTokenBinding; + return this; + } + + public Builder dpopStrictRefreshTokenBinding(Boolean dpopStrictRefreshTokenBinding) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.of(dpopStrictRefreshTokenBinding); + return this; + } + + public Builder dpopStrictRefreshTokenBinding(Optional dpopStrictRefreshTokenBinding) { + if (dpopStrictRefreshTokenBinding.isPresent()) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.of(dpopStrictRefreshTokenBinding.get()); + } else { + this.dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + } + return this; + } + + public Builder dpopStrictRefreshTokenBinding( + com.auth0.client.mgmt.core.Nullable dpopStrictRefreshTokenBinding) { + if (dpopStrictRefreshTokenBinding.isNull()) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.ofNull(); + } else if (dpopStrictRefreshTokenBinding.isEmpty()) { + this.dpopStrictRefreshTokenBinding = OptionalNullable.absent(); + } else { + this.dpopStrictRefreshTokenBinding = OptionalNullable.of(dpopStrictRefreshTokenBinding.get()); + } + return this; + } + /** *

                                                              Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as myapp://, or localhost). * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. @@ -1548,6 +1686,24 @@ public Builder clientIdMetadataDocumentSupported(Boolean clientIdMetadataDocumen return this; } + /** + *

                                                              Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled.

                                                              + */ + @JsonSetter(value = "client_id_metadata_document_dynamic_registration_supported", nulls = Nulls.SKIP) + public Builder clientIdMetadataDocumentDynamicRegistrationSupported( + Optional clientIdMetadataDocumentDynamicRegistrationSupported) { + this.clientIdMetadataDocumentDynamicRegistrationSupported = + clientIdMetadataDocumentDynamicRegistrationSupported; + return this; + } + + public Builder clientIdMetadataDocumentDynamicRegistrationSupported( + Boolean clientIdMetadataDocumentDynamicRegistrationSupported) { + this.clientIdMetadataDocumentDynamicRegistrationSupported = + Optional.ofNullable(clientIdMetadataDocumentDynamicRegistrationSupported); + return this; + } + /** *

                                                              Whether Phone Consolidated Experience is enabled for this tenant.

                                                              */ @@ -1638,6 +1794,7 @@ public UpdateTenantSettingsResponseContent build() { sandboxVersionsAvailable, defaultRedirectionUri, enabledLocales, + accessToken, securityHeaders, sessionCookie, sessions, @@ -1648,9 +1805,11 @@ public UpdateTenantSettingsResponseContent build() { mtls, pushedAuthorizationRequestsSupported, authorizationResponseIssParameterSupported, + dpopStrictRefreshTokenBinding, skipNonVerifiableCallbackUriConfirmationPrompt, resourceParameterProfile, clientIdMetadataDocumentSupported, + clientIdMetadataDocumentDynamicRegistrationSupported, phoneConsolidatedExperience, enableAiGuide, includeSessionMetadataInTenantLogs, diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java index f795f0cc..ea3fa958 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java @@ -85,10 +85,6 @@ static final class Deserializer extends StdDeserializer && ((Map) value).containsKey("template")) { try { return of(ObjectMappers.JSON_MAPPER.convertValue( @@ -96,6 +92,10 @@ public UpdateUniversalLoginTemplateRequestContent deserialize(JsonParser p, Dese } catch (RuntimeException e) { } } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } 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 c25a75ce..0b97a44f 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/main/java/com/auth0/client/mgmt/types/UpdateVariationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateVariationResponseContent.java new file mode 100644 index 00000000..a01bdc27 --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/UpdateVariationResponseContent.java @@ -0,0 +1,302 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateVariationResponseContent.Builder.class) +public final class UpdateVariationResponseContent { + private final String id; + + private final String featureFlagId; + + private final String name; + + private final Optional description; + + private final Map overrides; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private UpdateVariationResponseContent( + String id, + String featureFlagId, + String name, + Optional description, + Map overrides, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.featureFlagId = featureFlagId; + this.name = name; + this.description = description; + this.overrides = overrides; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("overrides") + public Map getOverrides() { + return overrides; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateVariationResponseContent && equalTo((UpdateVariationResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateVariationResponseContent other) { + return id.equals(other.id) + && featureFlagId.equals(other.featureFlagId) + && name.equals(other.name) + && description.equals(other.description) + && overrides.equals(other.overrides) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.featureFlagId, + this.name, + this.description, + this.overrides, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + FeatureFlagIdStage id(@NotNull String id); + + Builder from(UpdateVariationResponseContent other); + } + + public interface FeatureFlagIdStage { + NameStage featureFlagId(@NotNull String featureFlagId); + } + + public interface NameStage { + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + UpdateVariationResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage overrides(Map overrides); + + _FinalStage putAllOverrides(Map overrides); + + _FinalStage overrides(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, FeatureFlagIdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String featureFlagId; + + private String name; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Map overrides = new LinkedHashMap<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateVariationResponseContent other) { + id(other.getId()); + featureFlagId(other.getFeatureFlagId()); + name(other.getName()); + description(other.getDescription()); + overrides(other.getOverrides()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public FeatureFlagIdStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public NameStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage overrides(String key, Object value) { + this.overrides.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllOverrides(Map overrides) { + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "overrides", nulls = Nulls.SKIP) + public _FinalStage overrides(Map overrides) { + this.overrides.clear(); + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public UpdateVariationResponseContent build() { + return new UpdateVariationResponseContent( + id, featureFlagId, name, description, overrides, 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/UserAttributeProfileOidcMapping.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileOidcMapping.java index 27aae165..bd29db92 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileOidcMapping.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileOidcMapping.java @@ -122,7 +122,6 @@ public Builder from(UserAttributeProfileOidcMapping other) { } /** - *

                                                              OIDC mapping field

                                                              *

                                                              OIDC mapping field

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java index 37fb0d77..d7acd394 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java @@ -262,7 +262,6 @@ public Builder from(UserAttributeProfileUserAttributeAdditionalProperties other) } /** - *

                                                              Description of this attribute

                                                              *

                                                              Description of this attribute

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -274,7 +273,6 @@ public LabelStage description(@NotNull String description) { } /** - *

                                                              Display label for this attribute

                                                              *

                                                              Display label for this attribute

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -286,7 +284,6 @@ public ProfileRequiredStage label(@NotNull String label) { } /** - *

                                                              Whether this attribute is required in the profile

                                                              *

                                                              Whether this attribute is required in the profile

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -298,7 +295,6 @@ public Auth0MappingStage profileRequired(boolean profileRequired) { } /** - *

                                                              Auth0 mapping for this attribute

                                                              *

                                                              Auth0 mapping for this attribute

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java index 9b55fe4e..863e0571 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java @@ -592,7 +592,6 @@ public Builder from(UserAuthenticationMethod other) { } /** - *

                                                              The ID of the authentication method (auto generated)

                                                              *

                                                              The ID of the authentication method (auto generated)

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -611,7 +610,6 @@ public CreatedAtStage type(@NotNull AuthenticationMethodTypeEnum type) { } /** - *

                                                              Authenticator creation date

                                                              *

                                                              Authenticator creation date

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UserEffectivePermissionRoleSourceResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UserEffectivePermissionRoleSourceResponseContent.java index fd864d4d..0511b8f6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserEffectivePermissionRoleSourceResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserEffectivePermissionRoleSourceResponseContent.java @@ -27,6 +27,10 @@ public final class UserEffectivePermissionRoleSourceResponseContent { private final Optional description; + private final Optional type; + + private final Optional ownerId; + private final Optional> sources; private final Map additionalProperties; @@ -35,11 +39,15 @@ private UserEffectivePermissionRoleSourceResponseContent( Optional id, Optional name, Optional description, + Optional type, + Optional ownerId, Optional> sources, Map additionalProperties) { this.id = id; this.name = name; this.description = description; + this.type = type; + this.ownerId = ownerId; this.sources = sources; this.additionalProperties = additionalProperties; } @@ -68,6 +76,16 @@ public Optional getDescription() { return description; } + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("owner_id") + public Optional getOwnerId() { + return ownerId; + } + /** * @return List of sources where this role is coming from. */ @@ -92,12 +110,14 @@ private boolean equalTo(UserEffectivePermissionRoleSourceResponseContent other) return id.equals(other.id) && name.equals(other.name) && description.equals(other.description) + && type.equals(other.type) + && ownerId.equals(other.ownerId) && sources.equals(other.sources); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.description, this.sources); + return Objects.hash(this.id, this.name, this.description, this.type, this.ownerId, this.sources); } @java.lang.Override @@ -117,6 +137,10 @@ public static final class Builder { private Optional description = Optional.empty(); + private Optional type = Optional.empty(); + + private Optional ownerId = Optional.empty(); + private Optional> sources = Optional.empty(); @JsonAnySetter @@ -128,6 +152,8 @@ public Builder from(UserEffectivePermissionRoleSourceResponseContent other) { id(other.getId()); name(other.getName()); description(other.getDescription()); + type(other.getType()); + ownerId(other.getOwnerId()); sources(other.getSources()); return this; } @@ -174,6 +200,28 @@ public Builder description(String description) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(RoleTypeEnum type) { + this.type = Optional.ofNullable(type); + return this; + } + + @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) + public Builder ownerId(Optional ownerId) { + this.ownerId = ownerId; + return this; + } + + public Builder ownerId(String ownerId) { + this.ownerId = Optional.ofNullable(ownerId); + return this; + } + /** *

                                                              List of sources where this role is coming from.

                                                              */ @@ -190,7 +238,7 @@ public Builder sources(List sources) { public UserEffectivePermissionRoleSourceResponseContent build() { return new UserEffectivePermissionRoleSourceResponseContent( - id, name, description, sources, additionalProperties); + id, name, description, type, ownerId, sources, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UserEffectiveRole.java b/src/main/java/com/auth0/client/mgmt/types/UserEffectiveRole.java index d7bceb84..b948447e 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserEffectiveRole.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserEffectiveRole.java @@ -174,7 +174,6 @@ public Builder from(UserEffectiveRole other) { } /** - *

                                                              Role ID

                                                              *

                                                              Role ID

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -186,7 +185,6 @@ public NameStage id(@NotNull String id) { } /** - *

                                                              Role name

                                                              *

                                                              Role name

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -198,7 +196,6 @@ public DescriptionStage name(@NotNull String name) { } /** - *

                                                              Role description

                                                              *

                                                              Role description

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UserGrant.java b/src/main/java/com/auth0/client/mgmt/types/UserGrant.java index 28306e2e..66f974c9 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserGrant.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserGrant.java @@ -31,6 +31,8 @@ public final class UserGrant { private final Optional> scope; + private final Optional organizationId; + private final Map additionalProperties; private UserGrant( @@ -39,12 +41,14 @@ private UserGrant( Optional userId, Optional audience, Optional> scope, + Optional organizationId, Map additionalProperties) { this.id = id; this.clientId = clientId; this.userId = userId; this.audience = audience; this.scope = scope; + this.organizationId = organizationId; this.additionalProperties = additionalProperties; } @@ -88,6 +92,14 @@ public Optional> getScope() { return scope; } + /** + * @return ID of the organization associated with the grant. + */ + @JsonProperty("organization_id") + public Optional getOrganizationId() { + return organizationId; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -104,12 +116,13 @@ private boolean equalTo(UserGrant other) { && clientId.equals(other.clientId) && userId.equals(other.userId) && audience.equals(other.audience) - && scope.equals(other.scope); + && scope.equals(other.scope) + && organizationId.equals(other.organizationId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.clientId, this.userId, this.audience, this.scope); + return Objects.hash(this.id, this.clientId, this.userId, this.audience, this.scope, this.organizationId); } @java.lang.Override @@ -133,6 +146,8 @@ public static final class Builder { private Optional> scope = Optional.empty(); + private Optional organizationId = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -144,6 +159,7 @@ public Builder from(UserGrant other) { userId(other.getUserId()); audience(other.getAudience()); scope(other.getScope()); + organizationId(other.getOrganizationId()); return this; } @@ -217,8 +233,22 @@ public Builder scope(List scope) { return this; } + /** + *

                                                              ID of the organization associated with the grant.

                                                              + */ + @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) + public Builder organizationId(Optional organizationId) { + this.organizationId = organizationId; + return this; + } + + public Builder organizationId(String organizationId) { + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + public UserGrant build() { - return new UserGrant(id, clientId, userId, audience, scope, additionalProperties); + return new UserGrant(id, clientId, userId, audience, scope, organizationId, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java b/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java index 2669f8a1..3136a82f 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java +++ b/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java @@ -265,7 +265,6 @@ public Builder from(UserIdentity other) { } /** - *

                                                              Connection name of this identity.

                                                              *

                                                              Connection name of this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -277,7 +276,6 @@ public UserIdStage connection(@NotNull String connection) { } /** - *

                                                              user_id of this identity.

                                                              *

                                                              user_id of this identity.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -289,7 +287,6 @@ public ProviderStage userId(@NotNull UserId userId) { } /** - *

                                                              Type of identity provider.

                                                              *

                                                              Type of identity provider.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java b/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java index 63bb140c..f9553305 100644 --- a/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java +++ b/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java @@ -20,7 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsernameAttribute.Builder.class) public final class UsernameAttribute { - private final Optional identifier; + private final Optional identifier; private final Optional profileRequired; @@ -31,7 +31,7 @@ public final class UsernameAttribute { private final Map additionalProperties; private UsernameAttribute( - Optional identifier, + Optional identifier, Optional profileRequired, Optional signup, Optional validation, @@ -44,7 +44,7 @@ private UsernameAttribute( } @JsonProperty("identifier") - public Optional getIdentifier() { + public Optional getIdentifier() { return identifier; } @@ -100,7 +100,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional identifier = Optional.empty(); + private Optional identifier = Optional.empty(); private Optional profileRequired = Optional.empty(); @@ -122,12 +122,12 @@ public Builder from(UsernameAttribute other) { } @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public Builder identifier(Optional identifier) { + public Builder identifier(Optional identifier) { this.identifier = identifier; return this; } - public Builder identifier(ConnectionAttributeIdentifier identifier) { + public Builder identifier(UsernameAttributeIdentifier identifier) { this.identifier = Optional.ofNullable(identifier); return this; } diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/UsernameAttributeIdentifier.java similarity index 73% rename from src/main/java/com/auth0/client/mgmt/types/ConnectionFederatedConnectionsAccessTokens.java rename to src/main/java/com/auth0/client/mgmt/types/UsernameAttributeIdentifier.java index 86129d54..7807c30a 100644 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionFederatedConnectionsAccessTokens.java +++ b/src/main/java/com/auth0/client/mgmt/types/UsernameAttributeIdentifier.java @@ -18,20 +18,19 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionFederatedConnectionsAccessTokens.Builder.class) -public final class ConnectionFederatedConnectionsAccessTokens { +@JsonDeserialize(builder = UsernameAttributeIdentifier.Builder.class) +public final class UsernameAttributeIdentifier { private final Optional active; private final Map additionalProperties; - private ConnectionFederatedConnectionsAccessTokens( - Optional active, Map additionalProperties) { + private UsernameAttributeIdentifier(Optional active, Map additionalProperties) { this.active = active; this.additionalProperties = additionalProperties; } /** - * @return Enables refresh tokens and access tokens collection for federated connections + * @return Determines if the attribute is used for identification */ @JsonProperty("active") public Optional getActive() { @@ -41,8 +40,7 @@ public Optional getActive() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof ConnectionFederatedConnectionsAccessTokens - && equalTo((ConnectionFederatedConnectionsAccessTokens) other); + return other instanceof UsernameAttributeIdentifier && equalTo((UsernameAttributeIdentifier) other); } @JsonAnyGetter @@ -50,7 +48,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(ConnectionFederatedConnectionsAccessTokens other) { + private boolean equalTo(UsernameAttributeIdentifier other) { return active.equals(other.active); } @@ -77,13 +75,13 @@ public static final class Builder { private Builder() {} - public Builder from(ConnectionFederatedConnectionsAccessTokens other) { + public Builder from(UsernameAttributeIdentifier other) { active(other.getActive()); return this; } /** - *

                                                              Enables refresh tokens and access tokens collection for federated connections

                                                              + *

                                                              Determines if the attribute is used for identification

                                                              */ @JsonSetter(value = "active", nulls = Nulls.SKIP) public Builder active(Optional active) { @@ -96,8 +94,8 @@ public Builder active(Boolean active) { return this; } - public ConnectionFederatedConnectionsAccessTokens build() { - return new ConnectionFederatedConnectionsAccessTokens(active, additionalProperties); + public UsernameAttributeIdentifier build() { + return new UsernameAttributeIdentifier(active, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/types/ValidateExperimentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ValidateExperimentResponseContent.java new file mode 100644 index 00000000..82fb412f --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/ValidateExperimentResponseContent.java @@ -0,0 +1,189 @@ +/** + * 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 = ValidateExperimentResponseContent.Builder.class) +public final class ValidateExperimentResponseContent { + private final boolean isValid; + + private final List errors; + + private final Map additionalProperties; + + private ValidateExperimentResponseContent( + boolean isValid, List errors, Map additionalProperties) { + this.isValid = isValid; + this.errors = errors; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether the experiment is ready to be activated. + */ + @JsonProperty("is_valid") + public boolean getIsValid() { + return isValid; + } + + /** + * @return List of validation errors preventing activation. Empty when is_valid is true. + */ + @JsonProperty("errors") + public List getErrors() { + return errors; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ValidateExperimentResponseContent && equalTo((ValidateExperimentResponseContent) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ValidateExperimentResponseContent other) { + return isValid == other.isValid && errors.equals(other.errors); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isValid, this.errors); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IsValidStage builder() { + return new Builder(); + } + + public interface IsValidStage { + /** + *

                                                              Whether the experiment is ready to be activated.

                                                              + */ + _FinalStage isValid(boolean isValid); + + Builder from(ValidateExperimentResponseContent other); + } + + public interface _FinalStage { + ValidateExperimentResponseContent build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

                                                              List of validation errors preventing activation. Empty when is_valid is true.

                                                              + */ + _FinalStage errors(List errors); + + _FinalStage addErrors(ExperimentValidationError errors); + + _FinalStage addAllErrors(List errors); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IsValidStage, _FinalStage { + private boolean isValid; + + private List errors = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ValidateExperimentResponseContent other) { + isValid(other.getIsValid()); + errors(other.getErrors()); + return this; + } + + /** + *

                                                              Whether the experiment is ready to be activated.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("is_valid") + public _FinalStage isValid(boolean isValid) { + this.isValid = isValid; + return this; + } + + /** + *

                                                              List of validation errors preventing activation. Empty when is_valid is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addAllErrors(List errors) { + if (errors != null) { + this.errors.addAll(errors); + } + return this; + } + + /** + *

                                                              List of validation errors preventing activation. Empty when is_valid is true.

                                                              + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage addErrors(ExperimentValidationError errors) { + this.errors.add(errors); + return this; + } + + /** + *

                                                              List of validation errors preventing activation. Empty when is_valid is true.

                                                              + */ + @java.lang.Override + @JsonSetter(value = "errors", nulls = Nulls.SKIP) + public _FinalStage errors(List errors) { + this.errors.clear(); + if (errors != null) { + this.errors.addAll(errors); + } + return this; + } + + @java.lang.Override + public ValidateExperimentResponseContent build() { + return new ValidateExperimentResponseContent(isValid, errors, 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/Variation.java b/src/main/java/com/auth0/client/mgmt/types/Variation.java new file mode 100644 index 00000000..99e4e71e --- /dev/null +++ b/src/main/java/com/auth0/client/mgmt/types/Variation.java @@ -0,0 +1,302 @@ +/** + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Variation.Builder.class) +public final class Variation { + private final String id; + + private final String featureFlagId; + + private final String name; + + private final Optional description; + + private final Map overrides; + + private final OffsetDateTime createdAt; + + private final OffsetDateTime updatedAt; + + private final Map additionalProperties; + + private Variation( + String id, + String featureFlagId, + String name, + Optional description, + Map overrides, + OffsetDateTime createdAt, + OffsetDateTime updatedAt, + Map additionalProperties) { + this.id = id; + this.featureFlagId = featureFlagId; + this.name = name; + this.description = description; + this.overrides = overrides; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("feature_flag_id") + public String getFeatureFlagId() { + return featureFlagId; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + @JsonProperty("overrides") + public Map getOverrides() { + return overrides; + } + + @JsonProperty("created_at") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty("updated_at") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Variation && equalTo((Variation) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Variation other) { + return id.equals(other.id) + && featureFlagId.equals(other.featureFlagId) + && name.equals(other.name) + && description.equals(other.description) + && overrides.equals(other.overrides) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.featureFlagId, + this.name, + this.description, + this.overrides, + this.createdAt, + this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + FeatureFlagIdStage id(@NotNull String id); + + Builder from(Variation other); + } + + public interface FeatureFlagIdStage { + NameStage featureFlagId(@NotNull String featureFlagId); + } + + public interface NameStage { + CreatedAtStage name(@NotNull String name); + } + + public interface CreatedAtStage { + UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); + } + + public interface UpdatedAtStage { + _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); + } + + public interface _FinalStage { + Variation build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage overrides(Map overrides); + + _FinalStage putAllOverrides(Map overrides); + + _FinalStage overrides(String key, Object value); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements IdStage, FeatureFlagIdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { + private String id; + + private String featureFlagId; + + private String name; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Map overrides = new LinkedHashMap<>(); + + private Optional description = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Variation other) { + id(other.getId()); + featureFlagId(other.getFeatureFlagId()); + name(other.getName()); + description(other.getDescription()); + overrides(other.getOverrides()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public FeatureFlagIdStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("feature_flag_id") + public NameStage featureFlagId(@NotNull String featureFlagId) { + this.featureFlagId = Objects.requireNonNull(featureFlagId, "featureFlagId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("name") + public CreatedAtStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("created_at") + public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { + this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("updated_at") + public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) { + this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); + return this; + } + + @java.lang.Override + public _FinalStage overrides(String key, Object value) { + this.overrides.put(key, value); + return this; + } + + @java.lang.Override + public _FinalStage putAllOverrides(Map overrides) { + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + @JsonSetter(value = "overrides", nulls = Nulls.SKIP) + public _FinalStage overrides(Map overrides) { + this.overrides.clear(); + if (overrides != null) { + this.overrides.putAll(overrides); + } + return this; + } + + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + @java.lang.Override + public Variation build() { + return new Variation( + id, featureFlagId, name, description, overrides, 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/VerifyCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/VerifyCustomDomainResponseContent.java index 5c024437..2a719487 100644 --- a/src/main/java/com/auth0/client/mgmt/types/VerifyCustomDomainResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/VerifyCustomDomainResponseContent.java @@ -355,7 +355,6 @@ public Builder from(VerifyCustomDomainResponseContent other) { } /** - *

                                                              ID of the custom domain.

                                                              *

                                                              ID of the custom domain.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -367,7 +366,6 @@ public DomainStage customDomainId(@NotNull String customDomainId) { } /** - *

                                                              Domain name.

                                                              *

                                                              Domain name.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -379,7 +377,6 @@ public PrimaryStage domain(@NotNull String domain) { } /** - *

                                                              Whether this is a primary domain (true) or not (false).

                                                              *

                                                              Whether this is a primary domain (true) or not (false).

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java index fda1c69e..cdd6e5c6 100644 --- a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java @@ -241,7 +241,6 @@ public Builder from(VerifyEmailTicketRequestContent other) { } /** - *

                                                              user_id of for whom the ticket should be created.

                                                              *

                                                              user_id of for whom the ticket should be created.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java index 2de3747c..b396bba1 100644 --- a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java +++ b/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java @@ -98,7 +98,6 @@ public Builder from(VerifyEmailTicketResponseContent other) { } /** - *

                                                              URL representing the ticket.

                                                              *

                                                              URL representing the ticket.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java b/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java index 88630790..97294df4 100644 --- a/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java +++ b/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java @@ -147,7 +147,6 @@ public PemStage credentialType(@NotNull X509CertificateCredentialTypeEnum creden } /** - *

                                                              PEM-formatted X509 certificate. Must be JSON escaped.

                                                              *

                                                              PEM-formatted X509 certificate. Must be JSON escaped.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncFederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncFederatedConnectionsTokensetsClient.java deleted file mode 100644 index a94c43cb..00000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncFederatedConnectionsTokensetsClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.FederatedConnectionTokenSet; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncFederatedConnectionsTokensetsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawFederatedConnectionsTokensetsClient rawClient; - - public AsyncFederatedConnectionsTokensetsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawFederatedConnectionsTokensetsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawFederatedConnectionsTokensetsClient withRawResponse() { - return this.rawClient; - } - - /** - * List active federated connections tokensets for a provided user - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * List active federated connections tokensets for a provided user - */ - public CompletableFuture> list(String id, RequestOptions requestOptions) { - return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, String tokensetId) { - return this.rawClient.delete(id, tokensetId).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, String tokensetId, RequestOptions requestOptions) { - return this.rawClient.delete(id, tokensetId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncOrganizationsClient.java index 5314c570..4c0daf30 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncOrganizationsClient.java @@ -29,6 +29,19 @@ public AsyncRawOrganizationsClient withRawResponse() { /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture> list(String id) { return this.rawClient.list(id).thenApply(response -> response.body()); @@ -36,6 +49,19 @@ public CompletableFuture> list(String id) { /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture> list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); @@ -43,6 +69,19 @@ public CompletableFuture> list(String id, Reque /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture> list( String id, ListUserOrganizationsRequestParameters request) { @@ -51,6 +90,19 @@ public CompletableFuture> list( /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture> list( String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java index 3a22eca4..0d366d95 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java @@ -31,6 +31,7 @@ public AsyncRawPermissionsClient withRawResponse() { /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture> list(String id) { return this.rawClient.list(id).thenApply(response -> response.body()); @@ -38,6 +39,7 @@ public CompletableFuture> list(String i /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture> list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); @@ -45,6 +47,7 @@ public CompletableFuture> list(String i /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture> list( String id, ListUserPermissionsRequestParameters request) { @@ -53,6 +56,7 @@ public CompletableFuture> list( /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture> list( String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java index 1b429fb2..06d5cc42 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -106,6 +107,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -176,6 +186,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -230,6 +243,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -284,6 +306,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -342,6 +367,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -392,6 +426,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -436,6 +473,15 @@ public CompletableFuture> deleteAll(String id, R 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 @@ -476,6 +522,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -517,6 +566,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -566,6 +624,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -612,6 +673,15 @@ public CompletableFuture> delete( 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 @@ -657,6 +727,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -738,6 +811,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -787,6 +869,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticatorsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticatorsClient.java index 8ff7d25b..99ed44ac 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticatorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticatorsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -64,6 +65,15 @@ public CompletableFuture> deleteAll(String id, R 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 @@ -104,6 +114,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java index 43ab0f82..4bd582f8 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -95,6 +96,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -161,6 +171,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectivePermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectivePermissionsClient.java index 3ef25084..a591bb5f 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectivePermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectivePermissionsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -82,6 +83,15 @@ public AsyncRawEffectivePermissionsClient(ClientOptions clientOptions) { 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() { @@ -149,6 +159,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectiveRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectiveRolesClient.java index ed55240d..a687f143 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectiveRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEffectiveRolesClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -95,6 +96,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -161,6 +171,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java index bd99fd7d..e22a7baa 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public CompletableFuture>> get( 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 @@ -117,6 +127,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawGroupsClient.java index 49ee7a1a..57302c1b 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -83,6 +84,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -168,6 +180,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawIdentitiesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawIdentitiesClient.java index 6ccf3ce8..e5b76edf 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawIdentitiesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawIdentitiesClient.java @@ -10,6 +10,7 @@ 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; @@ -198,6 +199,15 @@ public CompletableFuture>> link( 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 @@ -246,6 +256,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -296,6 +309,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -341,6 +363,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java index 6bf435ec..bd681f3a 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -110,6 +111,15 @@ public CompletableFuture>> lis 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 @@ -170,6 +180,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java index 5b3f0340..a931921e 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -69,6 +70,15 @@ public CompletableFuture> invalidateRememberBrow 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 @@ -104,6 +114,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -151,6 +164,15 @@ public CompletableFuture> deleteProvider( 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 @@ -196,6 +218,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java index 1a914d65..899c9451 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java @@ -10,7 +10,9 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -43,6 +45,19 @@ public AsyncRawOrganizationsClient(ClientOptions clientOptions) { /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture>> list(String id) { return list(id, ListUserOrganizationsRequestParameters.builder().build()); @@ -50,6 +65,19 @@ public CompletableFutureAuth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture>> list( String id, RequestOptions requestOptions) { @@ -58,6 +86,19 @@ public CompletableFutureAuth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture>> list( String id, ListUserOrganizationsRequestParameters request) { @@ -66,6 +107,19 @@ public CompletableFutureAuth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public CompletableFuture>> list( String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { @@ -94,6 +148,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -130,6 +193,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), @@ -158,6 +226,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java index 95e0a5bd..8d298da0 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -48,6 +49,7 @@ public AsyncRawPermissionsClient(ClientOptions clientOptions) { /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture>> list(String id) { return list(id, ListUserPermissionsRequestParameters.builder().build()); @@ -55,6 +57,7 @@ public CompletableFutureNote: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture>> list( String id, RequestOptions requestOptions) { @@ -63,6 +66,7 @@ public CompletableFutureNote: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture>> list( String id, ListUserPermissionsRequestParameters request) { @@ -71,6 +75,7 @@ public CompletableFutureNote: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public CompletableFuture>> list( String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { @@ -99,6 +104,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -168,6 +182,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -222,6 +239,15 @@ public CompletableFuture> create( 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 @@ -267,6 +293,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -321,6 +350,15 @@ public CompletableFuture> delete( 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 @@ -366,6 +404,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRefreshTokenClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRefreshTokenClient.java index 4e3afc4a..fca3b66f 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRefreshTokenClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRefreshTokenClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -77,6 +78,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -158,6 +170,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -202,6 +217,15 @@ public CompletableFuture> delete(String userId, 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 @@ -247,6 +271,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRiskAssessmentsClient.java index 93f01b84..5bcc6b8c 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRiskAssessmentsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRiskAssessmentsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -77,6 +78,15 @@ public CompletableFuture> clear( 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 @@ -117,6 +127,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java index ad6652d1..66dfbbfb 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -49,6 +50,7 @@ public AsyncRawRolesClient(ClientOptions clientOptions) { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture>> list(String id) { return list(id, ListUserRolesRequestParameters.builder().build()); @@ -57,6 +59,7 @@ public CompletableFuture>> li /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture>> list( String id, RequestOptions requestOptions) { @@ -66,6 +69,7 @@ public CompletableFuture>> li /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture>> list( String id, ListUserRolesRequestParameters request) { @@ -75,6 +79,7 @@ public CompletableFuture>> li /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture>> list( String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { @@ -103,6 +108,15 @@ public CompletableFuture>> li 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 @@ -169,6 +183,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -224,6 +241,15 @@ public CompletableFuture> assign( 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 @@ -269,6 +295,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -324,6 +353,15 @@ public CompletableFuture> delete( 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 @@ -364,6 +402,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java index b2773d9a..e08f8cb3 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -77,6 +78,8 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -158,6 +170,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -202,6 +217,15 @@ public CompletableFuture> delete(String userId, 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 @@ -247,6 +271,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java index 488688e2..51ce4d93 100644 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java @@ -32,6 +32,7 @@ public AsyncRawRolesClient withRawResponse() { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture> list(String id) { return this.rawClient.list(id).thenApply(response -> response.body()); @@ -40,6 +41,7 @@ public CompletableFuture> list(String id) { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture> list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).thenApply(response -> response.body()); @@ -48,6 +50,7 @@ public CompletableFuture> list(String id, RequestOption /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture> list(String id, ListUserRolesRequestParameters request) { return this.rawClient.list(id, request).thenApply(response -> response.body()); @@ -56,6 +59,7 @@ public CompletableFuture> list(String id, ListUserRoles /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public CompletableFuture> list( String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/users/FederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/users/FederatedConnectionsTokensetsClient.java deleted file mode 100644 index 6970674f..00000000 --- a/src/main/java/com/auth0/client/mgmt/users/FederatedConnectionsTokensetsClient.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.FederatedConnectionTokenSet; -import java.util.List; - -public class FederatedConnectionsTokensetsClient { - protected final ClientOptions clientOptions; - - private final RawFederatedConnectionsTokensetsClient rawClient; - - public FederatedConnectionsTokensetsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawFederatedConnectionsTokensetsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawFederatedConnectionsTokensetsClient withRawResponse() { - return this.rawClient; - } - - /** - * List active federated connections tokensets for a provided user - */ - public List list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * List active federated connections tokensets for a provided user - */ - public List list(String id, RequestOptions requestOptions) { - return this.rawClient.list(id, requestOptions).body(); - } - - public void delete(String id, String tokensetId) { - this.rawClient.delete(id, tokensetId).body(); - } - - public void delete(String id, String tokensetId, RequestOptions requestOptions) { - this.rawClient.delete(id, tokensetId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/OrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/OrganizationsClient.java index f25eeeed..fee9ea79 100644 --- a/src/main/java/com/auth0/client/mgmt/users/OrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/OrganizationsClient.java @@ -28,6 +28,19 @@ public RawOrganizationsClient withRawResponse() { /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public SyncPagingIterable list(String id) { return this.rawClient.list(id).body(); @@ -35,6 +48,19 @@ public SyncPagingIterable list(String id) { /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public SyncPagingIterable list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).body(); @@ -42,6 +68,19 @@ public SyncPagingIterable list(String id, RequestOptions requestOp /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public SyncPagingIterable list(String id, ListUserOrganizationsRequestParameters request) { return this.rawClient.list(id, request).body(); @@ -49,6 +88,19 @@ public SyncPagingIterable list(String id, ListUserOrganizationsReq /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public SyncPagingIterable list( String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java index 97f9cd7f..ed7ac229 100644 --- a/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java @@ -30,6 +30,7 @@ public RawPermissionsClient withRawResponse() { /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public SyncPagingIterable list(String id) { return this.rawClient.list(id).body(); @@ -37,6 +38,7 @@ public SyncPagingIterable list(String id) { /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public SyncPagingIterable list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).body(); @@ -44,6 +46,7 @@ public SyncPagingIterable list(String id, RequestOptions r /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public SyncPagingIterable list(String id, ListUserPermissionsRequestParameters request) { return this.rawClient.list(id, request).body(); @@ -51,6 +54,7 @@ public SyncPagingIterable list(String id, ListUserPermissi /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public SyncPagingIterable list( String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java index e18e745b..548bd679 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -101,6 +102,15 @@ public ManagementApiHttpResponse> l 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() : "{}"; @@ -147,6 +157,8 @@ public ManagementApiHttpResponse> l 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); } @@ -193,6 +205,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -229,6 +250,8 @@ public ManagementApiHttpResponse 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); } @@ -279,6 +302,15 @@ public ManagementApiHttpResponse deleteAll(String id, RequestOptions reque if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -376,6 +419,8 @@ public ManagementApiHttpResponse deleteAll(String id, RequestOptions reque 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); } @@ -409,6 +454,15 @@ public ManagementApiHttpResponse get 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() : "{}"; @@ -442,6 +496,8 @@ public ManagementApiHttpResponse get 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); } @@ -480,6 +536,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -510,6 +575,8 @@ public ManagementApiHttpResponse delete( 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); } @@ -583,6 +650,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -616,6 +692,8 @@ public ManagementApiHttpResponse 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/users/RawAuthenticatorsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawAuthenticatorsClient.java index 84bbdde3..bff9121d 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawAuthenticatorsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawAuthenticatorsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -60,6 +61,15 @@ public ManagementApiHttpResponse deleteAll(String id, RequestOptions reque if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -87,6 +97,8 @@ public ManagementApiHttpResponse deleteAll(String id, RequestOptions reque 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/users/RawConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java index 26e6724b..85df9faf 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -90,6 +91,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -134,6 +144,8 @@ public ManagementApiHttpResponse> list( 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/users/RawEffectivePermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawEffectivePermissionsClient.java index f6174576..9f22430b 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawEffectivePermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawEffectivePermissionsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -77,6 +78,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -133,6 +143,8 @@ public ManagementApiHttpResponse> list( 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/users/RawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawEnrollmentsClient.java index 0617f71d..a1a5fddc 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawEnrollmentsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawEnrollmentsClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse> get(String id, RequestOp 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() : "{}"; @@ -97,6 +107,8 @@ public ManagementApiHttpResponse> get(String id, RequestOp 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/users/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawGroupsClient.java index 41718b64..a083c820 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -78,6 +79,8 @@ public ManagementApiHttpResponse> g QueryStringMapper.addQueryParameter( httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); } + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -98,6 +101,15 @@ public ManagementApiHttpResponse> g 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() : "{}"; @@ -141,6 +153,8 @@ public ManagementApiHttpResponse> g 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/users/RawIdentitiesClient.java b/src/main/java/com/auth0/client/mgmt/users/RawIdentitiesClient.java index 31bb0f9b..7507804d 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawIdentitiesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawIdentitiesClient.java @@ -10,6 +10,7 @@ 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; @@ -192,6 +193,15 @@ public ManagementApiHttpResponse> link( 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() : "{}"; @@ -225,6 +235,8 @@ public ManagementApiHttpResponse> link( 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); } @@ -267,6 +279,15 @@ public ManagementApiHttpResponse> de 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() : "{}"; @@ -298,6 +319,8 @@ public ManagementApiHttpResponse> de 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/users/RawLogsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawLogsClient.java index fde9cf5d..04a96263 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawLogsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawLogsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -103,6 +104,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -143,6 +153,8 @@ public ManagementApiHttpResponse> list( 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/users/RawMultifactorClient.java b/src/main/java/com/auth0/client/mgmt/users/RawMultifactorClient.java index f7143323..69efe0bb 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawMultifactorClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawMultifactorClient.java @@ -9,6 +9,7 @@ import com.auth0.client.mgmt.core.ManagementException; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; @@ -64,6 +65,15 @@ public ManagementApiHttpResponse invalidateRememberBrowser(String id, Requ if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -88,6 +98,8 @@ public ManagementApiHttpResponse invalidateRememberBrowser(String id, Requ 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); } @@ -126,6 +138,15 @@ public ManagementApiHttpResponse deleteProvider( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -156,6 +177,8 @@ public ManagementApiHttpResponse deleteProvider( 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/users/RawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java index e85f553a..b50573c6 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java @@ -10,7 +10,9 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; import com.auth0.client.mgmt.errors.NotFoundError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -38,6 +40,19 @@ public RawOrganizationsClient(ClientOptions clientOptions) { /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public ManagementApiHttpResponse> list(String id) { return list(id, ListUserOrganizationsRequestParameters.builder().build()); @@ -45,6 +60,19 @@ public ManagementApiHttpResponse> list(String i /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public ManagementApiHttpResponse> list(String id, RequestOptions requestOptions) { return list(id, ListUserOrganizationsRequestParameters.builder().build(), requestOptions); @@ -52,6 +80,19 @@ public ManagementApiHttpResponse> list(String i /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public ManagementApiHttpResponse> list( String id, ListUserOrganizationsRequestParameters request) { @@ -60,6 +101,19 @@ public ManagementApiHttpResponse> list( /** * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. + *

                                                              This endpoint supports two types of pagination:

                                                              + *
                                                                + *
                                                              • Offset pagination
                                                              • + *
                                                              • Checkpoint pagination
                                                              • + *
                                                              + *

                                                              Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

                                                              + *

                                                              Checkpoint Pagination

                                                              + *

                                                              To search by checkpoint, use the following parameters:

                                                              + *
                                                                + *
                                                              • from: Optional id from which to start selection.
                                                              • + *
                                                              • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.
                                                              • + *
                                                              + *

                                                              Note: The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

                                                              */ public ManagementApiHttpResponse> list( String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { @@ -88,6 +142,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -110,6 +173,9 @@ public ManagementApiHttpResponse> list( } 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); @@ -129,6 +195,8 @@ public ManagementApiHttpResponse> list( 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/users/RawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java index f6683d0b..96c3bcb9 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -43,6 +44,7 @@ public RawPermissionsClient(ClientOptions clientOptions) { /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public ManagementApiHttpResponse> list(String id) { return list(id, ListUserPermissionsRequestParameters.builder().build()); @@ -50,6 +52,7 @@ public ManagementApiHttpResponse> list( /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public ManagementApiHttpResponse> list( String id, RequestOptions requestOptions) { @@ -58,6 +61,7 @@ public ManagementApiHttpResponse> list( /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public ManagementApiHttpResponse> list( String id, ListUserPermissionsRequestParameters request) { @@ -66,6 +70,7 @@ public ManagementApiHttpResponse> list( /** * Retrieve all permissions associated with the user. + *

                                                              Note: Returns only permissions from direct assignments and directly assigned roles. For permissions a user has via group-based role assignments, use GET /api/v2/users/{id}/effective-permissions.

                                                              */ public ManagementApiHttpResponse> list( String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { @@ -94,6 +99,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -138,6 +152,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -183,6 +199,15 @@ public ManagementApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -213,6 +238,8 @@ public ManagementApiHttpResponse create( 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); } @@ -258,6 +285,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -288,6 +324,8 @@ public ManagementApiHttpResponse delete( 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/users/RawRefreshTokenClient.java b/src/main/java/com/auth0/client/mgmt/users/RawRefreshTokenClient.java index 468cb010..7cc24bfb 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawRefreshTokenClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawRefreshTokenClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -71,6 +72,8 @@ public ManagementApiHttpResponse .addPathSegments("users") .addPathSegment(userId) .addPathSegments("refresh-tokens"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -91,6 +94,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -132,6 +144,8 @@ public ManagementApiHttpResponse 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); } @@ -168,6 +182,15 @@ public ManagementApiHttpResponse delete(String userId, RequestOptions requ if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -198,6 +221,8 @@ public ManagementApiHttpResponse delete(String userId, RequestOptions requ 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/users/RawRiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawRiskAssessmentsClient.java index 35b0673d..59053543 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawRiskAssessmentsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawRiskAssessmentsClient.java @@ -10,6 +10,7 @@ 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.ForbiddenError; import com.auth0.client.mgmt.errors.TooManyRequestsError; @@ -73,6 +74,15 @@ public ManagementApiHttpResponse clear( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -100,6 +110,8 @@ public ManagementApiHttpResponse clear( 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/users/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java index 24333f89..2f0399d4 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -44,6 +45,7 @@ public RawRolesClient(ClientOptions clientOptions) { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public ManagementApiHttpResponse> list(String id) { return list(id, ListUserRolesRequestParameters.builder().build()); @@ -52,6 +54,7 @@ public ManagementApiHttpResponse> list(String id) { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public ManagementApiHttpResponse> list(String id, RequestOptions requestOptions) { return list(id, ListUserRolesRequestParameters.builder().build(), requestOptions); @@ -60,6 +63,7 @@ public ManagementApiHttpResponse> list(String id, Reque /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public ManagementApiHttpResponse> list(String id, ListUserRolesRequestParameters request) { return list(id, request, null); @@ -68,6 +72,7 @@ public ManagementApiHttpResponse> list(String id, ListU /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public ManagementApiHttpResponse> list( String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { @@ -96,6 +101,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -139,6 +153,8 @@ public ManagementApiHttpResponse> list( 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); } @@ -186,6 +202,15 @@ public ManagementApiHttpResponse assign( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -216,6 +241,8 @@ public ManagementApiHttpResponse assign( 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); } @@ -263,6 +290,15 @@ public ManagementApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -290,6 +326,8 @@ public ManagementApiHttpResponse delete( 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/users/RawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawSessionsClient.java index a21ed36a..221e14e3 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RawSessionsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RawSessionsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -71,6 +72,8 @@ public ManagementApiHttpResponse> lis .addPathSegments("users") .addPathSegment(userId) .addPathSegments("sessions"); + QueryStringMapper.addQueryParameter( + httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); if (!request.getFrom().isAbsent()) { QueryStringMapper.addQueryParameter( httpUrl, "from", request.getFrom().orElse(null), false); @@ -91,6 +94,15 @@ public ManagementApiHttpResponse> lis 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() : "{}"; @@ -132,6 +144,8 @@ public ManagementApiHttpResponse> lis 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); } @@ -168,6 +182,15 @@ public ManagementApiHttpResponse delete(String userId, RequestOptions requ if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -198,6 +221,8 @@ public ManagementApiHttpResponse delete(String userId, RequestOptions requ 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/users/RolesClient.java b/src/main/java/com/auth0/client/mgmt/users/RolesClient.java index c20bdf61..a3ac6b7f 100644 --- a/src/main/java/com/auth0/client/mgmt/users/RolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/RolesClient.java @@ -31,6 +31,7 @@ public RawRolesClient withRawResponse() { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public SyncPagingIterable list(String id) { return this.rawClient.list(id).body(); @@ -39,6 +40,7 @@ public SyncPagingIterable list(String id) { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public SyncPagingIterable list(String id, RequestOptions requestOptions) { return this.rawClient.list(id, requestOptions).body(); @@ -47,6 +49,7 @@ public SyncPagingIterable list(String id, RequestOptions requestOptions) { /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public SyncPagingIterable list(String id, ListUserRolesRequestParameters request) { return this.rawClient.list(id, request).body(); @@ -55,6 +58,7 @@ public SyncPagingIterable list(String id, ListUserRolesRequestParameters r /** * Retrieve detailed list of all user roles currently assigned to a user. *

                                                              Note: This action retrieves all roles assigned to a user in the context of your whole tenant. To retrieve Organization-specific roles, use the following endpoint: Get user roles assigned to an Organization member.

                                                              + *

                                                              Note: Returns only direct role assignments. To also include group-based role assignments, use GET /api/v2/users/{id}/effective-roles.

                                                              */ public SyncPagingIterable list( String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { diff --git a/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/AsyncRawRolesClient.java index e2c61e49..d21f83bd 100644 --- a/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/AsyncRawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/AsyncRawRolesClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -89,6 +90,15 @@ public AsyncRawRolesClient(ClientOptions clientOptions) { 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< ManagementApiHttpResponse>> future = new CompletableFuture<>(); @@ -158,6 +168,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/RawRolesClient.java index 97756a6a..f96c8322 100644 --- a/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/RawRolesClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/effectivepermissions/sources/RawRolesClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -79,6 +80,15 @@ public ManagementApiHttpResponse getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -60,7 +62,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -71,7 +74,7 @@ public OptionalNullable getTake() { /** * @return The identifier of the resource server for which to calculate user permissions. */ - @JsonIgnore + @JsonProperty("resource_server_identifier") public String getResourceServerIdentifier() { return resourceServerIdentifier; } @@ -79,11 +82,23 @@ public String getResourceServerIdentifier() { /** * @return Name of this permission */ - @JsonIgnore + @JsonProperty("permission_name") public String getPermissionName() { return permissionName; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -188,7 +203,6 @@ public Builder from(ListUserEffectivePermissionRoleSourceRequestParameters other } /** - *

                                                              The identifier of the resource server for which to calculate user permissions.

                                                              *

                                                              The identifier of the resource server for which to calculate user permissions.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ @@ -201,7 +215,6 @@ public PermissionNameStage resourceServerIdentifier(@NotNull String resourceServ } /** - *

                                                              Name of this permission

                                                              *

                                                              Name of this permission

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/AsyncRawGroupsClient.java index 3356b51e..2b27052c 100644 --- a/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/AsyncRawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/AsyncRawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -82,6 +83,15 @@ public CompletableFuture>> l 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 @@ -146,6 +156,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/RawGroupsClient.java index d515a5e2..44704908 100644 --- a/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/RawGroupsClient.java +++ b/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/RawGroupsClient.java @@ -10,6 +10,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ForbiddenError; @@ -77,6 +78,15 @@ public ManagementApiHttpResponse> list( 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() : "{}"; @@ -120,6 +130,8 @@ public ManagementApiHttpResponse> list( 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/users/effectiveroles/sources/types/ListUserRoleSourceGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/types/ListUserRoleSourceGroupsRequestParameters.java index fdae70c6..f507b2e1 100644 --- a/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/types/ListUserRoleSourceGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/effectiveroles/sources/types/ListUserRoleSourceGroupsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.effectiveroles.sources.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.JsonIgnore; 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; @@ -45,7 +46,7 @@ private ListUserRoleSourceGroupsRequestParameters( /** * @return ID of the role to get source groups for. */ - @JsonIgnore + @JsonProperty("role_id") public String getRoleId() { return roleId; } @@ -53,7 +54,8 @@ public String getRoleId() { /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -64,7 +66,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -72,6 +75,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -163,7 +178,6 @@ public Builder from(ListUserRoleSourceGroupsRequestParameters other) { } /** - *

                                                              ID of the role to get source groups for.

                                                              *

                                                              ID of the role to get source groups for.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ClearAssessorsRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/ClearAssessorsRequestContent.java index 54c8a842..c6030cd9 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ClearAssessorsRequestContent.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ClearAssessorsRequestContent.java @@ -126,7 +126,6 @@ public Builder from(ClearAssessorsRequestContent other) { } /** - *

                                                              The name of the connection containing the user whose assessors should be cleared.

                                                              *

                                                              The name of the connection containing the user whose assessors should be cleared.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java index bbfe5187..d3744832 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private GetUserConnectedAccountsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results to return. Defaults to 10 with a maximum of 20 */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java index 6ee63b76..518c0de5 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -26,6 +27,8 @@ public final class GetUserGroupsRequestParameters { private final OptionalNullable includeFields; + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -35,11 +38,13 @@ public final class GetUserGroupsRequestParameters { private GetUserGroupsRequestParameters( OptionalNullable fields, OptionalNullable includeFields, + OptionalNullable includeTotals, OptionalNullable from, OptionalNullable take, Map additionalProperties) { this.fields = fields; this.includeFields = includeFields; + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; @@ -48,7 +53,8 @@ private GetUserGroupsRequestParameters( /** * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") public OptionalNullable getFields() { if (fields == null) { return OptionalNullable.absent(); @@ -59,7 +65,8 @@ public OptionalNullable getFields() { /** * @return Whether specified fields are to be included (true) or excluded (false). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") public OptionalNullable getIncludeFields() { if (includeFields == null) { return OptionalNullable.absent(); @@ -67,10 +74,23 @@ public OptionalNullable getIncludeFields() { return includeFields; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). The returned total reflects at most 1,000 results. + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -81,7 +101,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -89,6 +110,36 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("fields") + private OptionalNullable _getFields() { + return fields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_fields") + private OptionalNullable _getIncludeFields() { + return includeFields; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,13 +154,14 @@ public Map getAdditionalProperties() { private boolean equalTo(GetUserGroupsRequestParameters other) { return fields.equals(other.fields) && includeFields.equals(other.includeFields) + && includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @java.lang.Override public int hashCode() { - return Objects.hash(this.fields, this.includeFields, this.from, this.take); + return Objects.hash(this.fields, this.includeFields, this.includeTotals, this.from, this.take); } @java.lang.Override @@ -127,6 +179,8 @@ public static final class Builder { private OptionalNullable includeFields = OptionalNullable.absent(); + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -139,6 +193,7 @@ private Builder() {} public Builder from(GetUserGroupsRequestParameters other) { fields(other.getFields()); includeFields(other.getIncludeFields()); + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; @@ -212,6 +267,40 @@ public Builder includeFields(com.auth0.client.mgmt.core.Nullable includ return this; } + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). The returned total reflects at most 1,000 results.

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + /** *

                                                              Optional Id from which to start selection.

                                                              */ @@ -281,7 +370,8 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { } public GetUserGroupsRequestParameters build() { - return new GetUserGroupsRequestParameters(fields, includeFields, from, take, additionalProperties); + return new GetUserGroupsRequestParameters( + fields, includeFields, includeTotals, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java index 0c206742..0810d17c 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListRefreshTokensRequestParameters.Builder.class) public final class ListRefreshTokensRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -29,16 +32,33 @@ public final class ListRefreshTokensRequestParameters { private final Map additionalProperties; private ListRefreshTokensRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { + OptionalNullable includeTotals, + OptionalNullable from, + OptionalNullable take, + Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return An optional cursor from which to start the selection (exclusive). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +69,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +78,24 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -70,12 +109,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListRefreshTokensRequestParameters other) { - return from.equals(other.from) && take.equals(other.take); + return includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take); + return Objects.hash(this.includeTotals, this.from, this.take); } @java.lang.Override @@ -89,6 +128,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -99,11 +140,46 @@ public static final class Builder { private Builder() {} public Builder from(ListRefreshTokensRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; } + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + /** *

                                                              An optional cursor from which to start the selection (exclusive).

                                                              */ @@ -173,7 +249,7 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { } public ListRefreshTokensRequestParameters build() { - return new ListRefreshTokensRequestParameters(from, take, additionalProperties); + return new ListRefreshTokensRequestParameters(includeTotals, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java index adfa218a..8ea18bf5 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListUserAuthenticationMethodsRequestParameters( /** * @return Page index of the results to return. First page is 0. Default is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Default is 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectivePermissionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectivePermissionsRequestParameters.java index 827c5556..622bdc87 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectivePermissionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectivePermissionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -45,7 +46,8 @@ private ListUserEffectivePermissionsRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -56,7 +58,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -67,11 +70,23 @@ public OptionalNullable getTake() { /** * @return The identifier of the resource server for which to calculate user permissions. */ - @JsonIgnore + @JsonProperty("resource_server_identifier") public String getResourceServerIdentifier() { return resourceServerIdentifier; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -165,7 +180,6 @@ public Builder from(ListUserEffectivePermissionsRequestParameters other) { } /** - *

                                                              The identifier of the resource server for which to calculate user permissions.

                                                              *

                                                              The identifier of the resource server for which to calculate user permissions.

                                                              * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectiveRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectiveRolesRequestParameters.java index 69597670..66016480 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectiveRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserEffectiveRolesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -38,7 +39,8 @@ private ListUserEffectiveRolesRequestParameters( /** * @return Optional Id from which to start selection. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java index cb208906..faed1557 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -48,7 +49,8 @@ private ListUserLogsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -59,7 +61,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Paging is disabled if parameter not sent. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -70,7 +73,8 @@ public OptionalNullable getPerPage() { /** * @return Field to sort by. Use fieldname:1 for ascending order and fieldname:-1 for descending. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") public OptionalNullable getSort() { if (sort == null) { return OptionalNullable.absent(); @@ -81,7 +85,8 @@ public OptionalNullable getSort() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -89,6 +94,30 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("sort") + private OptionalNullable _getSort() { + return sort; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java index 28f64e78..38b0dee5 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListUserOrganizationsRequestParameters( /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPage() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPerPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java index 0aa312f9..e9f9bdc1 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListUserPermissionsRequestParameters( /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPerPage() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java index 72499547..11374e9d 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -44,7 +45,8 @@ private ListUserRolesRequestParameters( /** * @return Number of results per page. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") public OptionalNullable getPerPage() { if (perPage == null) { return OptionalNullable.absent(); @@ -55,7 +57,8 @@ public OptionalNullable getPerPage() { /** * @return Page index of the results to return. First page is 0. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") public OptionalNullable getPage() { if (page == null) { return OptionalNullable.absent(); @@ -66,7 +69,8 @@ public OptionalNullable getPage() { /** * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") public OptionalNullable getIncludeTotals() { if (includeTotals == null) { return OptionalNullable.absent(); @@ -74,6 +78,24 @@ public OptionalNullable getIncludeTotals() { return includeTotals; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("per_page") + private OptionalNullable _getPerPage() { + return perPage; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("page") + private OptionalNullable _getPage() { + return page; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java index 75bf5cd8..7772a217 100644 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java +++ b/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java @@ -3,13 +3,14 @@ */ package com.auth0.client.mgmt.users.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.JsonIgnore; 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; @@ -22,6 +23,8 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListUserSessionsRequestParameters.Builder.class) public final class ListUserSessionsRequestParameters { + private final OptionalNullable includeTotals; + private final OptionalNullable from; private final OptionalNullable take; @@ -29,16 +32,33 @@ public final class ListUserSessionsRequestParameters { private final Map additionalProperties; private ListUserSessionsRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { + OptionalNullable includeTotals, + OptionalNullable from, + OptionalNullable take, + Map additionalProperties) { + this.includeTotals = includeTotals; this.from = from; this.take = take; this.additionalProperties = additionalProperties; } + /** + * @return Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). + */ + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + public OptionalNullable getIncludeTotals() { + if (includeTotals == null) { + return OptionalNullable.absent(); + } + return includeTotals; + } + /** * @return An optional cursor from which to start the selection (exclusive). */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") public OptionalNullable getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +69,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +78,24 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("include_totals") + private OptionalNullable _getIncludeTotals() { + return includeTotals; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -69,12 +108,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ListUserSessionsRequestParameters other) { - return from.equals(other.from) && take.equals(other.take); + return includeTotals.equals(other.includeTotals) && from.equals(other.from) && take.equals(other.take); } @java.lang.Override public int hashCode() { - return Objects.hash(this.from, this.take); + return Objects.hash(this.includeTotals, this.from, this.take); } @java.lang.Override @@ -88,6 +127,8 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private OptionalNullable includeTotals = OptionalNullable.absent(); + private OptionalNullable from = OptionalNullable.absent(); private OptionalNullable take = OptionalNullable.absent(); @@ -98,11 +139,46 @@ public static final class Builder { private Builder() {} public Builder from(ListUserSessionsRequestParameters other) { + includeTotals(other.getIncludeTotals()); from(other.getFrom()); take(other.getTake()); return this; } + /** + *

                                                              Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

                                                              + */ + @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) + public Builder includeTotals(@Nullable OptionalNullable includeTotals) { + this.includeTotals = includeTotals; + return this; + } + + public Builder includeTotals(Boolean includeTotals) { + this.includeTotals = OptionalNullable.of(includeTotals); + return this; + } + + public Builder includeTotals(Optional includeTotals) { + if (includeTotals.isPresent()) { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } else { + this.includeTotals = OptionalNullable.absent(); + } + return this; + } + + public Builder includeTotals(com.auth0.client.mgmt.core.Nullable includeTotals) { + if (includeTotals.isNull()) { + this.includeTotals = OptionalNullable.ofNull(); + } else if (includeTotals.isEmpty()) { + this.includeTotals = OptionalNullable.absent(); + } else { + this.includeTotals = OptionalNullable.of(includeTotals.get()); + } + return this; + } + /** *

                                                              An optional cursor from which to start the selection (exclusive).

                                                              */ @@ -172,7 +248,7 @@ public Builder take(com.auth0.client.mgmt.core.Nullable take) { } public ListUserSessionsRequestParameters build() { - return new ListUserSessionsRequestParameters(from, take, additionalProperties); + return new ListUserSessionsRequestParameters(includeTotals, from, take, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncRawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncRawTemplatesClient.java index 4fa0a46b..5d31c14e 100644 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncRawTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncRawTemplatesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -102,6 +103,15 @@ public CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -166,6 +176,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -218,6 +231,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -267,6 +289,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -311,6 +336,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -360,6 +394,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -403,6 +440,15 @@ public CompletableFuture> delete(String id, Requ 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 @@ -443,6 +489,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } @@ -514,6 +563,15 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -563,6 +621,9 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO 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)); } diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/RawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/RawTemplatesClient.java index ef1139d1..2e6381c0 100644 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/RawTemplatesClient.java +++ b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/RawTemplatesClient.java @@ -11,6 +11,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.QueryStringMapper; import com.auth0.client.mgmt.core.RequestOptions; +import com.auth0.client.mgmt.core.RetryInterceptor; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.errors.BadRequestError; import com.auth0.client.mgmt.errors.ConflictError; @@ -96,6 +97,15 @@ public ManagementApiHttpResponse 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() : "{}"; @@ -285,6 +317,8 @@ public ManagementApiHttpResponse 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); } @@ -320,6 +354,15 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } + if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { + okhttpRequest = okhttpRequest + .newBuilder() + .tag( + RetryInterceptor.MaxRetriesOverride.class, + new RetryInterceptor.MaxRetriesOverride( + requestOptions.getMaxRetries().get())) + .build(); + } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { @@ -347,6 +390,8 @@ public ManagementApiHttpResponse delete(String id, RequestOptions requestO 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); } @@ -409,6 +454,15 @@ public ManagementApiHttpResponse getFrom() { if (from == null) { return OptionalNullable.absent(); @@ -49,7 +51,8 @@ public OptionalNullable getFrom() { /** * @return Number of results per page. Defaults to 50. */ - @JsonIgnore + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") public OptionalNullable getTake() { if (take == null) { return OptionalNullable.absent(); @@ -57,6 +60,18 @@ public OptionalNullable getTake() { return take; } + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("from") + private OptionalNullable _getFrom() { + return from; + } + + @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) + @JsonProperty("take") + private OptionalNullable _getTake() { + return take; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/auth0/net/client/DefaultHttpClient.java b/src/main/java/com/auth0/net/client/DefaultHttpClient.java index d6bb8d0d..e7511ee0 100644 --- a/src/main/java/com/auth0/net/client/DefaultHttpClient.java +++ b/src/main/java/com/auth0/net/client/DefaultHttpClient.java @@ -3,7 +3,9 @@ import com.auth0.client.LoggingOptions; import com.auth0.client.ProxyOptions; import com.auth0.net.RateLimitInterceptor; +import com.auth0.net.Telemetry; import com.auth0.net.TelemetryInterceptor; +import com.auth0.utils.Asserts; import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -23,9 +25,10 @@ * API clients. *

                                                              *

                                                              - * For most use cases, usage of this client is recommended. If you have more advanced use cases, - * such as the need to re-use an existing HTTP client, you may consider providing a custom - * implementation of {@link Auth0HttpClient}. + * For most use cases, usage of this client is recommended. To reuse an existing {@link OkHttpClient} + * and its transport configuration, use {@link Builder#withClient(OkHttpClient)}. Only for advanced use + * cases not covered by the {@link Builder} should you provide a custom implementation of + * {@link Auth0HttpClient}. *

                                                              */ public class DefaultHttpClient implements Auth0HttpClient { @@ -53,15 +56,30 @@ OkHttpClient getOkClient() { } private DefaultHttpClient(Builder builder) { - okhttp3.OkHttpClient.Builder clientBuilder = new okhttp3.OkHttpClient.Builder(); - clientBuilder.readTimeout(sanitizeTimeout(builder.readTimeout), TimeUnit.SECONDS); - clientBuilder.connectTimeout(sanitizeTimeout(builder.connectTimeout), TimeUnit.SECONDS); + okhttp3.OkHttpClient.Builder clientBuilder; + if (builder.baseClient != null) { + // A caller-supplied client owns all transport configuration: timeouts, dispatcher, connection + // pool, cache, proxy, and any interceptors already registered on it are used as-is. The transport + // settings on this builder (timeouts, dispatcher, proxy) are intentionally NOT applied here, so + // they never silently override the caller's client. The SDK's behavior interceptors are still + // layered on below. + clientBuilder = builder.baseClient.newBuilder(); + } else { + // Default path (unchanged): the SDK builds and fully configures the transport. + clientBuilder = new okhttp3.OkHttpClient.Builder(); + clientBuilder.readTimeout(sanitizeTimeout(builder.readTimeout), TimeUnit.SECONDS); + clientBuilder.connectTimeout(sanitizeTimeout(builder.connectTimeout), TimeUnit.SECONDS); + clientBuilder.dispatcher(getDispatcher(builder.maxRequests, builder.maxRequestsPerHost)); + configureProxy(clientBuilder, builder.proxyOptions); + } + + // SDK behavior is always applied regardless of the transport client, so Auth0 telemetry, rate-limit + // handling, and logging are guaranteed. These interceptors are parameterized by this builder + // (withTelemetry/withLogging/withMaxRetries), which remain effective even when a base client is used. clientBuilder.addInterceptor(getLoggingInterceptor(builder.loggingOptions)); - clientBuilder.addInterceptor(getTelemetryInterceptor(builder.telemetryEnabled)); + clientBuilder.addInterceptor(getTelemetryInterceptor(builder.telemetryEnabled, builder.telemetry)); clientBuilder.addInterceptor(getRateLimitInterceptor(builder.maxRetries)); - clientBuilder.dispatcher(getDispatcher(builder.maxRequests, builder.maxRequestsPerHost)); - configureProxy(clientBuilder, builder.proxyOptions); this.client = clientBuilder.build(); } @@ -243,8 +261,11 @@ public okhttp3.Request authenticate(Route route, @NotNull Response response) { } } - private TelemetryInterceptor getTelemetryInterceptor(boolean telemetryEnabled) { + private TelemetryInterceptor getTelemetryInterceptor(boolean telemetryEnabled, Telemetry telemetry) { TelemetryInterceptor interceptor = new TelemetryInterceptor(); + if (telemetry != null) { + interceptor.setTelemetry(telemetry); + } interceptor.setEnabled(telemetryEnabled); return interceptor; } @@ -279,9 +300,11 @@ public static class Builder { private ProxyOptions proxyOptions; private LoggingOptions loggingOptions; private boolean telemetryEnabled = true; + private Telemetry telemetry; private int maxRetries = 3; private int maxRequests = 64; private int maxRequestsPerHost = 5; + private OkHttpClient baseClient; /** * Sets the value of the read timeout, in seconds. Defaults to ten seconds. A value of zero results in no read timeout. @@ -289,6 +312,7 @@ public static class Builder { * * @param readTimeout the value of the read timeout to use. * @return this builder instance. + * @see #withClient(OkHttpClient) ignored when a base client is supplied. */ public Builder withReadTimeout(int readTimeout) { this.readTimeout = readTimeout; @@ -300,6 +324,7 @@ public Builder withReadTimeout(int readTimeout) { * Negative numbers will be treated as zero. * @param connectTimeout the value of the connect timeout to use. * @return this builder instance. + * @see #withClient(OkHttpClient) ignored when a base client is supplied. */ public Builder withConnectTimeout(int connectTimeout) { this.connectTimeout = connectTimeout; @@ -321,6 +346,7 @@ public Builder withLogging(LoggingOptions loggingOptions) { * * @param proxyOptions the Proxy configuration options * @return this builder instance. + * @see #withClient(OkHttpClient) ignored when a base client is supplied. */ public Builder withProxy(ProxyOptions proxyOptions) { this.proxyOptions = proxyOptions; @@ -337,6 +363,24 @@ public Builder telemetryEnabled(boolean telemetryEnabled) { return this; } + /** + * Configure the telemetry sent to Auth0 on every request. Use this when building an SDK on top of + * auth0-java so that requests are attributed to the wrapping library, with auth0-java reported as the + * underlying library in the telemetry environment. + *

                                                              + * If not set, telemetry defaults to identifying this library as {@code auth0-java}. + * + * @param name the name of the library sending the requests (e.g. the wrapping SDK's name). + * @param version the version of the library sending the requests. + * @return this builder instance. + */ + public Builder withTelemetry(String name, String version) { + Asserts.assertNotNull(name, "name"); + this.telemetry = + new Telemetry(name, version, Telemetry.class.getPackage().getImplementationVersion()); + return this; + } + /** * Sets the maximum number of consecutive retries for API requests that fail due to rate-limits being reached. * By default, rate-limited requests will be retried a maximum of three times. To disable retries on rate-limit @@ -357,6 +401,7 @@ public Builder withMaxRetries(int maxRetries) { * * @param maxRequests the number of requests to execute concurrently. Must be equal to or greater than one. * @return this builder instance. + * @see #withClient(OkHttpClient) ignored when a base client is supplied. */ public Builder withMaxRequests(int maxRequests) { this.maxRequests = maxRequests; @@ -368,12 +413,42 @@ public Builder withMaxRequests(int maxRequests) { * * @param maxRequestsPerHost the maximum number of requests for each host to execute concurrently. Must be equal to or greater than one. * @return this builder instance. + * @see #withClient(OkHttpClient) ignored when a base client is supplied. */ public Builder withMaxRequestsPerHost(int maxRequestsPerHost) { this.maxRequestsPerHost = maxRequestsPerHost; return this; } + /** + * Use an existing {@link OkHttpClient} as the base for this client, reusing all of its + * transport configuration as-is: timeouts, dispatcher, connection pool, cache, + * proxy, and any interceptors already registered on it. + *

                                                              + * When a base client is provided, the transport-related settings on this builder + * ({@link #withReadTimeout(int)}, {@link #withConnectTimeout(int)}, {@link #withMaxRequests(int)}, + * {@link #withMaxRequestsPerHost(int)}, and {@link #withProxy(ProxyOptions)}) are + * ignored. This is deliberate: your client's configuration is never silently + * overridden. Configuring those concerns is your responsibility, on the {@code OkHttpClient} you + * supply. + *

                                                              + *

                                                              + * The SDK's own behavior is always layered on top and cannot be bypassed: the Auth0 telemetry, + * rate-limit handling, and logging interceptors are added to your client. These remain configurable + * via {@link #withTelemetry(String, String)}, {@link #telemetryEnabled(boolean)}, + * {@link #withMaxRetries(int)}, and {@link #withLogging(LoggingOptions)}, which stay effective even + * when a base client is used. + *

                                                              + * + * @param baseClient the {@link OkHttpClient} whose transport configuration should be reused. + * @return this builder instance. + */ + public Builder withClient(OkHttpClient baseClient) { + Asserts.assertNotNull(baseClient, "base client"); + this.baseClient = baseClient; + return this; + } + /** * Create a {@code DefaultHttpClient} from this configured builder. * @return the created {@code DefaultHttpClient}. diff --git a/src/test/java/com/auth0/client/auth/AuthAPITest.java b/src/test/java/com/auth0/client/auth/AuthAPITest.java index 7278a80e..3b000374 100644 --- a/src/test/java/com/auth0/client/auth/AuthAPITest.java +++ b/src/test/java/com/auth0/client/auth/AuthAPITest.java @@ -20,13 +20,16 @@ import com.auth0.net.BaseRequest; import com.auth0.net.Request; import com.auth0.net.SignUpRequest; +import com.auth0.net.Telemetry; import com.auth0.net.TokenRequest; import com.auth0.net.client.Auth0HttpClient; import com.auth0.net.client.Auth0HttpRequest; import com.auth0.net.client.Auth0HttpResponse; +import com.auth0.net.client.DefaultHttpClient; import com.auth0.net.client.HttpMethod; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.FileReader; import java.net.URLDecoder; @@ -34,6 +37,7 @@ import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; +import okhttp3.OkHttpClient; import okhttp3.mockwebserver.RecordedRequest; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -261,6 +265,85 @@ public void shouldCreateUserInfoRequest() throws Exception { assertThat(identities.get(0), hasEntry("isSocial", false)); } + // Telemetry + + private JsonNode decodeTelemetryHeader(RecordedRequest request) throws Exception { + String header = request.getHeader("Auth0-Client"); + assertThat(header, is(notNullValue())); + return ObjectMapperProvider.getMapper().readTree(Base64.getUrlDecoder().decode(header)); + } + + @Test + public void shouldSendDefaultTelemetry() throws Exception { + Request request = api.userInfo("accessToken"); + server.jsonResponse(AUTH_USER_INFO, 200); + request.execute(); + + JsonNode telemetry = decodeTelemetryHeader(server.takeRequest()); + assertThat(telemetry.get("name").asText(), is("auth0-java")); + } + + @Test + public void shouldSendCustomTelemetryWhenConfigured() throws Exception { + AuthAPI customApi = AuthAPI.newBuilder(server.getBaseUrl(), CLIENT_ID, CLIENT_SECRET) + .withHttpClient(DefaultHttpClient.newBuilder() + .withTelemetry("my-wrapper-sdk", "1.2.3") + .build()) + .build(); + + Request request = customApi.userInfo("accessToken"); + server.jsonResponse(AUTH_USER_INFO, 200); + request.execute(); + + JsonNode telemetry = decodeTelemetryHeader(server.takeRequest()); + assertThat(telemetry.get("name").asText(), is("my-wrapper-sdk")); + assertThat(telemetry.get("version").asText(), is("1.2.3")); + } + + @Test + public void shouldReuseBaseClientAndPreserveSdkBehavior() throws Exception { + OkHttpClient baseClient = new OkHttpClient.Builder() + .addInterceptor(chain -> chain.proceed(chain.request() + .newBuilder() + .addHeader("X-Custom-Base", "base-client") + .build())) + .build(); + + AuthAPI customApi = AuthAPI.newBuilder(server.getBaseUrl(), CLIENT_ID, CLIENT_SECRET) + .withHttpClient( + DefaultHttpClient.newBuilder().withClient(baseClient).build()) + .build(); + + Request request = customApi.userInfo("accessToken"); + server.jsonResponse(AUTH_USER_INFO, 200); + request.execute(); + + RecordedRequest recordedRequest = server.takeRequest(); + // The base client's interceptor is carried over via newBuilder(), so the user's config is preserved. + assertThat(recordedRequest.getHeader("X-Custom-Base"), is("base-client")); + // SDK behavior (telemetry) is still layered on top, so integrity is preserved. + assertThat(recordedRequest.getHeader("Auth0-Client"), is(notNullValue())); + } + + @Test + public void shouldNestAuth0JavaInTelemetryEnv() throws Exception { + String value = new Telemetry("my-wrapper-sdk", "1.2.3", "auth0-java-9.9.9").getValue(); + + JsonNode telemetry = + ObjectMapperProvider.getMapper().readTree(Base64.getUrlDecoder().decode(value)); + assertThat(telemetry.get("name").asText(), is("my-wrapper-sdk")); + assertThat(telemetry.get("version").asText(), is("1.2.3")); + assertThat(telemetry.get("env").get("auth0-java").asText(), is("auth0-java-9.9.9")); + } + + @Test + public void shouldThrowWhenTelemetryNameIsNull() { + verifyThrows( + IllegalArgumentException.class, + () -> DefaultHttpClient.newBuilder().withTelemetry(null, "1.2.3"), + "'name' cannot be null!"); + } + // Reset Password @Test @@ -1041,21 +1124,110 @@ public void shouldCreateTokenExchangeRequestWithClientAssertion() throws Excepti public void shouldThrowOnGetTokenForConnectionWithNullConnection() { verifyThrows( IllegalArgumentException.class, - () -> api.getTokenForConnection(null, "test-refresh-token", null), + () -> api.getTokenForConnection( + null, "test-token", "urn:ietf:params:oauth:token-type:refresh_token", null), "'connection' cannot be null!"); } @Test - public void shouldThrowOnGetTokenForConnectionWithNullRefreshToken() { + public void shouldThrowOnGetTokenForConnectionWithNullSubjectToken() { + verifyThrows( + IllegalArgumentException.class, + () -> api.getTokenForConnection( + "google-oauth2", null, "urn:ietf:params:oauth:token-type:refresh_token", null), + "'subject token' cannot be null!"); + } + + @Test + public void shouldThrowOnGetTokenForConnectionWithNullSubjectTokenType() { verifyThrows( IllegalArgumentException.class, - () -> api.getTokenForConnection("google-oauth2", null, null), + () -> api.getTokenForConnection("google-oauth2", "test-token", null, null), + "'subject token type' cannot be null!"); + } + + @Test + public void shouldCreateGetTokenForConnectionRequestWithCustomSubjectTokenType() throws Exception { + TokenRequest request = + api.getTokenForConnection("google-oauth2", "test-token", "urn:example:token-type:custom", null); + assertThat(request, is(notNullValue())); + + server.jsonResponse(AUTH_TOKENS, 200); + TokenHolder response = request.execute().getBody(); + RecordedRequest recordedRequest = server.takeRequest(); + + assertThat(recordedRequest, hasMethodAndPath(HttpMethod.POST, "/oauth/token")); + assertThat(recordedRequest, hasHeader("Content-Type", "application/json")); + + Map body = bodyFromRequest(recordedRequest); + assertThat( + body, + hasEntry( + "grant_type", + "urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token")); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("client_secret", CLIENT_SECRET)); + assertThat(body, hasEntry("subject_token", "test-token")); + assertThat(body, hasEntry("subject_token_type", "urn:example:token-type:custom")); + assertThat( + body, + hasEntry( + "requested_token_type", "http://auth0.com/oauth/token-type/federated-connection-access-token")); + assertThat(body, hasEntry("connection", "google-oauth2")); + assertThat(body, not(hasKey("login_hint"))); + + assertThat(response, is(notNullValue())); + assertThat(response.getAccessToken(), not(emptyOrNullString())); + } + + @Test + public void shouldCreateGetTokenForConnectionRequestWithLoginHint() throws Exception { + TokenRequest request = api.getTokenForConnection( + "google-oauth2", "test-token", "urn:example:token-type:custom", "google-user-id"); + assertThat(request, is(notNullValue())); + + server.jsonResponse(AUTH_TOKENS, 200); + TokenHolder response = request.execute().getBody(); + RecordedRequest recordedRequest = server.takeRequest(); + + Map body = bodyFromRequest(recordedRequest); + assertThat(body, hasEntry("subject_token", "test-token")); + assertThat(body, hasEntry("subject_token_type", "urn:example:token-type:custom")); + assertThat(body, hasEntry("connection", "google-oauth2")); + assertThat(body, hasEntry("login_hint", "google-user-id")); + + assertThat(response, is(notNullValue())); + assertThat(response.getAccessToken(), not(emptyOrNullString())); + } + + @Test + public void getTokenForConnectionRequiresClientAuthentication() { + verifyThrows( + IllegalStateException.class, + () -> apiNoClientAuthentication.getTokenForConnection( + "google-oauth2", "test-token", "urn:ietf:params:oauth:token-type:refresh_token", null), + "A client secret or client assertion signing key is required for this operation"); + } + + @Test + public void shouldThrowOnGetTokenForConnectionWithRefreshTokenWithNullConnection() { + verifyThrows( + IllegalArgumentException.class, + () -> api.getTokenForConnectionWithRefreshToken(null, "test-refresh-token", null), + "'connection' cannot be null!"); + } + + @Test + public void shouldThrowOnGetTokenForConnectionWithRefreshTokenWithNullRefreshToken() { + verifyThrows( + IllegalArgumentException.class, + () -> api.getTokenForConnectionWithRefreshToken("google-oauth2", null, null), "'refresh token' cannot be null!"); } @Test - public void shouldCreateGetTokenForConnectionRequest() throws Exception { - TokenRequest request = api.getTokenForConnection("google-oauth2", "test-refresh-token", null); + public void shouldCreateGetTokenForConnectionWithRefreshTokenRequest() throws Exception { + TokenRequest request = api.getTokenForConnectionWithRefreshToken("google-oauth2", "test-refresh-token", null); assertThat(request, is(notNullValue())); server.jsonResponse(AUTH_TOKENS, 200); @@ -1087,7 +1259,35 @@ public void shouldCreateGetTokenForConnectionRequest() throws Exception { } @Test - public void shouldCreateGetTokenForConnectionRequestWithLoginHint() throws Exception { + public void shouldCreateGetTokenForConnectionWithRefreshTokenRequestWithLoginHint() throws Exception { + TokenRequest request = + api.getTokenForConnectionWithRefreshToken("google-oauth2", "test-refresh-token", "google-user-id"); + assertThat(request, is(notNullValue())); + + server.jsonResponse(AUTH_TOKENS, 200); + TokenHolder response = request.execute().getBody(); + RecordedRequest recordedRequest = server.takeRequest(); + + Map body = bodyFromRequest(recordedRequest); + assertThat(body, hasEntry("connection", "google-oauth2")); + assertThat(body, hasEntry("login_hint", "google-user-id")); + + assertThat(response, is(notNullValue())); + assertThat(response.getAccessToken(), not(emptyOrNullString())); + } + + @Test + public void getTokenForConnectionWithRefreshTokenRequiresClientAuthentication() { + verifyThrows( + IllegalStateException.class, + () -> apiNoClientAuthentication.getTokenForConnectionWithRefreshToken( + "google-oauth2", "test-refresh-token", null), + "A client secret or client assertion signing key is required for this operation"); + } + + @Test + @SuppressWarnings("deprecation") + public void deprecatedGetTokenForConnectionExchangesRefreshToken() throws Exception { TokenRequest request = api.getTokenForConnection("google-oauth2", "test-refresh-token", "google-user-id"); assertThat(request, is(notNullValue())); @@ -1096,6 +1296,8 @@ public void shouldCreateGetTokenForConnectionRequestWithLoginHint() throws Excep RecordedRequest recordedRequest = server.takeRequest(); Map body = bodyFromRequest(recordedRequest); + assertThat(body, hasEntry("subject_token", "test-refresh-token")); + assertThat(body, hasEntry("subject_token_type", "urn:ietf:params:oauth:token-type:refresh_token")); assertThat(body, hasEntry("connection", "google-oauth2")); assertThat(body, hasEntry("login_hint", "google-user-id")); @@ -1104,10 +1306,78 @@ public void shouldCreateGetTokenForConnectionRequestWithLoginHint() throws Excep } @Test - public void getTokenForConnectionRequiresClientAuthentication() { + public void shouldThrowOnGetTokenForConnectionWithAccessTokenWithNullConnection() { + verifyThrows( + IllegalArgumentException.class, + () -> api.getTokenForConnectionWithAccessToken(null, "test-access-token", null), + "'connection' cannot be null!"); + } + + @Test + public void shouldThrowOnGetTokenForConnectionWithAccessTokenWithNullAccessToken() { + verifyThrows( + IllegalArgumentException.class, + () -> api.getTokenForConnectionWithAccessToken("google-oauth2", null, null), + "'access token' cannot be null!"); + } + + @Test + public void shouldCreateGetTokenForConnectionWithAccessTokenRequest() throws Exception { + TokenRequest request = api.getTokenForConnectionWithAccessToken("google-oauth2", "test-access-token", null); + assertThat(request, is(notNullValue())); + + server.jsonResponse(AUTH_TOKENS, 200); + TokenHolder response = request.execute().getBody(); + RecordedRequest recordedRequest = server.takeRequest(); + + assertThat(recordedRequest, hasMethodAndPath(HttpMethod.POST, "/oauth/token")); + assertThat(recordedRequest, hasHeader("Content-Type", "application/json")); + + Map body = bodyFromRequest(recordedRequest); + assertThat( + body, + hasEntry( + "grant_type", + "urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token")); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("client_secret", CLIENT_SECRET)); + assertThat(body, hasEntry("subject_token", "test-access-token")); + assertThat(body, hasEntry("subject_token_type", "urn:ietf:params:oauth:token-type:access_token")); + assertThat( + body, + hasEntry( + "requested_token_type", "http://auth0.com/oauth/token-type/federated-connection-access-token")); + assertThat(body, hasEntry("connection", "google-oauth2")); + assertThat(body, not(hasKey("login_hint"))); + + assertThat(response, is(notNullValue())); + assertThat(response.getAccessToken(), not(emptyOrNullString())); + } + + @Test + public void shouldCreateGetTokenForConnectionWithAccessTokenRequestWithLoginHint() throws Exception { + TokenRequest request = + api.getTokenForConnectionWithAccessToken("google-oauth2", "test-access-token", "google-user-id"); + assertThat(request, is(notNullValue())); + + server.jsonResponse(AUTH_TOKENS, 200); + TokenHolder response = request.execute().getBody(); + RecordedRequest recordedRequest = server.takeRequest(); + + Map body = bodyFromRequest(recordedRequest); + assertThat(body, hasEntry("connection", "google-oauth2")); + assertThat(body, hasEntry("login_hint", "google-user-id")); + + assertThat(response, is(notNullValue())); + assertThat(response.getAccessToken(), not(emptyOrNullString())); + } + + @Test + public void getTokenForConnectionWithAccessTokenRequiresClientAuthentication() { verifyThrows( IllegalStateException.class, - () -> apiNoClientAuthentication.getTokenForConnection("google-oauth2", "test-refresh-token", null), + () -> apiNoClientAuthentication.getTokenForConnectionWithAccessToken( + "google-oauth2", "test-access-token", null), "A client secret or client assertion signing key is required for this operation"); } diff --git a/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java index 7fa7b9ed..ff431cf2 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java @@ -2,7 +2,6 @@ import com.auth0.client.mgmt.actions.modules.types.GetActionModuleVersionsRequestParameters; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ActionModuleVersion; import com.auth0.client.mgmt.types.CreateActionModuleVersionResponseContent; @@ -50,8 +49,8 @@ public void testList() throws Exception { .list( "id", GetActionModuleVersionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) + .page(1) + .perPage(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java index f772b44e..b7a09008 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java @@ -6,7 +6,6 @@ import com.auth0.client.mgmt.actions.types.RollbackActionModuleRequestParameters; import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ActionModuleAction; import com.auth0.client.mgmt.types.ActionModuleListItem; @@ -54,8 +53,8 @@ public void testList() throws Exception { SyncPagingIterable response = client.actions() .modules() .list(GetActionModulesRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) + .page(1) + .perPage(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -396,8 +395,8 @@ public void testListActions() throws Exception { .listActions( "id", GetActionModuleActionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) + .page(1) + .perPage(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java index a6a673b8..ae17c722 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java @@ -3,7 +3,6 @@ import com.auth0.client.mgmt.actions.triggers.types.ListActionTriggerBindingsRequestParameters; import com.auth0.client.mgmt.actions.triggers.types.UpdateActionBindingsRequestContent; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ActionBinding; import com.auth0.client.mgmt.types.ActionTriggerTypeEnum; @@ -51,8 +50,8 @@ public void testList() throws Exception { .list( ActionTriggerTypeEnum.POST_LOGIN, ListActionTriggerBindingsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) + .page(1) + .perPage(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java index 519274b6..b33e1bc9 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java @@ -5,6 +5,7 @@ import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ActionVersion; +import com.auth0.client.mgmt.types.DeployActionVersionRequestContent; import com.auth0.client.mgmt.types.DeployActionVersionResponseContent; import com.auth0.client.mgmt.types.GetActionVersionResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -49,8 +50,8 @@ public void testList() throws Exception { .list( "actionId", ListActionVersionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) + .page(1) + .perPage(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -113,8 +114,13 @@ public void testDeploy() throws Exception { server.enqueue(new MockResponse() .setResponseCode(200) .setBody(TestResources.loadResource("/wire-tests/ActionsVersionsWireTest_testDeploy_response.json"))); - DeployActionVersionResponseContent response = - client.actions().versions().deploy("actionId", "id", OptionalNullable.absent()); + DeployActionVersionResponseContent response = client.actions() + .versions() + .deploy( + "actionId", + "id", + OptionalNullable.of( + DeployActionVersionRequestContent.builder().build())); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java index 424ad76d..c293b9be 100644 --- a/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Action; import com.auth0.client.mgmt.types.ActionTrigger; @@ -57,12 +56,12 @@ public void testList() throws Exception { "{\"total\":1.1,\"page\":1.1,\"per_page\":1.1,\"actions\":[{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"post-login\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"code\":\"code\",\"dependencies\":[{}],\"runtime\":\"runtime\",\"secrets\":[{}],\"installed_integration_id\":\"installed_integration_id\",\"status\":\"pending\",\"built_at\":\"2024-01-15T09:30:00Z\",\"deploy\":true,\"modules\":[{}]}]}")); SyncPagingIterable response = client.actions() .list(ListActionsRequestParameters.builder() - .triggerId(OptionalNullable.of(ActionTriggerTypeEnum.POST_LOGIN)) - .actionName(OptionalNullable.of("actionName")) - .deployed(OptionalNullable.of(true)) - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .installed(OptionalNullable.of(true)) + .triggerId(ActionTriggerTypeEnum.POST_LOGIN) + .actionName("actionName") + .deployed(true) + .page(1) + .perPage(1) + .installed(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -214,9 +213,7 @@ public void testDelete() throws Exception { client.actions() .delete( "id", - DeleteActionRequestParameters.builder() - .force(OptionalNullable.of(true)) - .build()); + DeleteActionRequestParameters.builder().force(true).build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("DELETE", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/AgentsWireTest.java b/src/test/java/com/auth0/client/mgmt/AgentsWireTest.java new file mode 100644 index 00000000..e8e2dcb7 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/AgentsWireTest.java @@ -0,0 +1,329 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.AgentResponseContent; +import com.auth0.client.mgmt.types.CreateAgentRequestContent; +import com.auth0.client.mgmt.types.ListAgentsRequestParameters; +import com.auth0.client.mgmt.types.PatchAgentRequestParameters; +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 AgentsWireTest { + 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( + "{\"agents\":[{\"agent_id\":\"agent_id\",\"name\":\"name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"external_agent_id\":\"external_agent_id\",\"metadata\":{\"key\":\"value\"}}],\"next\":\"next\"}")); + SyncPagingIterable response = client.agents() + .list(ListAgentsRequestParameters.builder().from("from").take(1).build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"agent_id\":\"agent_id\",\"name\":\"name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"external_agent_id\":\"external_agent_id\",\"metadata\":{\"key\":\"value\"}}")); + AgentResponseContent response = client.agents() + .create(CreateAgentRequestContent.builder().name("name").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" + "}"; + 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" + + " \"agent_id\": \"agent_id\",\n" + + " \"name\": \"name\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"external_agent_id\": \"external_agent_id\",\n" + + " \"metadata\": {\n" + + " \"key\": \"value\"\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 testRead() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"agent_id\":\"agent_id\",\"name\":\"name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"external_agent_id\":\"external_agent_id\",\"metadata\":{\"key\":\"value\"}}")); + AgentResponseContent response = client.agents().read("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" + + " \"agent_id\": \"agent_id\",\n" + + " \"name\": \"name\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"external_agent_id\": \"external_agent_id\",\n" + + " \"metadata\": {\n" + + " \"key\": \"value\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.agents().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"agent_id\":\"agent_id\",\"name\":\"name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"external_agent_id\":\"external_agent_id\",\"metadata\":{\"key\":\"value\"}}")); + AgentResponseContent response = client.agents() + .update("id", PatchAgentRequestParameters.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"agent_id\": \"agent_id\",\n" + + " \"name\": \"name\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"external_agent_id\": \"external_agent_id\",\n" + + " \"metadata\": {\n" + + " \"key\": \"value\"\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"); + } + } + + /** + * 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/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java index 2a2a4556..c5839361 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java @@ -40,7 +40,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"mode\":\"count_per_identifier_and_ip\",\"max_attempts\":1}")); + "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"mode\":\"count_per_identifier_and_ip\",\"form_submission_mode\":\"auto\",\"max_attempts\":1}")); GetBruteForceSettingsResponseContent response = client.attackProtection().bruteForceProtection().get(); RecordedRequest request = server.takeRequest(); @@ -60,6 +60,7 @@ public void testGet() throws Exception { + " \"allowlist\"\n" + " ],\n" + " \"mode\": \"count_per_identifier_and_ip\",\n" + + " \"form_submission_mode\": \"auto\",\n" + " \"max_attempts\": 1\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -99,7 +100,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"mode\":\"count_per_identifier_and_ip\",\"max_attempts\":1}")); + "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"mode\":\"count_per_identifier_and_ip\",\"form_submission_mode\":\"auto\",\"max_attempts\":1}")); UpdateBruteForceSettingsResponseContent response = client.attackProtection() .bruteForceProtection() .update(UpdateBruteForceSettingsRequestContent.builder().build()); @@ -149,6 +150,7 @@ else if (actualJson.has("kind")) + " \"allowlist\"\n" + " ],\n" + " \"mode\": \"count_per_identifier_and_ip\",\n" + + " \"form_submission_mode\": \"auto\",\n" + " \"max_attempts\": 1\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java index 7caa8b9a..5a75a05e 100644 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java @@ -40,7 +40,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"stage\":{\"pre-login\":{\"max_attempts\":1,\"rate\":1},\"pre-user-registration\":{\"max_attempts\":1,\"rate\":1}}}")); + "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"stage\":{\"pre-login\":{\"max_attempts\":1,\"rate\":1},\"pre-user-registration\":{\"max_attempts\":1,\"rate\":1},\"pre-custom-token-exchange\":{\"max_attempts\":1,\"rate\":1}}}")); GetSuspiciousIpThrottlingSettingsResponseContent response = client.attackProtection().suspiciousIpThrottling().get(); RecordedRequest request = server.takeRequest(); @@ -67,6 +67,10 @@ public void testGet() throws Exception { + " \"pre-user-registration\": {\n" + " \"max_attempts\": 1,\n" + " \"rate\": 1\n" + + " },\n" + + " \"pre-custom-token-exchange\": {\n" + + " \"max_attempts\": 1,\n" + + " \"rate\": 1\n" + " }\n" + " }\n" + "}"; @@ -107,7 +111,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"stage\":{\"pre-login\":{\"max_attempts\":1,\"rate\":1},\"pre-user-registration\":{\"max_attempts\":1,\"rate\":1}}}")); + "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"stage\":{\"pre-login\":{\"max_attempts\":1,\"rate\":1},\"pre-user-registration\":{\"max_attempts\":1,\"rate\":1},\"pre-custom-token-exchange\":{\"max_attempts\":1,\"rate\":1}}}")); UpdateSuspiciousIpThrottlingSettingsResponseContent response = client.attackProtection() .suspiciousIpThrottling() .update(UpdateSuspiciousIpThrottlingSettingsRequestContent.builder() @@ -165,6 +169,10 @@ else if (actualJson.has("kind")) + " \"pre-user-registration\": {\n" + " \"max_attempts\": 1,\n" + " \"rate\": 1\n" + + " },\n" + + " \"pre-custom-token-exchange\": {\n" + + " \"max_attempts\": 1,\n" + + " \"rate\": 1\n" + " }\n" + " }\n" + "}"; diff --git a/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java index 24bbe8ac..ec5c46d1 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java @@ -5,7 +5,6 @@ import com.auth0.client.mgmt.branding.phone.types.ListBrandingPhoneProvidersRequestParameters; import com.auth0.client.mgmt.branding.phone.types.UpdateBrandingPhoneProviderRequestContent; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.CreateBrandingPhoneProviderResponseContent; import com.auth0.client.mgmt.types.CreatePhoneProviderSendTestResponseContent; import com.auth0.client.mgmt.types.GetBrandingPhoneProviderResponseContent; @@ -55,7 +54,7 @@ public void testList() throws Exception { .phone() .providers() .list(ListBrandingPhoneProvidersRequestParameters.builder() - .disabled(OptionalNullable.of(true)) + .disabled(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java index f4ff1e23..52fe39f7 100644 --- a/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java @@ -5,7 +5,6 @@ import com.auth0.client.mgmt.branding.phone.types.ListPhoneTemplatesRequestParameters; import com.auth0.client.mgmt.branding.phone.types.UpdatePhoneTemplateRequestContent; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.CreatePhoneTemplateResponseContent; import com.auth0.client.mgmt.types.CreatePhoneTemplateTestNotificationResponseContent; import com.auth0.client.mgmt.types.GetPhoneTemplateResponseContent; @@ -55,7 +54,7 @@ public void testList() throws Exception { .phone() .templates() .list(ListPhoneTemplatesRequestParameters.builder() - .disabled(OptionalNullable.of(true)) + .disabled(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java index ba082da0..f1d28974 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java @@ -2,7 +2,6 @@ import com.auth0.client.mgmt.clientgrants.types.ListClientGrantOrganizationsRequestParameters; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Organization; import com.fasterxml.jackson.databind.JsonNode; @@ -41,14 +40,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"next\":\"next\",\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}}}]}")); + "{\"next\":\"next\",\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true}]}")); SyncPagingIterable response = client.clientGrants() .organizations() .list( "id", ListClientGrantOrganizationsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java index 0afed0d6..f749e3b1 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java @@ -1,15 +1,17 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ClientGrantDefaultForEnum; import com.auth0.client.mgmt.types.ClientGrantResponseContent; +import com.auth0.client.mgmt.types.ClientGrantSortFieldEnum; import com.auth0.client.mgmt.types.ClientGrantSubjectTypeEnum; import com.auth0.client.mgmt.types.CreateClientGrantRequestContent; import com.auth0.client.mgmt.types.CreateClientGrantResponseContent; import com.auth0.client.mgmt.types.GetClientGrantResponseContent; import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchClientGrantsRequestParameters; +import com.auth0.client.mgmt.types.SearchParserEnum; import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -51,13 +53,14 @@ public void testList() throws Exception { "{\"next\":\"next\",\"client_grants\":[{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"default_for\":\"third_party_clients\",\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}]}")); SyncPagingIterable response = client.clientGrants() .list(ListClientGrantsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .audience(OptionalNullable.of("audience")) - .clientId(OptionalNullable.of("client_id")) - .allowAnyOrganization(OptionalNullable.of(true)) - .subjectType(OptionalNullable.of(ClientGrantSubjectTypeEnum.CLIENT)) - .defaultFor(OptionalNullable.of(ClientGrantDefaultForEnum.THIRD_PARTY_CLIENTS)) + .includeTotals(true) + .from("from") + .take(1) + .audience("audience") + .clientId("client_id") + .allowAnyOrganization(true) + .subjectType(ClientGrantSubjectTypeEnum.CLIENT) + .defaultFor(ClientGrantDefaultForEnum.THIRD_PARTY_CLIENTS) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -165,6 +168,33 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testSearch() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"client_grants\":[{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"default_for\":\"third_party_clients\",\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}],\"next\":\"next\"}")); + SyncPagingIterable response = client.clientGrants() + .search(SearchClientGrantsRequestParameters.builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .fields("fields") + .includeFields(true) + .take(1) + .from("from") + .sort(ClientGrantSortFieldEnum.AUDIENCE) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + @Test public void testGet() throws Exception { server.enqueue( diff --git a/src/test/java/com/auth0/client/mgmt/ClientProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientProfilesWireTest.java new file mode 100644 index 00000000..53936b3c --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/ClientProfilesWireTest.java @@ -0,0 +1,418 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ClientProfile; +import com.auth0.client.mgmt.types.ClientProfileApplyPolicy; +import com.auth0.client.mgmt.types.ClientProfileApplyPolicyExternalMetadataCreatedByEnum; +import com.auth0.client.mgmt.types.ClientProfileApplyPolicyExternalMetadataTypeEnum; +import com.auth0.client.mgmt.types.ClientProfileClientConfiguration; +import com.auth0.client.mgmt.types.CreateClientProfileRequestContent; +import com.auth0.client.mgmt.types.ListClientProfilesRequestParameters; +import com.auth0.client.mgmt.types.UpdateClientProfileRequestContent; +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 ClientProfilesWireTest { + 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( + "{\"next\":\"next\",\"client_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"client_configuration\":{},\"apply_policy\":{\"external_metadata_type\":\"cimd\",\"external_metadata_created_by\":\"client\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); + SyncPagingIterable response = client.clientProfiles() + .list(ListClientProfilesRequestParameters.builder() + .from("from") + .take(1) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"client_configuration\":{\"organization_usage\":{\"default_value\":\"deny\"},\"organization_require_behavior\":{\"default_value\":\"no_prompt\"},\"organization_discovery_methods\":{\"default_value\":[\"email\"]},\"require_proof_of_possession\":{\"default_value\":true},\"oidc_support\":{\"default_value\":{\"is_allowed\":true}}},\"apply_policy\":{\"external_metadata_type\":\"cimd\",\"external_metadata_created_by\":\"client\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + ClientProfile response = client.clientProfiles() + .create(CreateClientProfileRequestContent.builder() + .name("name") + .clientConfiguration( + ClientProfileClientConfiguration.builder().build()) + .applyPolicy(ClientProfileApplyPolicy.builder() + .externalMetadataType(ClientProfileApplyPolicyExternalMetadataTypeEnum.CIMD) + .externalMetadataCreatedBy(ClientProfileApplyPolicyExternalMetadataCreatedByEnum.CLIENT) + .build()) + .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" + + " \"client_configuration\": {},\n" + + " \"apply_policy\": {\n" + + " \"external_metadata_type\": \"cimd\",\n" + + " \"external_metadata_created_by\": \"client\"\n" + + " }\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" + + " \"description\": \"description\",\n" + + " \"client_configuration\": {\n" + + " \"organization_usage\": {\n" + + " \"default_value\": \"deny\"\n" + + " },\n" + + " \"organization_require_behavior\": {\n" + + " \"default_value\": \"no_prompt\"\n" + + " },\n" + + " \"organization_discovery_methods\": {\n" + + " \"default_value\": [\n" + + " \"email\"\n" + + " ]\n" + + " },\n" + + " \"require_proof_of_possession\": {\n" + + " \"default_value\": true\n" + + " },\n" + + " \"oidc_support\": {\n" + + " \"default_value\": {\n" + + " \"is_allowed\": true\n" + + " }\n" + + " }\n" + + " },\n" + + " \"apply_policy\": {\n" + + " \"external_metadata_type\": \"cimd\",\n" + + " \"external_metadata_created_by\": \"client\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"description\":\"description\",\"client_configuration\":{\"organization_usage\":{\"default_value\":\"deny\"},\"organization_require_behavior\":{\"default_value\":\"no_prompt\"},\"organization_discovery_methods\":{\"default_value\":[\"email\"]},\"require_proof_of_possession\":{\"default_value\":true},\"oidc_support\":{\"default_value\":{\"is_allowed\":true}}},\"apply_policy\":{\"external_metadata_type\":\"cimd\",\"external_metadata_created_by\":\"client\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + ClientProfile response = client.clientProfiles().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" + + " \"description\": \"description\",\n" + + " \"client_configuration\": {\n" + + " \"organization_usage\": {\n" + + " \"default_value\": \"deny\"\n" + + " },\n" + + " \"organization_require_behavior\": {\n" + + " \"default_value\": \"no_prompt\"\n" + + " },\n" + + " \"organization_discovery_methods\": {\n" + + " \"default_value\": [\n" + + " \"email\"\n" + + " ]\n" + + " },\n" + + " \"require_proof_of_possession\": {\n" + + " \"default_value\": true\n" + + " },\n" + + " \"oidc_support\": {\n" + + " \"default_value\": {\n" + + " \"is_allowed\": true\n" + + " }\n" + + " }\n" + + " },\n" + + " \"apply_policy\": {\n" + + " \"external_metadata_type\": \"cimd\",\n" + + " \"external_metadata_created_by\": \"client\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.clientProfiles().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"client_configuration\":{\"organization_usage\":{\"default_value\":\"deny\"},\"organization_require_behavior\":{\"default_value\":\"no_prompt\"},\"organization_discovery_methods\":{\"default_value\":[\"email\"]},\"require_proof_of_possession\":{\"default_value\":true},\"oidc_support\":{\"default_value\":{\"is_allowed\":true}}},\"apply_policy\":{\"external_metadata_type\":\"cimd\",\"external_metadata_created_by\":\"client\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + ClientProfile response = client.clientProfiles() + .update("id", UpdateClientProfileRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"description\": \"description\",\n" + + " \"client_configuration\": {\n" + + " \"organization_usage\": {\n" + + " \"default_value\": \"deny\"\n" + + " },\n" + + " \"organization_require_behavior\": {\n" + + " \"default_value\": \"no_prompt\"\n" + + " },\n" + + " \"organization_discovery_methods\": {\n" + + " \"default_value\": [\n" + + " \"email\"\n" + + " ]\n" + + " },\n" + + " \"require_proof_of_possession\": {\n" + + " \"default_value\": true\n" + + " },\n" + + " \"oidc_support\": {\n" + + " \"default_value\": {\n" + + " \"is_allowed\": true\n" + + " }\n" + + " }\n" + + " },\n" + + " \"apply_policy\": {\n" + + " \"external_metadata_type\": \"cimd\",\n" + + " \"external_metadata_created_by\": \"client\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java index db3475f6..1c7a502e 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java @@ -2,7 +2,6 @@ import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectionForList; import com.auth0.client.mgmt.types.ConnectionStrategyEnum; @@ -43,16 +42,16 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true},\"cross_app_access_requesting_app\":{\"active\":true}}],\"next\":\"next\"}")); + "{\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true},\"cross_app_access_requesting_app\":{\"active\":true},\"cross_app_access_resource_app\":{\"status\":\"enabled\"}}],\"next\":\"next\"}")); SyncPagingIterable response = client.clients() .connections() .get( "id", ConnectionsGetRequest.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .strategy(Arrays.asList(ConnectionStrategyEnum.AD)) .build()); RecordedRequest request = server.takeRequest(); diff --git a/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java index 9daf459c..f8dc20e4 100644 --- a/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java @@ -1,9 +1,10 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Client; +import com.auth0.client.mgmt.types.ClientSearchResponse; +import com.auth0.client.mgmt.types.ClientSortFieldEnum; import com.auth0.client.mgmt.types.CreateClientRequestContent; import com.auth0.client.mgmt.types.CreateClientResponseContent; import com.auth0.client.mgmt.types.GetClientRequestParameters; @@ -14,6 +15,8 @@ import com.auth0.client.mgmt.types.RegisterCimdClientRequestContent; import com.auth0.client.mgmt.types.RegisterCimdClientResponseContent; import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; +import com.auth0.client.mgmt.types.SearchClientsRequestParameters; +import com.auth0.client.mgmt.types.SearchParserEnum; import com.auth0.client.mgmt.types.UpdateClientRequestContent; import com.auth0.client.mgmt.types.UpdateClientResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -53,16 +56,17 @@ public void testList() throws Exception { .setBody(TestResources.loadResource("/wire-tests/ClientsWireTest_testList_response.json"))); SyncPagingIterable response = client.clients() .list(ListClientsRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .isGlobal(OptionalNullable.of(true)) - .isFirstParty(OptionalNullable.of(true)) - .appType(OptionalNullable.of("app_type")) - .externalClientId(OptionalNullable.of("external_client_id")) - .q(OptionalNullable.of("q")) + .fields("fields") + .includeFields(true) + .page(1) + .perPage(1) + .includeTotals(true) + .isGlobal(true) + .isFirstParty(true) + .appType("app_type") + .externalClientId("external_client_id") + .agentId("agent_id") + .q("q") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -156,7 +160,7 @@ public void testPreviewCimdMetadata() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"client_id\":\"client_id\",\"errors\":[\"errors\"],\"validation\":{\"valid\":true,\"violations\":[\"violations\"],\"warnings\":[\"warnings\"]},\"mapped_fields\":{\"external_client_id\":\"external_client_id\",\"name\":\"name\",\"app_type\":\"app_type\",\"callbacks\":[\"callbacks\"],\"logo_uri\":\"logo_uri\",\"description\":\"description\",\"grant_types\":[\"grant_types\"],\"token_endpoint_auth_method\":\"token_endpoint_auth_method\",\"jwks_uri\":\"jwks_uri\",\"client_authentication_methods\":{\"private_key_jwt\":{\"credentials\":[{\"credential_type\":\"credential_type\",\"kid\":\"kid\",\"alg\":\"alg\"}]}}}}")); + "{\"client_id\":\"client_id\",\"external_metadata_created_by\":\"admin\",\"errors\":[\"errors\"],\"validation\":{\"valid\":true,\"violations\":[\"violations\"],\"warnings\":[\"warnings\"]},\"mapped_fields\":{\"external_client_id\":\"external_client_id\",\"name\":\"name\",\"app_type\":\"app_type\",\"callbacks\":[\"callbacks\"],\"logo_uri\":\"logo_uri\",\"description\":\"description\",\"grant_types\":[\"grant_types\"],\"token_endpoint_auth_method\":\"token_endpoint_auth_method\",\"jwks_uri\":\"jwks_uri\",\"client_authentication_methods\":{\"private_key_jwt\":{\"credentials\":[{\"credential_type\":\"credential_type\",\"kid\":\"kid\",\"alg\":\"alg\"}]}}}}")); PreviewCimdMetadataResponseContent response = client.clients() .previewCimdMetadata(PreviewCimdMetadataRequestContent.builder() .externalClientId("external_client_id") @@ -200,6 +204,7 @@ else if (actualJson.has("kind")) String expectedResponseBody = "" + "{\n" + " \"client_id\": \"client_id\",\n" + + " \"external_metadata_created_by\": \"admin\",\n" + " \"errors\": [\n" + " \"errors\"\n" + " ],\n" @@ -387,6 +392,31 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testSearch() throws Exception { + server.enqueue(new MockResponse() + .setResponseCode(200) + .setBody(TestResources.loadResource("/wire-tests/ClientsWireTest_testSearch_response.json"))); + SyncPagingIterable response = client.clients() + .search(SearchClientsRequestParameters.builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .fields("fields") + .includeFields(true) + .take(1) + .from("from") + .sort(ClientSortFieldEnum.NAME) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + @Test public void testGet() throws Exception { server.enqueue(new MockResponse() @@ -396,8 +426,8 @@ public void testGet() throws Exception { .get( "id", GetClientRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java index 5fd615de..48430e8d 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectionProfile; import com.auth0.client.mgmt.types.CreateConnectionProfileRequestContent; @@ -48,11 +47,11 @@ 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(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -203,7 +202,7 @@ public void testGetTemplate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"display_name\":\"display_name\",\"template\":{\"name\":\"name\",\"organization\":{\"show_as_button\":\"none\",\"assign_membership_on_login\":\"none\"},\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"]}}")); + "{\"id\":\"id\",\"display_name\":\"display_name\",\"template\":{\"name\":\"name\",\"organization\":{\"show_as_button\":\"none\",\"assign_membership_on_login\":\"none\"},\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"],\"provisioning\":{\"scim\":{\"tokens\":{\"scopes\":[\"get:users\"]}},\"google_workspace\":{\"sync_users\":true}}}}")); GetConnectionProfileTemplateResponseContent response = client.connectionProfiles().getTemplate("id"); RecordedRequest request = server.takeRequest(); @@ -226,7 +225,19 @@ public void testGetTemplate() throws Exception { + " \"connection_name_prefix_template\": \"connection_name_prefix_template\",\n" + " \"enabled_features\": [\n" + " \"scim\"\n" - + " ]\n" + + " ],\n" + + " \"provisioning\": {\n" + + " \"scim\": {\n" + + " \"tokens\": {\n" + + " \"scopes\": [\n" + + " \"get:users\"\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"google_workspace\": {\n" + + " \"sync_users\": true\n" + + " }\n" + + " }\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java index cfcb3595..83a11c14 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java @@ -2,7 +2,6 @@ import com.auth0.client.mgmt.connections.types.GetConnectionEnabledClientsRequestParameters; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectionEnabledClient; import com.auth0.client.mgmt.types.UpdateEnabledClientConnectionsRequestContentItem; @@ -47,8 +46,8 @@ public void testGet() throws Exception { .get( "id", GetConnectionEnabledClientsRequestParameters.builder() - .take(OptionalNullable.of(1)) - .from(OptionalNullable.of("from")) + .take(1) + .from("from") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java index 75257a9e..b288e36b 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java @@ -1,16 +1,21 @@ package com.auth0.client.mgmt; +import com.auth0.client.mgmt.connections.types.AddSynchronizedGroupsRequestContent; +import com.auth0.client.mgmt.connections.types.DeleteSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; import com.auth0.client.mgmt.connections.types.ListSynchronizedGroupsRequestParameters; import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.CreateDirectoryProvisioningRequestContent; import com.auth0.client.mgmt.types.CreateDirectoryProvisioningResponseContent; import com.auth0.client.mgmt.types.DirectoryProvisioning; import com.auth0.client.mgmt.types.GetDirectoryProvisioningDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetDirectoryProvisioningResponseContent; import com.auth0.client.mgmt.types.SynchronizedGroupPayload; +import com.auth0.client.mgmt.types.SynchronizedGroupSelectionId; +import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -53,8 +58,8 @@ public void testList() throws Exception { SyncPagingIterable response = client.connections() .directoryProvisioning() .list(ListDirectoryProvisioningsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -139,8 +144,12 @@ public void testCreate() throws Exception { .setResponseCode(200) .setBody( "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"all\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); - CreateDirectoryProvisioningResponseContent response = - client.connections().directoryProvisioning().create("id", OptionalNullable.absent()); + CreateDirectoryProvisioningResponseContent response = client.connections() + .directoryProvisioning() + .create( + "id", + OptionalNullable.of(CreateDirectoryProvisioningRequestContent.builder() + .build())); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); @@ -214,8 +223,12 @@ public void testUpdate() throws Exception { .setResponseCode(200) .setBody( "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"synchronize_groups\":\"all\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); - UpdateDirectoryProvisioningResponseContent response = - client.connections().directoryProvisioning().update("id", OptionalNullable.absent()); + UpdateDirectoryProvisioningResponseContent response = client.connections() + .directoryProvisioning() + .update( + "id", + OptionalNullable.of(UpdateDirectoryProvisioningRequestContent.builder() + .build())); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("PATCH", request.getMethod()); @@ -330,14 +343,18 @@ else if (actualResponseNode.has("kind")) @Test public void testListSynchronizedGroups() throws Exception { server.enqueue( - new MockResponse().setResponseCode(200).setBody("{\"groups\":[{\"id\":\"id\"}],\"next\":\"next\"}")); + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"email\":\"email\",\"direct_members_count\":1}],\"next\":\"next\"}")); SyncPagingIterable response = client.connections() .directoryProvisioning() .listSynchronizedGroups( "id", ListSynchronizedGroupsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) + .q("q") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -349,6 +366,53 @@ public void testListSynchronizedGroups() throws Exception { // The SDK correctly parses the response into a SyncPagingIterable } + @Test + public void testAddSynchronizedGroupSelections() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.connections() + .directoryProvisioning() + .addSynchronizedGroupSelections( + "id", + AddSynchronizedGroupsRequestContent.builder() + .groups(Arrays.asList(SynchronizedGroupPayload.builder() + .id("id") + .build())) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = + "" + "{\n" + " \"groups\": [\n" + " {\n" + " \"id\": \"id\"\n" + " }\n" + " ]\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"); + } + } + @Test public void testSet() throws Exception { server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); @@ -396,6 +460,53 @@ else if (actualJson.has("kind")) } } + @Test + public void testDeleteSynchronizedGroupSelections() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.connections() + .directoryProvisioning() + .deleteSynchronizedGroupSelections( + "id", + DeleteSynchronizedGroupsRequestContent.builder() + .groups(Arrays.asList(SynchronizedGroupSelectionId.builder() + .id("id") + .build())) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = + "" + "{\n" + " \"groups\": [\n" + " {\n" + " \"id\": \"id\"\n" + " }\n" + " ]\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"); + } + } + /** * Compares two JsonNodes with numeric equivalence and null safety. * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java index 7783e78b..31ba6382 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java @@ -3,7 +3,9 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.ConnectionKey; +import com.auth0.client.mgmt.types.PostConnectionKeysRequestContent; import com.auth0.client.mgmt.types.PostConnectionsKeysResponseContentItem; +import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent; import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -106,8 +108,12 @@ public void testCreate() throws Exception { .setResponseCode(200) .setBody( "[{\"kid\":\"kid\",\"cert\":\"cert\",\"pkcs\":\"pkcs\",\"current\":true,\"next\":true,\"current_since\":\"current_since\",\"fingerprint\":\"fingerprint\",\"thumbprint\":\"thumbprint\",\"algorithm\":\"algorithm\",\"key_use\":\"encryption\",\"subject_dn\":\"subject_dn\"}]")); - List response = - client.connections().keys().create("id", OptionalNullable.absent()); + List response = client.connections() + .keys() + .create( + "id", + OptionalNullable.of( + PostConnectionKeysRequestContent.builder().build())); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); @@ -169,8 +175,12 @@ public void testRotate() throws Exception { .setResponseCode(200) .setBody( "{\"kid\":\"kid\",\"cert\":\"cert\",\"pkcs\":\"pkcs\",\"next\":true,\"fingerprint\":\"fingerprint\",\"thumbprint\":\"thumbprint\",\"algorithm\":\"algorithm\",\"key_use\":\"encryption\",\"subject_dn\":\"subject_dn\"}")); - RotateConnectionsKeysResponseContent response = - client.connections().keys().rotate("id", OptionalNullable.absent()); + RotateConnectionsKeysResponseContent response = client.connections() + .keys() + .rotate( + "id", + OptionalNullable.of( + RotateConnectionKeysRequestContent.builder().build())); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java index 7ba0ab3b..dc5991b1 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java @@ -5,6 +5,7 @@ import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.CreateScimConfigurationRequestContent; import com.auth0.client.mgmt.types.CreateScimConfigurationResponseContent; import com.auth0.client.mgmt.types.GetScimConfigurationDefaultMappingResponseContent; import com.auth0.client.mgmt.types.GetScimConfigurationResponseContent; @@ -52,8 +53,8 @@ public void testList() throws Exception { SyncPagingIterable response = client.connections() .scimConfiguration() .list(ListScimConfigurationsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -135,8 +136,12 @@ public void testCreate() throws Exception { .setResponseCode(200) .setBody( "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"tenant_name\":\"tenant_name\",\"user_id_attribute\":\"user_id_attribute\",\"mapping\":[{\"auth0\":\"auth0\",\"scim\":\"scim\"}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_on\":\"2024-01-15T09:30:00Z\"}")); - CreateScimConfigurationResponseContent response = - client.connections().scimConfiguration().create("id", OptionalNullable.absent()); + CreateScimConfigurationResponseContent response = client.connections() + .scimConfiguration() + .create( + "id", + OptionalNullable.of( + CreateScimConfigurationRequestContent.builder().build())); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java index 3a5ca65b..2514b5f3 100644 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectionForList; import com.auth0.client.mgmt.types.ConnectionIdentityProviderEnum; @@ -50,14 +49,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"next\":\"next\",\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true},\"cross_app_access_requesting_app\":{\"active\":true}}]}")); + "{\"next\":\"next\",\"connections\":[{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"is_domain_connection\":true,\"show_as_button\":true,\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true},\"cross_app_access_requesting_app\":{\"active\":true},\"cross_app_access_resource_app\":{\"status\":\"enabled\"}}]}")); SyncPagingIterable response = client.connections() .list(ListConnectionsQueryParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .name(OptionalNullable.of("name")) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .includeTotals(true) + .from("from") + .take(1) + .name("name") + .fields("fields") + .includeFields(true) .strategy(Arrays.asList(ConnectionStrategyEnum.AD)) .build()); RecordedRequest request = server.takeRequest(); @@ -76,7 +76,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true},\"cross_app_access_requesting_app\":{\"active\":true}}")); + "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true,\"allow_missing_user_id\":true},\"cross_app_access_requesting_app\":{\"active\":true},\"cross_app_access_resource_app\":{\"status\":\"enabled\"}}")); CreateConnectionResponseContent response = client.connections() .create(CreateConnectionRequestContent.builder() .name("name") @@ -143,10 +143,14 @@ else if (actualJson.has("kind")) + " },\n" + " \"connected_accounts\": {\n" + " \"active\": true,\n" - + " \"cross_app_access\": true\n" + + " \"cross_app_access\": true,\n" + + " \"allow_missing_user_id\": true\n" + " },\n" + " \"cross_app_access_requesting_app\": {\n" + " \"active\": true\n" + + " },\n" + + " \"cross_app_access_resource_app\": {\n" + + " \"status\": \"enabled\"\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -186,13 +190,13 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true},\"cross_app_access_requesting_app\":{\"active\":true}}")); + "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true,\"allow_missing_user_id\":true},\"cross_app_access_requesting_app\":{\"active\":true},\"cross_app_access_resource_app\":{\"status\":\"enabled\"}}")); GetConnectionResponseContent response = client.connections() .get( "id", GetConnectionRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -226,10 +230,14 @@ public void testGet() throws Exception { + " },\n" + " \"connected_accounts\": {\n" + " \"active\": true,\n" - + " \"cross_app_access\": true\n" + + " \"cross_app_access\": true,\n" + + " \"allow_missing_user_id\": true\n" + " },\n" + " \"cross_app_access_requesting_app\": {\n" + " \"active\": true\n" + + " },\n" + + " \"cross_app_access_resource_app\": {\n" + + " \"status\": \"enabled\"\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -278,7 +286,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true},\"cross_app_access_requesting_app\":{\"active\":true}}")); + "{\"name\":\"name\",\"display_name\":\"display_name\",\"options\":{\"key\":\"value\"},\"id\":\"id\",\"strategy\":\"strategy\",\"realms\":[\"realms\"],\"enabled_clients\":[\"enabled_clients\"],\"is_domain_connection\":true,\"show_as_button\":true,\"metadata\":{\"key\":\"value\"},\"authentication\":{\"active\":true},\"connected_accounts\":{\"active\":true,\"cross_app_access\":true,\"allow_missing_user_id\":true},\"cross_app_access_requesting_app\":{\"active\":true},\"cross_app_access_resource_app\":{\"status\":\"enabled\"}}")); UpdateConnectionResponseContent response = client.connections() .update("id", UpdateConnectionRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -342,10 +350,14 @@ else if (actualJson.has("kind")) + " },\n" + " \"connected_accounts\": {\n" + " \"active\": true,\n" - + " \"cross_app_access\": true\n" + + " \"cross_app_access\": true,\n" + + " \"allow_missing_user_id\": true\n" + " },\n" + " \"cross_app_access_requesting_app\": {\n" + " \"active\": true\n" + + " },\n" + + " \"cross_app_access_resource_app\": {\n" + + " \"status\": \"enabled\"\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java index 0249aef2..f8b0f513 100644 --- a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.CreateCustomDomainRequestContent; import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; import com.auth0.client.mgmt.types.CustomDomain; @@ -55,10 +54,10 @@ public void testList() throws Exception { "[{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"is_default\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"origin_domain_name\":\"origin_domain_name\",\"verification\":{\"methods\":[{\"name\":\"cname\",\"record\":\"record\"}],\"status\":\"verified\",\"error_msg\":\"error_msg\",\"last_verified_at\":\"last_verified_at\"},\"custom_client_ip_header\":\"custom_client_ip_header\",\"tls_policy\":\"tls_policy\",\"domain_metadata\":{\"key\":\"value\"},\"certificate\":{\"status\":\"provisioning\",\"error_msg\":\"error_msg\",\"certificate_authority\":\"letsencrypt\",\"renews_before\":\"renews_before\"},\"relying_party_identifier\":\"relying_party_identifier\"}]")); List response = client.customDomains() .list(ListCustomDomainsRequestParameters.builder() - .q(OptionalNullable.of("q")) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .sort(OptionalNullable.of("sort")) + .q("q") + .fields("fields") + .includeFields(true) + .sort("sort") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java b/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java index 2bfe290f..b487d7f6 100644 --- a/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialRequestContent; import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialResponseContent; @@ -48,14 +47,14 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"device_credentials\":[{\"id\":\"id\",\"device_name\":\"device_name\",\"device_id\":\"device_id\",\"type\":\"public_key\",\"user_id\":\"user_id\",\"client_id\":\"client_id\"}]}")); SyncPagingIterable response = client.deviceCredentials() .list(ListDeviceCredentialsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .userId(OptionalNullable.of("user_id")) - .clientId(OptionalNullable.of("client_id")) - .type(OptionalNullable.of(DeviceCredentialTypeEnum.PUBLIC_KEY)) + .page(1) + .perPage(1) + .includeTotals(true) + .fields("fields") + .includeFields(true) + .userId("user_id") + .clientId("client_id") + .type(DeviceCredentialTypeEnum.PUBLIC_KEY) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java index fc3220cb..5a000422 100644 --- a/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java @@ -1,5 +1,6 @@ package com.auth0.client.mgmt; +import com.auth0.client.mgmt.core.Nullable; import com.auth0.client.mgmt.core.ObjectMappers; import com.auth0.client.mgmt.types.CreateEmailTemplateRequestContent; import com.auth0.client.mgmt.types.CreateEmailTemplateResponseContent; @@ -49,13 +50,26 @@ public void testCreate() throws Exception { CreateEmailTemplateResponseContent response = client.emailTemplates() .create(CreateEmailTemplateRequestContent.builder() .template(EmailTemplateNameEnum.VERIFY_EMAIL) + .body(Nullable.ofNull()) + .from(Nullable.ofNull()) + .subject(Nullable.ofNull()) + .syntax(Nullable.ofNull()) + .enabled(Nullable.ofNull()) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); // Validate request body String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"template\": \"verify_email\"\n" + "}"; + String expectedRequestBody = "" + + "{\n" + + " \"template\": \"verify_email\",\n" + + " \"body\": null,\n" + + " \"from\": null,\n" + + " \"subject\": null,\n" + + " \"syntax\": null,\n" + + " \"enabled\": null\n" + + "}"; JsonNode actualJson = objectMapper.readTree(actualRequestBody); JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); @@ -199,13 +213,26 @@ public void testSet() throws Exception { EmailTemplateNameEnum.VERIFY_EMAIL, SetEmailTemplateRequestContent.builder() .template(EmailTemplateNameEnum.VERIFY_EMAIL) + .body(Nullable.ofNull()) + .from(Nullable.ofNull()) + .subject(Nullable.ofNull()) + .syntax(Nullable.ofNull()) + .enabled(Nullable.ofNull()) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("PUT", request.getMethod()); // Validate request body String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"template\": \"verify_email\"\n" + "}"; + String expectedRequestBody = "" + + "{\n" + + " \"template\": \"verify_email\",\n" + + " \"body\": null,\n" + + " \"from\": null,\n" + + " \"subject\": null,\n" + + " \"syntax\": null,\n" + + " \"enabled\": null\n" + + "}"; JsonNode actualJson = objectMapper.readTree(actualRequestBody); JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); diff --git a/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java b/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java index 197c9026..030e383a 100644 --- a/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java @@ -1,13 +1,10 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.emails.types.CreateEmailProviderRequestContent; import com.auth0.client.mgmt.emails.types.GetEmailProviderRequestParameters; import com.auth0.client.mgmt.emails.types.UpdateEmailProviderRequestContent; import com.auth0.client.mgmt.types.CreateEmailProviderResponseContent; -import com.auth0.client.mgmt.types.EmailProviderCredentialsSchema; -import com.auth0.client.mgmt.types.EmailProviderCredentialsSchemaZero; import com.auth0.client.mgmt.types.EmailProviderNameEnum; import com.auth0.client.mgmt.types.GetEmailProviderResponseContent; import com.auth0.client.mgmt.types.UpdateEmailProviderResponseContent; @@ -51,8 +48,8 @@ public void testGet() throws Exception { GetEmailProviderResponseContent response = client.emails() .provider() .get(GetEmailProviderRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -119,22 +116,13 @@ public void testCreate() throws Exception { .provider() .create(CreateEmailProviderRequestContent.builder() .name(EmailProviderNameEnum.MAILGUN) - .credentials(EmailProviderCredentialsSchema.of(EmailProviderCredentialsSchemaZero.builder() - .apiKey("api_key") - .build())) .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\": \"mailgun\",\n" - + " \"credentials\": {\n" - + " \"api_key\": \"api_key\"\n" - + " }\n" - + "}"; + String expectedRequestBody = "" + "{\n" + " \"name\": \"mailgun\"\n" + "}"; JsonNode actualJson = objectMapper.readTree(actualRequestBody); JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java index 6584e049..f2e929b9 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java @@ -1,13 +1,12 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; +import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.eventstreams.types.ListEventStreamDeliveriesRequestParameters; import com.auth0.client.mgmt.types.EventStreamDelivery; import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -42,18 +41,18 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "[{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"group.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}]")); - List response = client.eventStreams() + "{\"deliveries\":[{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"connection.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\"}]}],\"next\":\"next\"}")); + SyncPagingIterable response = client.eventStreams() .deliveries() .list( "id", ListEventStreamDeliveriesRequestParameters.builder() - .statuses(OptionalNullable.of("statuses")) - .eventTypes(OptionalNullable.of("event_types")) - .dateFrom(OptionalNullable.of("date_from")) - .dateTo(OptionalNullable.of("date_to")) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .statuses("statuses") + .eventTypes("event_types") + .dateFrom("date_from") + .dateTo("date_to") + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -61,59 +60,8 @@ public void testList() throws Exception { // Validate response body Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "[\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"event_stream_id\": \"event_stream_id\",\n" - + " \"status\": \"failed\",\n" - + " \"event_type\": \"group.created\",\n" - + " \"attempts\": [\n" - + " {\n" - + " \"status\": \"failed\",\n" - + " \"timestamp\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"event\": {\n" - + " \"id\": \"id\",\n" - + " \"source\": \"source\",\n" - + " \"specversion\": \"specversion\",\n" - + " \"type\": \"type\",\n" - + " \"time\": \"2024-01-15T09:30:00Z\",\n" - + " \"data\": \"data\"\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"); - } + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable } @Test @@ -122,7 +70,7 @@ public void testGetHistory() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"group.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}")); + "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"connection.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\",\"duration\":1.1}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":{\"key\":\"value\"}}}")); GetEventStreamDeliveryHistoryResponseContent response = client.eventStreams().deliveries().getHistory("id", "event_id"); RecordedRequest request = server.takeRequest(); @@ -137,12 +85,13 @@ public void testGetHistory() throws Exception { + " \"id\": \"id\",\n" + " \"event_stream_id\": \"event_stream_id\",\n" + " \"status\": \"failed\",\n" - + " \"event_type\": \"group.created\",\n" + + " \"event_type\": \"connection.created\",\n" + " \"attempts\": [\n" + " {\n" + " \"status\": \"failed\",\n" + " \"timestamp\": \"2024-01-15T09:30:00Z\",\n" - + " \"error_message\": \"error_message\"\n" + + " \"error_message\": \"error_message\",\n" + + " \"duration\": 1.1\n" + " }\n" + " ],\n" + " \"event\": {\n" @@ -151,7 +100,9 @@ public void testGetHistory() throws Exception { + " \"specversion\": \"specversion\",\n" + " \"type\": \"type\",\n" + " \"time\": \"2024-01-15T09:30:00Z\",\n" - + " \"data\": \"data\"\n" + + " \"data\": {\n" + + " \"key\": \"value\"\n" + + " }\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java index 143fee3a..ea61b142 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java @@ -39,7 +39,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"date_from\":\"2024-01-15T09:30:00Z\",\"date_to\":\"2024-01-15T09:30:00Z\",\"statuses\":[\"failed\"],\"event_types\":[\"group.created\"]}")); + "{\"date_from\":\"2024-01-15T09:30:00Z\",\"date_to\":\"2024-01-15T09:30:00Z\",\"statuses\":[\"failed\"],\"event_types\":[\"connection.created\"]}")); CreateEventStreamRedeliveryResponseContent response = client.eventStreams() .redeliveries() .create( @@ -89,7 +89,7 @@ else if (actualJson.has("kind")) + " \"failed\"\n" + " ],\n" + " \"event_types\": [\n" - + " \"group.created\"\n" + + " \"connection.created\"\n" + " ]\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java index cef67a0d..19fc279d 100644 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateEventStreamResponseContent; import com.auth0.client.mgmt.types.CreateEventStreamTestEventRequestContent; @@ -59,8 +58,8 @@ public void testList() throws Exception { "{\"eventStreams\":[{\"id\":\"id\",\"name\":\"name\",\"subscriptions\":[{}],\"destination\":{\"type\":\"webhook\",\"configuration\":{\"webhook_endpoint\":\"webhook_endpoint\",\"webhook_authorization\":{\"method\":\"basic\",\"username\":\"username\"}}},\"status\":\"enabled\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.eventStreams() .list(ListEventStreamsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -378,19 +377,19 @@ public void testTest() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"group.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\"}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":\"data\"}}")); + "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"connection.created\",\"attempts\":[{\"status\":\"failed\",\"timestamp\":\"2024-01-15T09:30:00Z\",\"error_message\":\"error_message\",\"duration\":1.1}],\"event\":{\"id\":\"id\",\"source\":\"source\",\"specversion\":\"specversion\",\"type\":\"type\",\"time\":\"2024-01-15T09:30:00Z\",\"data\":{\"key\":\"value\"}}}")); CreateEventStreamTestEventResponseContent response = client.eventStreams() .test( "id", CreateEventStreamTestEventRequestContent.builder() - .eventType(EventStreamTestEventTypeEnum.GROUP_CREATED) + .eventType(EventStreamTestEventTypeEnum.CONNECTION_CREATED) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("POST", request.getMethod()); // Validate request body String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"event_type\": \"group.created\"\n" + "}"; + String expectedRequestBody = "" + "{\n" + " \"event_type\": \"connection.created\"\n" + "}"; JsonNode actualJson = objectMapper.readTree(actualRequestBody); JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); @@ -426,12 +425,13 @@ else if (actualJson.has("kind")) + " \"id\": \"id\",\n" + " \"event_stream_id\": \"event_stream_id\",\n" + " \"status\": \"failed\",\n" - + " \"event_type\": \"group.created\",\n" + + " \"event_type\": \"connection.created\",\n" + " \"attempts\": [\n" + " {\n" + " \"status\": \"failed\",\n" + " \"timestamp\": \"2024-01-15T09:30:00Z\",\n" - + " \"error_message\": \"error_message\"\n" + + " \"error_message\": \"error_message\",\n" + + " \"duration\": 1.1\n" + " }\n" + " ],\n" + " \"event\": {\n" @@ -440,7 +440,9 @@ else if (actualJson.has("kind")) + " \"specversion\": \"specversion\",\n" + " \"type\": \"type\",\n" + " \"time\": \"2024-01-15T09:30:00Z\",\n" - + " \"data\": \"data\"\n" + + " \"data\": {\n" + + " \"key\": \"value\"\n" + + " }\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/EventsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventsWireTest.java index 67b9037a..5b8d25d8 100644 --- a/src/test/java/com/auth0/client/mgmt/EventsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/EventsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.EventStreamSubscribeEventsEventTypeEnum; import com.auth0.client.mgmt.types.EventStreamSubscribeEventsResponseContent; import com.auth0.client.mgmt.types.SubscribeEventsRequestParameters; @@ -41,9 +40,9 @@ public void testSubscribe() throws Exception { server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); Iterable response = client.events() .subscribe(SubscribeEventsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .fromTimestamp(OptionalNullable.of("from_timestamp")) - .eventType(Arrays.asList(EventStreamSubscribeEventsEventTypeEnum.GROUP_CREATED)) + .from("from") + .fromTimestamp("from_timestamp") + .eventType(Arrays.asList(EventStreamSubscribeEventsEventTypeEnum.CONNECTION_CREATED)) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ExperimentationExperimentsWireTest.java b/src/test/java/com/auth0/client/mgmt/ExperimentationExperimentsWireTest.java new file mode 100644 index 00000000..5a3a465a --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/ExperimentationExperimentsWireTest.java @@ -0,0 +1,599 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.AdvanceRampRequestContent; +import com.auth0.client.mgmt.experimentation.types.CreateExperimentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListExperimentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters; +import com.auth0.client.mgmt.types.AdvanceRampResponseContent; +import com.auth0.client.mgmt.types.AllocationStrategyEnum; +import com.auth0.client.mgmt.types.AuthenticationFlowEnum; +import com.auth0.client.mgmt.types.CreateExperimentResponseContent; +import com.auth0.client.mgmt.types.ExperimentListItem; +import com.auth0.client.mgmt.types.ExperimentStatusEnum; +import com.auth0.client.mgmt.types.GetExperimentResponseContent; +import com.auth0.client.mgmt.types.UpdateExperimentResponseContent; +import com.auth0.client.mgmt.types.ValidateExperimentResponseContent; +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 ExperimentationExperimentsWireTest { + 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( + "{\"experiments\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"feature_flag_id\":\"feature_flag_id\",\"feature_flag_name\":\"feature_flag_name\",\"authentication_flow\":\"authentication_flow\",\"allocation_strategy\":\"percentage\",\"status\":\"draft\",\"is_valid\":true,\"default_config\":\"tenant\",\"feature_flag_snapshot\":{\"key\":\"value\"},\"allocations\":[{}],\"editable_fields\":[\"editable_fields\"],\"levels\":[1],\"current_level\":1,\"started_at\":\"2024-01-15T09:30:00Z\",\"ended_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.experimentation() + .experiments() + .list(ListExperimentsRequestParameters.builder() + .from("from") + .take(1) + .status(ExperimentStatusEnum.DRAFT) + .authenticationFlow("authentication_flow") + .featureFlagId("feature_flag_id") + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"feature_flag_id\":\"feature_flag_id\",\"feature_flag_name\":\"feature_flag_name\",\"authentication_flow\":\"authentication_flow\",\"allocation_strategy\":\"percentage\",\"status\":\"draft\",\"is_valid\":true,\"default_config\":\"tenant\",\"feature_flag_snapshot\":{\"key\":\"value\"},\"allocations\":[{\"variation_id\":\"variation_id\",\"variation_name\":\"variation_name\",\"segment_id\":\"segment_id\",\"segment_name\":\"segment_name\",\"weight\":1,\"priority\":1,\"is_control\":true,\"is_fallback\":true,\"variation_snapshot\":{\"key\":\"value\"},\"segment_snapshot\":{\"key\":\"value\"}}],\"editable_fields\":[\"editable_fields\"],\"levels\":[1],\"current_level\":1,\"started_at\":\"2024-01-15T09:30:00Z\",\"ended_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + CreateExperimentResponseContent response = client.experimentation() + .experiments() + .create(CreateExperimentRequestContent.builder() + .name("name") + .featureFlagId("feature_flag_id") + .authenticationFlow(AuthenticationFlowEnum.AUTHENTICATION) + .allocationStrategy(AllocationStrategyEnum.PERCENTAGE) + .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" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"authentication_flow\": \"authentication\",\n" + + " \"allocation_strategy\": \"percentage\"\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" + + " \"description\": \"description\",\n" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"feature_flag_name\": \"feature_flag_name\",\n" + + " \"authentication_flow\": \"authentication_flow\",\n" + + " \"allocation_strategy\": \"percentage\",\n" + + " \"status\": \"draft\",\n" + + " \"is_valid\": true,\n" + + " \"default_config\": \"tenant\",\n" + + " \"feature_flag_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"allocations\": [\n" + + " {\n" + + " \"variation_id\": \"variation_id\",\n" + + " \"variation_name\": \"variation_name\",\n" + + " \"segment_id\": \"segment_id\",\n" + + " \"segment_name\": \"segment_name\",\n" + + " \"weight\": 1,\n" + + " \"priority\": 1,\n" + + " \"is_control\": true,\n" + + " \"is_fallback\": true,\n" + + " \"variation_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"segment_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"editable_fields\": [\n" + + " \"editable_fields\"\n" + + " ],\n" + + " \"levels\": [\n" + + " 1\n" + + " ],\n" + + " \"current_level\": 1,\n" + + " \"started_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"ended_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"description\":\"description\",\"feature_flag_id\":\"feature_flag_id\",\"feature_flag_name\":\"feature_flag_name\",\"authentication_flow\":\"authentication_flow\",\"allocation_strategy\":\"percentage\",\"status\":\"draft\",\"is_valid\":true,\"default_config\":\"tenant\",\"feature_flag_snapshot\":{\"key\":\"value\"},\"allocations\":[{\"variation_id\":\"variation_id\",\"variation_name\":\"variation_name\",\"segment_id\":\"segment_id\",\"segment_name\":\"segment_name\",\"weight\":1,\"priority\":1,\"is_control\":true,\"is_fallback\":true,\"variation_snapshot\":{\"key\":\"value\"},\"segment_snapshot\":{\"key\":\"value\"}}],\"editable_fields\":[\"editable_fields\"],\"levels\":[1],\"current_level\":1,\"started_at\":\"2024-01-15T09:30:00Z\",\"ended_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + GetExperimentResponseContent response = + client.experimentation().experiments().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" + + " \"description\": \"description\",\n" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"feature_flag_name\": \"feature_flag_name\",\n" + + " \"authentication_flow\": \"authentication_flow\",\n" + + " \"allocation_strategy\": \"percentage\",\n" + + " \"status\": \"draft\",\n" + + " \"is_valid\": true,\n" + + " \"default_config\": \"tenant\",\n" + + " \"feature_flag_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"allocations\": [\n" + + " {\n" + + " \"variation_id\": \"variation_id\",\n" + + " \"variation_name\": \"variation_name\",\n" + + " \"segment_id\": \"segment_id\",\n" + + " \"segment_name\": \"segment_name\",\n" + + " \"weight\": 1,\n" + + " \"priority\": 1,\n" + + " \"is_control\": true,\n" + + " \"is_fallback\": true,\n" + + " \"variation_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"segment_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"editable_fields\": [\n" + + " \"editable_fields\"\n" + + " ],\n" + + " \"levels\": [\n" + + " 1\n" + + " ],\n" + + " \"current_level\": 1,\n" + + " \"started_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"ended_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.experimentation().experiments().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"feature_flag_id\":\"feature_flag_id\",\"feature_flag_name\":\"feature_flag_name\",\"authentication_flow\":\"authentication_flow\",\"allocation_strategy\":\"percentage\",\"status\":\"draft\",\"is_valid\":true,\"default_config\":\"tenant\",\"feature_flag_snapshot\":{\"key\":\"value\"},\"allocations\":[{\"variation_id\":\"variation_id\",\"variation_name\":\"variation_name\",\"segment_id\":\"segment_id\",\"segment_name\":\"segment_name\",\"weight\":1,\"priority\":1,\"is_control\":true,\"is_fallback\":true,\"variation_snapshot\":{\"key\":\"value\"},\"segment_snapshot\":{\"key\":\"value\"}}],\"editable_fields\":[\"editable_fields\"],\"levels\":[1],\"current_level\":1,\"started_at\":\"2024-01-15T09:30:00Z\",\"ended_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + UpdateExperimentResponseContent response = client.experimentation() + .experiments() + .update("id", UpdateExperimentRequestParameters.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"description\": \"description\",\n" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"feature_flag_name\": \"feature_flag_name\",\n" + + " \"authentication_flow\": \"authentication_flow\",\n" + + " \"allocation_strategy\": \"percentage\",\n" + + " \"status\": \"draft\",\n" + + " \"is_valid\": true,\n" + + " \"default_config\": \"tenant\",\n" + + " \"feature_flag_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"allocations\": [\n" + + " {\n" + + " \"variation_id\": \"variation_id\",\n" + + " \"variation_name\": \"variation_name\",\n" + + " \"segment_id\": \"segment_id\",\n" + + " \"segment_name\": \"segment_name\",\n" + + " \"weight\": 1,\n" + + " \"priority\": 1,\n" + + " \"is_control\": true,\n" + + " \"is_fallback\": true,\n" + + " \"variation_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"segment_snapshot\": {\n" + + " \"key\": \"value\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"editable_fields\": [\n" + + " \"editable_fields\"\n" + + " ],\n" + + " \"levels\": [\n" + + " 1\n" + + " ],\n" + + " \"current_level\": 1,\n" + + " \"started_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"ended_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testAdvanceRamp() throws Exception { + server.enqueue(new MockResponse() + .setResponseCode(200) + .setBody("{\"experiment_id\":\"experiment_id\",\"from_level\":1,\"to_level\":1,\"current_level\":1}")); + AdvanceRampResponseContent response = client.experimentation() + .experiments() + .advanceRamp( + "id", AdvanceRampRequestContent.builder().targetLevel(1).build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"target_level\": 1\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" + + " \"experiment_id\": \"experiment_id\",\n" + + " \"from_level\": 1,\n" + + " \"to_level\": 1,\n" + + " \"current_level\": 1\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 testValidate() throws Exception { + server.enqueue(new MockResponse() + .setResponseCode(200) + .setBody("{\"is_valid\":true,\"errors\":[{\"code\":\"code\",\"message\":\"message\"}]}")); + ValidateExperimentResponseContent response = + client.experimentation().experiments().validate("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + + "{\n" + + " \"is_valid\": true,\n" + + " \"errors\": [\n" + + " {\n" + + " \"code\": \"code\",\n" + + " \"message\": \"message\"\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"); + } + } + + /** + * 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/java/com/auth0/client/mgmt/ExperimentationFeatureFlagsVariationsWireTest.java b/src/test/java/com/auth0/client/mgmt/ExperimentationFeatureFlagsVariationsWireTest.java new file mode 100644 index 00000000..d6deb926 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/ExperimentationFeatureFlagsVariationsWireTest.java @@ -0,0 +1,398 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.experimentation.featureflags.types.CreateVariationRequestContent; +import com.auth0.client.mgmt.experimentation.featureflags.types.UpdateVariationRequestContent; +import com.auth0.client.mgmt.types.CreateVariationResponseContent; +import com.auth0.client.mgmt.types.GetVariationResponseContent; +import com.auth0.client.mgmt.types.ListVariationsResponseContent; +import com.auth0.client.mgmt.types.UpdateVariationResponseContent; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +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 ExperimentationFeatureFlagsVariationsWireTest { + 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( + "{\"variations\":[{\"id\":\"id\",\"feature_flag_id\":\"feature_flag_id\",\"name\":\"name\",\"description\":\"description\",\"overrides\":{\"key\":\"value\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); + ListVariationsResponseContent response = + client.experimentation().featureFlags().variations().list("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" + + " \"variations\": [\n" + + " {\n" + + " \"id\": \"id\",\n" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"name\": \"name\",\n" + + " \"description\": \"description\",\n" + + " \"overrides\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"feature_flag_id\":\"feature_flag_id\",\"name\":\"name\",\"description\":\"description\",\"overrides\":{\"key\":\"value\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + CreateVariationResponseContent response = client.experimentation() + .featureFlags() + .variations() + .create( + "id", + CreateVariationRequestContent.builder() + .name("name") + .overrides(new HashMap() { + { + put("key", "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" + + " \"overrides\": {\n" + + " \"key\": \"value\"\n" + + " }\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" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"name\": \"name\",\n" + + " \"description\": \"description\",\n" + + " \"overrides\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"feature_flag_id\":\"feature_flag_id\",\"name\":\"name\",\"description\":\"description\",\"overrides\":{\"key\":\"value\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + GetVariationResponseContent response = + client.experimentation().featureFlags().variations().get("id", "vid"); + 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" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"name\": \"name\",\n" + + " \"description\": \"description\",\n" + + " \"overrides\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.experimentation().featureFlags().variations().delete("id", "vid"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"feature_flag_id\":\"feature_flag_id\",\"name\":\"name\",\"description\":\"description\",\"overrides\":{\"key\":\"value\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + UpdateVariationResponseContent response = client.experimentation() + .featureFlags() + .variations() + .update("id", "vid", UpdateVariationRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"feature_flag_id\": \"feature_flag_id\",\n" + + " \"name\": \"name\",\n" + + " \"description\": \"description\",\n" + + " \"overrides\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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/java/com/auth0/client/mgmt/ExperimentationFeatureFlagsWireTest.java b/src/test/java/com/auth0/client/mgmt/ExperimentationFeatureFlagsWireTest.java new file mode 100644 index 00000000..d7e16435 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/ExperimentationFeatureFlagsWireTest.java @@ -0,0 +1,372 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.CreateFeatureFlagRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListFeatureFlagsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateFeatureFlagRequestContent; +import com.auth0.client.mgmt.types.CreateFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.FeatureFlag; +import com.auth0.client.mgmt.types.FeatureFlagConfigParam; +import com.auth0.client.mgmt.types.FeatureFlagStatusEnum; +import com.auth0.client.mgmt.types.FeatureFlagTypeEnum; +import com.auth0.client.mgmt.types.GetFeatureFlagResponseContent; +import com.auth0.client.mgmt.types.UpdateFeatureFlagResponseContent; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +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 ExperimentationFeatureFlagsWireTest { + 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( + "{\"feature_flags\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"auth0\",\"status\":\"draft\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.experimentation() + .featureFlags() + .list(ListFeatureFlagsRequestParameters.builder() + .from("from") + .take(1) + .type(FeatureFlagTypeEnum.AUTH0) + .status(FeatureFlagStatusEnum.DRAFT) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"auth0\",\"status\":\"draft\",\"parameters\":{\"key\":{\"type\":\"string\",\"value\":{\"key\":\"value\"},\"description\":\"description\"}},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + CreateFeatureFlagResponseContent response = client.experimentation() + .featureFlags() + .create(CreateFeatureFlagRequestContent.builder() + .name("name") + .parameters(new HashMap()) + .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" + " \"parameters\": {}\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" + + " \"description\": \"description\",\n" + + " \"type\": \"auth0\",\n" + + " \"status\": \"draft\",\n" + + " \"parameters\": {\n" + + " \"key\": {\n" + + " \"type\": \"string\",\n" + + " \"value\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"description\": \"description\"\n" + + " }\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"description\":\"description\",\"type\":\"auth0\",\"status\":\"draft\",\"parameters\":{\"key\":{\"type\":\"string\",\"value\":{\"key\":\"value\"},\"description\":\"description\"}},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + GetFeatureFlagResponseContent response = + client.experimentation().featureFlags().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" + + " \"description\": \"description\",\n" + + " \"type\": \"auth0\",\n" + + " \"status\": \"draft\",\n" + + " \"parameters\": {\n" + + " \"key\": {\n" + + " \"type\": \"string\",\n" + + " \"value\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"description\": \"description\"\n" + + " }\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.experimentation().featureFlags().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"auth0\",\"status\":\"draft\",\"parameters\":{\"key\":{\"type\":\"string\",\"value\":{\"key\":\"value\"},\"description\":\"description\"}},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + UpdateFeatureFlagResponseContent response = client.experimentation() + .featureFlags() + .update("id", UpdateFeatureFlagRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"description\": \"description\",\n" + + " \"type\": \"auth0\",\n" + + " \"status\": \"draft\",\n" + + " \"parameters\": {\n" + + " \"key\": {\n" + + " \"type\": \"string\",\n" + + " \"value\": {\n" + + " \"key\": \"value\"\n" + + " },\n" + + " \"description\": \"description\"\n" + + " }\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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/java/com/auth0/client/mgmt/ExperimentationSegmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/ExperimentationSegmentsWireTest.java new file mode 100644 index 00000000..789c03c1 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/ExperimentationSegmentsWireTest.java @@ -0,0 +1,354 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.experimentation.types.CreateSegmentRequestContent; +import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters; +import com.auth0.client.mgmt.experimentation.types.UpdateSegmentRequestContent; +import com.auth0.client.mgmt.types.CreateSegmentResponseContent; +import com.auth0.client.mgmt.types.GetSegmentResponseContent; +import com.auth0.client.mgmt.types.Segment; +import com.auth0.client.mgmt.types.SegmentRule; +import com.auth0.client.mgmt.types.SegmentStatusEnum; +import com.auth0.client.mgmt.types.SegmentTypeFilterEnum; +import com.auth0.client.mgmt.types.UpdateSegmentResponseContent; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +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 ExperimentationSegmentsWireTest { + 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( + "{\"segments\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"self\",\"status\":\"active\",\"rules\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.experimentation() + .segments() + .list(ListSegmentsRequestParameters.builder() + .from("from") + .take(1) + .type(SegmentTypeFilterEnum.AUTH0) + .status(SegmentStatusEnum.ACTIVE) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"self\",\"status\":\"active\",\"rules\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + CreateSegmentResponseContent response = client.experimentation() + .segments() + .create(CreateSegmentRequestContent.builder() + .name("name") + .rules(Arrays.asList(SegmentRule.builder().build())) + .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" + " \"rules\": [\n" + " {}\n" + " ]\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" + + " \"description\": \"description\",\n" + + " \"type\": \"self\",\n" + + " \"status\": \"active\",\n" + + " \"rules\": [\n" + + " {}\n" + + " ],\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"description\":\"description\",\"type\":\"self\",\"status\":\"active\",\"rules\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + GetSegmentResponseContent response = client.experimentation().segments().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" + + " \"description\": \"description\",\n" + + " \"type\": \"self\",\n" + + " \"status\": \"active\",\n" + + " \"rules\": [\n" + + " {}\n" + + " ],\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.experimentation().segments().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"self\",\"status\":\"active\",\"rules\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + UpdateSegmentResponseContent response = client.experimentation() + .segments() + .update("id", UpdateSegmentRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"description\": \"description\",\n" + + " \"type\": \"self\",\n" + + " \"status\": \"active\",\n" + + " \"rules\": [\n" + + " {}\n" + + " ],\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java index d61853f1..11f2e9bb 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.flows.types.GetFlowExecutionRequestParameters; import com.auth0.client.mgmt.flows.types.ListFlowExecutionsRequestParameters; @@ -51,8 +50,9 @@ public void testList() throws Exception { .list( "flow_id", ListFlowExecutionsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java index f35431d6..60ef90a1 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.flows.vault.types.ListFlowsVaultConnectionsRequestParameters; import com.auth0.client.mgmt.flows.vault.types.UpdateFlowsVaultConnectionRequestContent; @@ -56,9 +55,9 @@ public void testList() throws Exception { .vault() .connections() .list(ListFlowsVaultConnectionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java index 7eb3fc2a..dd9a550a 100644 --- a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateFlowRequestContent; import com.auth0.client.mgmt.types.CreateFlowResponseContent; @@ -53,10 +52,10 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"flows\":[{\"id\":\"id\",\"name\":\"name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"executed_at\":\"executed_at\"}]}")); SyncPagingIterable response = client.flows() .list(ListFlowsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .synchronous(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) + .synchronous(true) .hydrate(Arrays.asList(ListFlowsRequestParametersHydrateEnum.FORM_COUNT)) .build()); RecordedRequest request = server.takeRequest(); diff --git a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java index afbbcc10..29fa7b20 100644 --- a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateFormRequestContent; import com.auth0.client.mgmt.types.CreateFormResponseContent; @@ -52,9 +51,9 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"forms\":[{\"id\":\"id\",\"name\":\"name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"embedded_at\":\"embedded_at\",\"submitted_at\":\"submitted_at\"}]}")); SyncPagingIterable response = client.forms() .list(ListFormsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .hydrate(Arrays.asList(FormsRequestParametersHydrateEnum.FLOW_COUNT)) .build()); RecordedRequest request = server.takeRequest(); diff --git a/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java index ba2fdfeb..16612e1a 100644 --- a/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.groups.types.GetGroupMembersRequestParameters; import com.auth0.client.mgmt.types.GroupMember; @@ -47,10 +46,10 @@ public void testGet() throws Exception { .get( "id", GetGroupMembersRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .fields("fields") + .includeFields(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/GroupsRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsRolesWireTest.java index 428bbc47..e9f373ec 100644 --- a/src/test/java/com/auth0/client/mgmt/GroupsRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GroupsRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.groups.types.CreateGroupRolesRequestParameters; import com.auth0.client.mgmt.groups.types.DeleteGroupRolesRequestContent; @@ -44,14 +43,14 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}],\"next\":\"next\"}")); + "{\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.groups() .roles() .list( "id", ListGroupRolesRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java index b45bcac3..64e9da7e 100644 --- a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.GetGroupResponseContent; import com.auth0.client.mgmt.types.Group; @@ -45,14 +44,15 @@ public void testList() throws Exception { "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"tenant_name\":\"tenant_name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\",\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); SyncPagingIterable response = client.groups() .list(ListGroupsRequestParameters.builder() - .connectionId(OptionalNullable.of("connection_id")) - .name(OptionalNullable.of("name")) - .externalId(OptionalNullable.of("external_id")) - .search(OptionalNullable.of("search")) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .connectionId("connection_id") + .name("name") + .externalId("external_id") + .search("search") + .fields("fields") + .includeFields(true) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsEmailWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsEmailWireTest.java new file mode 100644 index 00000000..34976560 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsEmailWireTest.java @@ -0,0 +1,190 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.guardian.factors.types.SetEmailFactorSettingsRequestContent; +import com.auth0.client.mgmt.types.GetEmailFactorSettingsResponseContent; +import com.auth0.client.mgmt.types.SetEmailFactorSettingsResponseContent; +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 GuardianFactorsEmailWireTest { + 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 testGet() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"otp_length\":1,\"otp_expiration_time\":1}")); + GetEmailFactorSettingsResponseContent response = + client.guardian().factors().email().get(); + 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" + " \"otp_length\": 1,\n" + " \"otp_expiration_time\": 1\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 testSet() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"otp_length\":1,\"otp_expiration_time\":1}")); + SetEmailFactorSettingsResponseContent response = client.guardian() + .factors() + .email() + .set(SetEmailFactorSettingsRequestContent.builder() + .otpLength(1) + .otpExpirationTime(1) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PUT", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"otp_length\": 1,\n" + " \"otp_expiration_time\": 1\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" + " \"otp_length\": 1,\n" + " \"otp_expiration_time\": 1\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/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java index 84b43716..825b1d9c 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java @@ -5,16 +5,19 @@ import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorPhoneTemplatesRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneRequestContent; import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPhoneTwilioRequestContent; +import com.auth0.client.mgmt.guardian.factors.types.SetPhoneFactorSettingsRequestContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.GetPhoneFactorSettingsResponseContent; import com.auth0.client.mgmt.types.GuardianFactorPhoneFactorMessageTypeEnum; import com.auth0.client.mgmt.types.GuardianFactorsProviderSmsProviderEnum; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneMessageTypesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; +import com.auth0.client.mgmt.types.SetPhoneFactorSettingsResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; @@ -428,6 +431,128 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testGet() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"otp_length\":1,\"otp_expiration_time\":1}")); + GetPhoneFactorSettingsResponseContent response = + client.guardian().factors().phone().get(); + 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" + " \"otp_length\": 1,\n" + " \"otp_expiration_time\": 1\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 testSet() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"otp_length\":1,\"otp_expiration_time\":1}")); + SetPhoneFactorSettingsResponseContent response = client.guardian() + .factors() + .phone() + .set(SetPhoneFactorSettingsRequestContent.builder() + .otpLength(1) + .otpExpirationTime(1) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PUT", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"otp_length\": 1,\n" + " \"otp_expiration_time\": 1\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" + " \"otp_length\": 1,\n" + " \"otp_expiration_time\": 1\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 testGetTemplates() throws Exception { server.enqueue( diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java index 6a11a7e9..19bbda9a 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java @@ -13,6 +13,7 @@ import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -309,7 +310,7 @@ public void testGetTemplates() throws Exception { .setResponseCode(200) .setBody( "{\"enrollment_message\":\"enrollment_message\",\"verification_message\":\"verification_message\"}")); - GetGuardianFactorSmsTemplatesResponseContent response = + Optional response = client.guardian().factors().sms().getTemplates(); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java index 54bb94f0..11fc9df4 100644 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java @@ -38,9 +38,11 @@ public void teardown() throws Exception { @Test public void testList() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("[{\"enabled\":true,\"trial_expired\":true,\"name\":\"push-notification\"}]")); + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "[{\"enabled\":true,\"trial_expired\":true,\"name\":\"push-notification\",\"settings\":{\"otp_length\":1,\"otp_expiration_time\":1}}]")); List response = client.guardian().factors().list(); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -54,7 +56,11 @@ public void testList() throws Exception { + " {\n" + " \"enabled\": true,\n" + " \"trial_expired\": true,\n" - + " \"name\": \"push-notification\"\n" + + " \"name\": \"push-notification\",\n" + + " \"settings\": {\n" + + " \"otp_length\": 1,\n" + + " \"otp_expiration_time\": 1\n" + + " }\n" + " }\n" + "]"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/GuardianWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianWireTest.java new file mode 100644 index 00000000..a928db03 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/GuardianWireTest.java @@ -0,0 +1,215 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.GetGuardianSettingsResponseContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsRequestContent; +import com.auth0.client.mgmt.types.SetGuardianSettingsResponseContent; +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 GuardianWireTest { + 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 testGet() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"display_remember_me_checkbox\":true,\"remember_me_default_value\":true,\"mfa_session_inactivity_timeout\":1,\"mfa_session_overall_timeout\":1}")); + GetGuardianSettingsResponseContent response = client.guardian().get(); + 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" + + " \"display_remember_me_checkbox\": true,\n" + + " \"remember_me_default_value\": true,\n" + + " \"mfa_session_inactivity_timeout\": 1,\n" + + " \"mfa_session_overall_timeout\": 1\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 testSet() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"display_remember_me_checkbox\":true,\"remember_me_default_value\":true,\"mfa_session_inactivity_timeout\":1,\"mfa_session_overall_timeout\":1}")); + SetGuardianSettingsResponseContent response = client.guardian() + .set(SetGuardianSettingsRequestContent.builder() + .displayRememberMeCheckbox(true) + .rememberMeDefaultValue(true) + .mfaSessionInactivityTimeout(1) + .mfaSessionOverallTimeout(1) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PUT", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + + "{\n" + + " \"display_remember_me_checkbox\": true,\n" + + " \"remember_me_default_value\": true,\n" + + " \"mfa_session_inactivity_timeout\": 1,\n" + + " \"mfa_session_overall_timeout\": 1\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" + + " \"display_remember_me_checkbox\": true,\n" + + " \"remember_me_default_value\": true,\n" + + " \"mfa_session_inactivity_timeout\": 1,\n" + + " \"mfa_session_overall_timeout\": 1\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/java/com/auth0/client/mgmt/HooksWireTest.java b/src/test/java/com/auth0/client/mgmt/HooksWireTest.java index 2fe6f78a..4f0d3264 100644 --- a/src/test/java/com/auth0/client/mgmt/HooksWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/HooksWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateHookRequestContent; import com.auth0.client.mgmt.types.CreateHookResponseContent; @@ -51,12 +50,12 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"hooks\":[{\"triggerId\":\"triggerId\",\"id\":\"id\",\"name\":\"name\",\"enabled\":true,\"script\":\"script\",\"dependencies\":{\"key\":\"value\"}}]}")); SyncPagingIterable response = client.hooks() .list(ListHooksRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .enabled(OptionalNullable.of(true)) - .fields(OptionalNullable.of("fields")) - .triggerId(OptionalNullable.of(HookTriggerIdEnum.CREDENTIALS_EXCHANGE)) + .page(1) + .perPage(1) + .includeTotals(true) + .enabled(true) + .fields("fields") + .triggerId(HookTriggerIdEnum.CREDENTIALS_EXCHANGE) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -172,11 +171,7 @@ public void testGet() throws Exception { .setBody( "{\"triggerId\":\"triggerId\",\"id\":\"id\",\"name\":\"name\",\"enabled\":true,\"script\":\"script\",\"dependencies\":{\"key\":\"value\"}}")); GetHookResponseContent response = client.hooks() - .get( - "id", - GetHookRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .build()); + .get("id", GetHookRequestParameters.builder().fields("fields").build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("GET", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java index e3602abf..56fb8104 100644 --- a/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java @@ -4,6 +4,7 @@ import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Optional; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -36,7 +37,7 @@ public void teardown() throws Exception { public void testGet() throws Exception { server.enqueue( new MockResponse().setResponseCode(200).setBody("[{\"user\":{\"key\":\"value\"},\"errors\":[{}]}]")); - ErrorsGetResponse response = client.jobs().errors().get("id"); + Optional response = client.jobs().errors().get("id"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("GET", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java index 527fbe67..2e0743a4 100644 --- a/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.keys.types.CreateEncryptionKeyRequestContent; import com.auth0.client.mgmt.keys.types.ImportEncryptionKeyRequestContent; @@ -52,9 +51,9 @@ public void testList() throws Exception { SyncPagingIterable response = client.keys() .encryption() .list(ListEncryptionKeysRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); 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 00000000..1289115f --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/KeysNetworkAclsWireTest.java @@ -0,0 +1,289 @@ +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"); + } + } + + @Test + public void testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.keys().networkAcls().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + /** + * 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/java/com/auth0/client/mgmt/LogsWireTest.java b/src/test/java/com/auth0/client/mgmt/LogsWireTest.java index 56248e03..17e51576 100644 --- a/src/test/java/com/auth0/client/mgmt/LogsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/LogsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.GetLogResponseContent; import com.auth0.client.mgmt.types.ListLogsRequestParameters; @@ -45,13 +44,13 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"length\":1.1,\"total\":1.1,\"logs\":[{\"date\":\"date\",\"type\":\"type\",\"description\":\"description\",\"connection\":\"connection\",\"connection_id\":\"connection_id\",\"client_id\":\"client_id\",\"client_name\":\"client_name\",\"ip\":\"ip\",\"hostname\":\"hostname\",\"user_id\":\"user_id\",\"user_name\":\"user_name\",\"audience\":\"audience\",\"scope\":\"scope\",\"strategy\":\"strategy\",\"strategy_type\":\"strategy_type\",\"log_id\":\"log_id\",\"isMobile\":true,\"details\":{\"key\":\"value\"},\"user_agent\":\"user_agent\"}]}")); SyncPagingIterable response = client.logs() .list(ListLogsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .sort(OptionalNullable.of("sort")) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .includeTotals(OptionalNullable.of(true)) - .search(OptionalNullable.of("search")) + .page(1) + .perPage(1) + .sort("sort") + .fields("fields") + .includeFields(true) + .includeTotals(true) + .search("search") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java b/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java index 1018aebe..96e0f919 100644 --- a/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateNetworkAclRequestContent; import com.auth0.client.mgmt.types.GetNetworkAclsResponseContent; @@ -53,9 +52,9 @@ public void testList() throws Exception { "{\"network_acls\":[{\"id\":\"id\",\"description\":\"description\",\"active\":true,\"priority\":1.1,\"rule\":{\"action\":{},\"scope\":\"management\"},\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}],\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); SyncPagingIterable response = client.networkAcls() .list(ListNetworkAclsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java index cc1eddc7..cfb2847b 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.AssociateOrganizationClientGrantRequestContent; import com.auth0.client.mgmt.organizations.types.ListOrganizationClientGrantsRequestParameters; @@ -50,11 +49,11 @@ public void testList() throws Exception { .list( "id", ListOrganizationClientGrantsRequestParameters.builder() - .audience(OptionalNullable.of("audience")) - .clientId(OptionalNullable.of("client_id")) - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .audience("audience") + .clientId("client_id") + .page(1) + .perPage(1) + .includeTotals(true) .grantIds(Arrays.asList("grant_ids")) .build()); RecordedRequest request = server.takeRequest(); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsClientsWireTest.java new file mode 100644 index 00000000..7b36c7bd --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsClientsWireTest.java @@ -0,0 +1,411 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.types.CreateOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent; +import com.auth0.client.mgmt.organizations.types.ListOrganizationClientsRequestParameters; +import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent; +import com.auth0.client.mgmt.types.CreateOrganizationClientRequestItem; +import com.auth0.client.mgmt.types.GetOrganizationClientResponseContent; +import com.auth0.client.mgmt.types.OrganizationClient; +import com.auth0.client.mgmt.types.UpdateOrganizationClientResponseContent; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import java.util.List; +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 OrganizationsClientsWireTest { + 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( + "{\"clients\":[{\"client_id\":\"client_id\",\"use_for_member_access\":true,\"client\":{}}],\"next\":\"next\"}")); + SyncPagingIterable response = client.organizations() + .clients() + .list( + "id", + ListOrganizationClientsRequestParameters.builder() + .from("from") + .take(1) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + @Test + public void testCreate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "[{\"client_id\":\"client_id\",\"use_for_member_access\":true,\"client\":{\"name\":\"name\",\"app_type\":\"app_type\",\"logo_uri\":\"logo_uri\",\"is_first_party\":true,\"grant_types\":[\"grant_types\"],\"organization_usage\":\"deny\"}}]")); + List response = client.organizations() + .clients() + .create( + "id", + CreateOrganizationClientsRequestContent.builder() + .clients(Arrays.asList(CreateOrganizationClientRequestItem.builder() + .clientId("client_id") + .useForMemberAccess(true) + .build())) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + + "{\n" + + " \"clients\": [\n" + + " {\n" + + " \"client_id\": \"client_id\",\n" + + " \"use_for_member_access\": true\n" + + " }\n" + + " ]\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" + + " {\n" + + " \"client_id\": \"client_id\",\n" + + " \"use_for_member_access\": true,\n" + + " \"client\": {\n" + + " \"name\": \"name\",\n" + + " \"app_type\": \"app_type\",\n" + + " \"logo_uri\": \"logo_uri\",\n" + + " \"is_first_party\": true,\n" + + " \"grant_types\": [\n" + + " \"grant_types\"\n" + + " ],\n" + + " \"organization_usage\": \"deny\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.organizations() + .clients() + .delete( + "id", + DeleteOrganizationClientsRequestContent.builder() + .clients(Arrays.asList("clients")) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"clients\": [\n" + " \"clients\"\n" + " ]\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"); + } + } + + @Test + public void testGet() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"client_id\":\"client_id\",\"use_for_member_access\":true,\"client\":{\"name\":\"name\",\"app_type\":\"app_type\",\"logo_uri\":\"logo_uri\",\"is_first_party\":true,\"grant_types\":[\"grant_types\"],\"organization_usage\":\"deny\"}}")); + GetOrganizationClientResponseContent response = + client.organizations().clients().get("id", "client_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" + + " \"client_id\": \"client_id\",\n" + + " \"use_for_member_access\": true,\n" + + " \"client\": {\n" + + " \"name\": \"name\",\n" + + " \"app_type\": \"app_type\",\n" + + " \"logo_uri\": \"logo_uri\",\n" + + " \"is_first_party\": true,\n" + + " \"grant_types\": [\n" + + " \"grant_types\"\n" + + " ],\n" + + " \"organization_usage\": \"deny\"\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 testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"client_id\":\"client_id\",\"use_for_member_access\":true,\"client\":{\"name\":\"name\",\"app_type\":\"app_type\",\"logo_uri\":\"logo_uri\",\"is_first_party\":true,\"grant_types\":[\"grant_types\"],\"organization_usage\":\"deny\"}}")); + UpdateOrganizationClientResponseContent response = client.organizations() + .clients() + .update( + "id", + "client_id", + UpdateOrganizationClientRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"client_id\": \"client_id\",\n" + + " \"use_for_member_access\": true,\n" + + " \"client\": {\n" + + " \"name\": \"name\",\n" + + " \"app_type\": \"app_type\",\n" + + " \"logo_uri\": \"logo_uri\",\n" + + " \"is_first_party\": true,\n" + + " \"grant_types\": [\n" + + " \"grant_types\"\n" + + " ],\n" + + " \"organization_usage\": \"deny\"\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"); + } + } + + /** + * 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/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java index 084ae162..9dabc163 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsConnectionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.CreateOrganizationAllConnectionRequestParameters; import com.auth0.client.mgmt.organizations.types.ListOrganizationAllConnectionsRequestParameters; @@ -46,16 +45,16 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"connections\":[{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"connections\":[{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"organization_member_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\"}]}")); SyncPagingIterable response = client.organizations() .connections() .list( "id", ListOrganizationAllConnectionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .isEnabled(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) + .isEnabled(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -73,7 +72,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); + "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"organization_member_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); CreateOrganizationAllConnectionResponseContent response = client.organizations() .connections() .create( @@ -124,6 +123,7 @@ else if (actualJson.has("kind")) + " \"show_as_button\": true,\n" + " \"is_signup_enabled\": true,\n" + " \"organization_access_level\": \"none\",\n" + + " \"organization_member_access_level\": \"none\",\n" + " \"is_enabled\": true,\n" + " \"connection_id\": \"connection_id\",\n" + " \"connection\": {\n" @@ -168,7 +168,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); + "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"organization_member_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); GetOrganizationAllConnectionResponseContent response = client.organizations().connections().get("id", "connection_id"); RecordedRequest request = server.takeRequest(); @@ -185,6 +185,7 @@ public void testGet() throws Exception { + " \"show_as_button\": true,\n" + " \"is_signup_enabled\": true,\n" + " \"organization_access_level\": \"none\",\n" + + " \"organization_member_access_level\": \"none\",\n" + " \"is_enabled\": true,\n" + " \"connection_id\": \"connection_id\",\n" + " \"connection\": {\n" @@ -238,7 +239,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); + "{\"organization_connection_name\":\"organization_connection_name\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"organization_access_level\":\"none\",\"organization_member_access_level\":\"none\",\"is_enabled\":true,\"connection_id\":\"connection_id\",\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); UpdateOrganizationAllConnectionResponseContent response = client.organizations() .connections() .update( @@ -288,6 +289,7 @@ else if (actualJson.has("kind")) + " \"show_as_button\": true,\n" + " \"is_signup_enabled\": true,\n" + " \"organization_access_level\": \"none\",\n" + + " \"organization_member_access_level\": \"none\",\n" + " \"is_enabled\": true,\n" + " \"connection_id\": \"connection_id\",\n" + " \"connection\": {\n" diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java index e3e17eed..2c94c550 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.CreateOrganizationDiscoveryDomainRequestContent; import com.auth0.client.mgmt.organizations.types.ListOrganizationDiscoveryDomainsRequestParameters; @@ -53,8 +52,8 @@ public void testList() throws Exception { .list( "id", ListOrganizationDiscoveryDomainsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java index 00eb0d9b..38420ee5 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.AddOrganizationConnectionRequestContent; import com.auth0.client.mgmt.organizations.types.ListOrganizationConnectionsRequestParameters; @@ -52,9 +51,9 @@ public void testList() throws Exception { .list( "id", ListOrganizationConnectionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsRolesWireTest.java index 97b14b84..033b32cd 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.groups.types.CreateOrganizationGroupRolesRequestContent; import com.auth0.client.mgmt.organizations.groups.types.DeleteOrganizationGroupRolesRequestContent; @@ -44,7 +43,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}],\"next\":\"next\"}")); + "{\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.organizations() .groups() .roles() @@ -52,8 +51,8 @@ public void testList() throws Exception { "organization_id", "group_id", ListOrganizationGroupRolesRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsWireTest.java index 04a42544..da3667f9 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsGroupsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.ListOrganizationGroupsRequestParameters; import com.auth0.client.mgmt.types.Group; @@ -47,8 +46,8 @@ public void testList() throws Exception { .list( "organization_id", ListOrganizationGroupsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java index 93c81cd3..3f90d23f 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.CreateOrganizationInvitationRequestContent; import com.auth0.client.mgmt.organizations.types.GetOrganizationInvitationRequestParameters; @@ -53,12 +52,12 @@ public void testList() throws Exception { .list( "id", ListOrganizationInvitationsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .sort(OptionalNullable.of("sort")) + .page(1) + .perPage(1) + .includeTotals(true) + .fields("fields") + .includeFields(true) + .sort("sort") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -205,8 +204,8 @@ public void testGet() throws Exception { "id", "invitation_id", GetOrganizationInvitationRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesSourcesGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesSourcesGroupsWireTest.java index 8ede4bf6..185af002 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesSourcesGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesSourcesGroupsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.members.effectiveroles.sources.types.ListOrganizationMemberRoleSourceGroupsRequestParameters; import com.auth0.client.mgmt.types.Group; @@ -52,8 +51,8 @@ public void testList() throws Exception { "user_id", ListOrganizationMemberRoleSourceGroupsRequestParameters.builder() .roleId("role_id") - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesWireTest.java index 1d71bf6e..241d1bbb 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersEffectiveRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.members.types.ListOrganizationMemberEffectiveRolesRequestParameters; import com.auth0.client.mgmt.types.OrganizationMemberEffectiveRole; @@ -49,8 +48,8 @@ public void testList() throws Exception { "id", "user_id", ListOrganizationMemberEffectiveRolesRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java index f9112346..581999a2 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.members.types.AssignOrganizationMemberRolesRequestContent; import com.auth0.client.mgmt.organizations.members.types.DeleteOrganizationMemberRolesRequestContent; @@ -44,7 +43,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}]}")); SyncPagingIterable response = client.organizations() .members() .roles() @@ -52,9 +51,9 @@ public void testList() throws Exception { "id", "user_id", ListOrganizationMemberRolesRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java index 395b97a5..7ee531a7 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.organizations.types.CreateOrganizationMemberRequestContent; import com.auth0.client.mgmt.organizations.types.DeleteOrganizationMembersRequestContent; @@ -50,10 +49,11 @@ public void testList() throws Exception { .list( "id", ListOrganizationMembersRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .includeTotals(true) + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsRolesGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsRolesGroupsWireTest.java new file mode 100644 index 00000000..8b628eef --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsRolesGroupsWireTest.java @@ -0,0 +1,95 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleGroupsRequestParameters; +import com.auth0.client.mgmt.types.RoleGroup; +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 OrganizationsRolesGroupsWireTest { + 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( + "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"organization_id\":\"organization_id\",\"tenant_name\":\"tenant_name\",\"description\":\"description\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.organizations() + .roles() + .groups() + .list( + "organization_id", + "role_id", + ListOrganizationRoleGroupsRequestParameters.builder() + .from("from") + .take(1) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + /** + * 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/java/com/auth0/client/mgmt/OrganizationsRolesMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsRolesMembersWireTest.java new file mode 100644 index 00000000..6a7bd5c5 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsRolesMembersWireTest.java @@ -0,0 +1,97 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleMembersRequestParameters; +import com.auth0.client.mgmt.types.RoleMember; +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 OrganizationsRolesMembersWireTest { + 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( + "{\"members\":[{\"user_id\":\"user_id\",\"picture\":\"picture\",\"name\":\"name\",\"email\":\"email\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.organizations() + .roles() + .members() + .list( + "id", + "role_id", + ListOrganizationRoleMembersRequestParameters.builder() + .from("from") + .take(1) + .fields("fields") + .includeFields(true) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + + /** + * 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/java/com/auth0/client/mgmt/OrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java index 42cba106..3315878a 100644 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateOrganizationRequestContent; import com.auth0.client.mgmt.types.CreateOrganizationResponseContent; @@ -9,6 +8,10 @@ import com.auth0.client.mgmt.types.GetOrganizationResponseContent; import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; import com.auth0.client.mgmt.types.Organization; +import com.auth0.client.mgmt.types.OrganizationSortFieldEnum; +import com.auth0.client.mgmt.types.SearchOrganization; +import com.auth0.client.mgmt.types.SearchOrganizationsRequestParameters; +import com.auth0.client.mgmt.types.SearchParserEnum; import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -47,12 +50,14 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"next\":\"next\",\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}}}]}")); + "{\"next\":\"next\",\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true}]}")); SyncPagingIterable response = client.organizations() .list(ListOrganizationsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .sort(OptionalNullable.of("sort")) + .includeTotals(true) + .from("from") + .take(1) + .sort("sort") + .includeClientAssociationFor("include_client_association_for") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -70,7 +75,7 @@ public void testCreate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"enabled_connections\":[{\"connection_id\":\"connection_id\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true}]}")); + "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true,\"client\":{\"use_for_member_access\":true},\"enabled_connections\":[{\"connection_id\":\"connection_id\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true}]}")); CreateOrganizationResponseContent response = client.organizations() .create(CreateOrganizationRequestContent.builder().name("name").build()); RecordedRequest request = server.takeRequest(); @@ -131,6 +136,11 @@ else if (actualJson.has("kind")) + " \"per_hour\": 1\n" + " }\n" + " },\n" + + " \"third_party_client_access\": \"block\",\n" + + " \"is_app_entitlement_active\": true,\n" + + " \"client\": {\n" + + " \"use_for_member_access\": true\n" + + " },\n" + " \"enabled_connections\": [\n" + " {\n" + " \"connection_id\": \"connection_id\",\n" @@ -177,7 +187,7 @@ public void testGetByName() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}}}")); + "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true,\"client\":{\"use_for_member_access\":true}}")); GetOrganizationByNameResponseContent response = client.organizations().getByName("name"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -207,6 +217,11 @@ public void testGetByName() throws Exception { + " \"per_day\": 1,\n" + " \"per_hour\": 1\n" + " }\n" + + " },\n" + + " \"third_party_client_access\": \"block\",\n" + + " \"is_app_entitlement_active\": true,\n" + + " \"client\": {\n" + + " \"use_for_member_access\": true\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -240,13 +255,38 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testSearch() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true}],\"next\":\"next\"}")); + SyncPagingIterable response = client.organizations() + .search(SearchOrganizationsRequestParameters.builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .take(1) + .from("from") + .sort(OrganizationSortFieldEnum.NAME) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + @Test public void testGet() throws Exception { server.enqueue( new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}}}")); + "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true,\"client\":{\"use_for_member_access\":true}}")); GetOrganizationResponseContent response = client.organizations().get("id"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -276,6 +316,11 @@ public void testGet() throws Exception { + " \"per_day\": 1,\n" + " \"per_hour\": 1\n" + " }\n" + + " },\n" + + " \"third_party_client_access\": \"block\",\n" + + " \"is_app_entitlement_active\": true,\n" + + " \"client\": {\n" + + " \"use_for_member_access\": true\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -324,7 +369,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}}}")); + "{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"}},\"metadata\":{\"key\":\"value\"},\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true,\"client\":{\"use_for_member_access\":true}}")); UpdateOrganizationResponseContent response = client.organizations() .update("id", UpdateOrganizationRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -384,6 +429,11 @@ else if (actualJson.has("kind")) + " \"per_day\": 1,\n" + " \"per_hour\": 1\n" + " }\n" + + " },\n" + + " \"third_party_client_access\": \"block\",\n" + + " \"is_app_entitlement_active\": true,\n" + + " \"client\": {\n" + + " \"use_for_member_access\": true\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/PortalsWireTest.java b/src/test/java/com/auth0/client/mgmt/PortalsWireTest.java new file mode 100644 index 00000000..7b6205b8 --- /dev/null +++ b/src/test/java/com/auth0/client/mgmt/PortalsWireTest.java @@ -0,0 +1,465 @@ +package com.auth0.client.mgmt; + +import com.auth0.client.mgmt.core.ObjectMappers; +import com.auth0.client.mgmt.types.CreatePortalRequestContent; +import com.auth0.client.mgmt.types.ListPortalsResponseContent; +import com.auth0.client.mgmt.types.Portal; +import com.auth0.client.mgmt.types.PortalClientSecretPostRequest; +import com.auth0.client.mgmt.types.PortalClientSecretPostRequestTokenEndpointAuthMethod; +import com.auth0.client.mgmt.types.UpdatePortalRequestContent; +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 PortalsWireTest { + 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( + "{\"portals\":[{\"id\":\"id\",\"name\":\"name\",\"slug\":\"slug\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); + ListPortalsResponseContent response = client.portals().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" + + " \"portals\": [\n" + + " {\n" + + " \"id\": \"id\",\n" + + " \"name\": \"name\",\n" + + " \"slug\": \"slug\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"navigation\":{\"sidebar\":{\"components\":[{\"config\":{\"label\":\"label\",\"url\":\"url\"},\"type\":\"sidebar:component:auth0:external_link\"}]}},\"pages\":{\"default\":\"default\",\"standard\":[{\"title\":\"title\",\"slug\":\"slug\"}]},\"slug\":\"slug\",\"client\":{\"token_endpoint_auth_method\":\"client_secret_post\",\"client_id\":\"client_id\"},\"custom_code\":{\"head\":\"head\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + Portal response = client.portals() + .create(CreatePortalRequestContent.builder() + .slug("slug") + .name("name") + .client(PortalClientSecretPostRequest.builder() + .tokenEndpointAuthMethod( + PortalClientSecretPostRequestTokenEndpointAuthMethod.CLIENT_SECRET_POST) + .clientId("client_id") + .clientSecret("client_secret") + .build()) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + + "{\n" + + " \"slug\": \"slug\",\n" + + " \"name\": \"name\",\n" + + " \"client\": {\n" + + " \"token_endpoint_auth_method\": \"client_secret_post\",\n" + + " \"client_id\": \"client_id\",\n" + + " \"client_secret\": \"client_secret\"\n" + + " }\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" + + " \"navigation\": {\n" + + " \"sidebar\": {\n" + + " \"components\": [\n" + + " {\n" + + " \"config\": {\n" + + " \"label\": \"label\",\n" + + " \"url\": \"url\"\n" + + " },\n" + + " \"type\": \"sidebar:component:auth0:external_link\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"pages\": {\n" + + " \"default\": \"default\",\n" + + " \"standard\": [\n" + + " {\n" + + " \"title\": \"title\",\n" + + " \"slug\": \"slug\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"slug\": \"slug\",\n" + + " \"client\": {\n" + + " \"token_endpoint_auth_method\": \"client_secret_post\",\n" + + " \"client_id\": \"client_id\"\n" + + " },\n" + + " \"custom_code\": {\n" + + " \"head\": \"head\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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\",\"navigation\":{\"sidebar\":{\"components\":[{\"config\":{\"label\":\"label\",\"url\":\"url\"},\"type\":\"sidebar:component:auth0:external_link\"}]}},\"pages\":{\"default\":\"default\",\"standard\":[{\"title\":\"title\",\"slug\":\"slug\"}]},\"slug\":\"slug\",\"client\":{\"token_endpoint_auth_method\":\"client_secret_post\",\"client_id\":\"client_id\"},\"custom_code\":{\"head\":\"head\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + Portal response = client.portals().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" + + " \"navigation\": {\n" + + " \"sidebar\": {\n" + + " \"components\": [\n" + + " {\n" + + " \"config\": {\n" + + " \"label\": \"label\",\n" + + " \"url\": \"url\"\n" + + " },\n" + + " \"type\": \"sidebar:component:auth0:external_link\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"pages\": {\n" + + " \"default\": \"default\",\n" + + " \"standard\": [\n" + + " {\n" + + " \"title\": \"title\",\n" + + " \"slug\": \"slug\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"slug\": \"slug\",\n" + + " \"client\": {\n" + + " \"token_endpoint_auth_method\": \"client_secret_post\",\n" + + " \"client_id\": \"client_id\"\n" + + " },\n" + + " \"custom_code\": {\n" + + " \"head\": \"head\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.portals().delete("id"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + + @Test + public void testUpdate() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"navigation\":{\"sidebar\":{\"components\":[{\"config\":{\"label\":\"label\",\"url\":\"url\"},\"type\":\"sidebar:component:auth0:external_link\"}]}},\"pages\":{\"default\":\"default\",\"standard\":[{\"title\":\"title\",\"slug\":\"slug\"}]},\"slug\":\"slug\",\"client\":{\"token_endpoint_auth_method\":\"client_secret_post\",\"client_id\":\"client_id\"},\"custom_code\":{\"head\":\"head\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); + Portal response = client.portals() + .update("id", UpdatePortalRequestContent.builder().build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("PATCH", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{}"; + 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" + + " \"navigation\": {\n" + + " \"sidebar\": {\n" + + " \"components\": [\n" + + " {\n" + + " \"config\": {\n" + + " \"label\": \"label\",\n" + + " \"url\": \"url\"\n" + + " },\n" + + " \"type\": \"sidebar:component:auth0:external_link\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " },\n" + + " \"pages\": {\n" + + " \"default\": \"default\",\n" + + " \"standard\": [\n" + + " {\n" + + " \"title\": \"title\",\n" + + " \"slug\": \"slug\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"slug\": \"slug\",\n" + + " \"client\": {\n" + + " \"token_endpoint_auth_method\": \"client_secret_post\",\n" + + " \"client_id\": \"client_id\"\n" + + " },\n" + + " \"custom_code\": {\n" + + " \"head\": \"head\"\n" + + " },\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"updated_at\": \"2024-01-15T09:30:00Z\"\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/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java index 4dad4ed1..171b08c6 100644 --- a/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.prompts.types.BulkUpdateAculRequestContent; import com.auth0.client.mgmt.prompts.types.ListAculsRequestParameters; @@ -55,14 +54,14 @@ public void testList() throws Exception { SyncPagingIterable response = client.prompts() .rendering() .list(ListAculsRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .prompt(OptionalNullable.of("prompt")) - .screen(OptionalNullable.of("screen")) - .renderingMode(OptionalNullable.of(AculRenderingModeEnum.ADVANCED)) + .fields("fields") + .includeFields(true) + .page(1) + .perPage(1) + .includeTotals(true) + .prompt("prompt") + .screen("screen") + .renderingMode(AculRenderingModeEnum.ADVANCED) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/RateLimitPoliciesWireTest.java b/src/test/java/com/auth0/client/mgmt/RateLimitPoliciesWireTest.java index e34af91e..2751c90f 100644 --- a/src/test/java/com/auth0/client/mgmt/RateLimitPoliciesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RateLimitPoliciesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateRateLimitPolicyRequestContent; import com.auth0.client.mgmt.types.CreateRateLimitPolicyResponseContent; @@ -57,11 +56,11 @@ public void testList() throws Exception { "{\"rate_limit_policies\":[{\"id\":\"id\",\"resource\":\"oauth_authentication_api\",\"consumer\":\"client\",\"consumer_selector\":\"consumer_selector\",\"configuration\":{\"action\":\"allow\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); SyncPagingIterable response = client.rateLimitPolicies() .list(ListRateLimitPoliciesRequestParameters.builder() - .resource(OptionalNullable.of(RateLimitPolicyResourceEnum.OAUTH_AUTHENTICATION_API)) - .consumer(OptionalNullable.of(RateLimitPolicyConsumerEnum.CLIENT)) - .consumerSelector(OptionalNullable.of("consumer_selector")) - .take(OptionalNullable.of(1)) - .from(OptionalNullable.of("from")) + .resource(RateLimitPolicyResourceEnum.OAUTH_AUTHENTICATION_API) + .consumer(RateLimitPolicyConsumerEnum.CLIENT) + .consumerSelector("consumer_selector") + .take(1) + .from("from") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java b/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java index 743ec853..9f7cff2c 100644 --- a/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.GetRefreshTokenResponseContent; import com.auth0.client.mgmt.types.GetRefreshTokensRequestParameters; @@ -49,11 +48,11 @@ public void testList() throws Exception { SyncPagingIterable response = client.refreshTokens() .list(GetRefreshTokensRequestParameters.builder() .userId("user_id") - .clientId(OptionalNullable.of("client_id")) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .clientId("client_id") + .from("from") + .take(1) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java index a3c51d64..6ffee791 100644 --- a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateResourceServerRequestContent; import com.auth0.client.mgmt.types.CreateResourceServerResponseContent; @@ -9,6 +8,10 @@ import com.auth0.client.mgmt.types.GetResourceServerResponseContent; import com.auth0.client.mgmt.types.ListResourceServerRequestParameters; import com.auth0.client.mgmt.types.ResourceServer; +import com.auth0.client.mgmt.types.ResourceServerSearchResponse; +import com.auth0.client.mgmt.types.ResourceServerSortFieldEnum; +import com.auth0.client.mgmt.types.SearchParserEnum; +import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters; import com.auth0.client.mgmt.types.UpdateResourceServerRequestContent; import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -48,13 +51,13 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"resource_servers\":[{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"allow_online_access_with_ephemeral_sessions\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"alg\":\"RSA-OAEP-256\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true},\"authorization_policy\":{\"policy_id\":\"policy_id\"},\"client_id\":\"client_id\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"resource_servers\":[{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":true,\"allow_online_access\":true,\"allow_online_access_with_ephemeral_sessions\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_lifetime_for_anonymous_access_tokens\":1,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"alg\":\"RSA-OAEP-256\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"require_consent_non_repudiation\":true,\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true},\"authorization_policy\":{\"policy_id\":\"policy_id\"},\"client_id\":\"client_id\",\"agent_subject_claims\":\"off\",\"type\":\"universal_commerce_protocol_server\"}]}")); SyncPagingIterable response = client.resourceServers() .list(ListResourceServerRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .includeFields(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) + .includeFields(true) .identifiers(Arrays.asList("identifiers")) .build()); RecordedRequest request = server.takeRequest(); @@ -145,6 +148,33 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testSearch() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"resource_servers\":[{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\"}],\"signing_alg\":\"HS256\",\"allow_offline_access\":true,\"allow_online_access\":true,\"allow_online_access_with_ephemeral_sessions\":true,\"skip_consent_for_verifiable_first_party_clients\":true,\"token_lifetime\":1,\"token_lifetime_for_web\":1,\"enforce_policies\":true,\"token_lifetime_for_anonymous_access_tokens\":1,\"token_dialect\":\"access_token\",\"token_encryption\":{\"format\":\"compact-nested-jwe\",\"encryption_key\":{\"alg\":\"RSA-OAEP-256\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"require_consent_non_repudiation\":true,\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true},\"authorization_policy\":{\"policy_id\":\"policy_id\"},\"client_id\":\"client_id\",\"agent_subject_claims\":\"off\",\"type\":\"universal_commerce_protocol_server\"}],\"next\":\"next\"}")); + SyncPagingIterable response = client.resourceServers() + .search(SearchResourceServersRequestParameters.builder() + .q("q") + .parser(SearchParserEnum.SCIM) + .fields("fields") + .includeFields(true) + .take(1) + .from("from") + .sort(ResourceServerSortFieldEnum.IDENTIFIER) + .build()); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("GET", request.getMethod()); + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + // Pagination response validated via MockWebServer + // The SDK correctly parses the response into a SyncPagingIterable + } + @Test public void testGet() throws Exception { server.enqueue(new MockResponse() @@ -154,7 +184,7 @@ public void testGet() throws Exception { .get( "id", GetResourceServerRequestParameters.builder() - .includeFields(OptionalNullable.of(true)) + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/RolesGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesGroupsWireTest.java index 8d4fd06a..7c855896 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesGroupsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.roles.types.AssignRoleGroupsRequestContent; import com.auth0.client.mgmt.roles.types.DeleteRoleGroupsRequestContent; @@ -49,10 +48,7 @@ public void testGet() throws Exception { .groups() .get( "id", - ListRoleGroupsParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .build()); + ListRoleGroupsParameters.builder().from("from").take(1).build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); Assertions.assertEquals("GET", request.getMethod()); diff --git a/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java index af57125a..02921701 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.roles.types.AddRolePermissionsRequestContent; import com.auth0.client.mgmt.roles.types.DeleteRolePermissionsRequestContent; @@ -51,9 +50,9 @@ public void testList() throws Exception { .list( "id", ListRolePermissionsRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .perPage(1) + .page(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java index 710571a6..eaf6b950 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.roles.types.AssignRoleUsersRequestContent; import com.auth0.client.mgmt.roles.types.ListRoleUsersRequestParameters; @@ -49,8 +48,9 @@ public void testList() throws Exception { .list( "id", ListRoleUsersRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/RolesWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesWireTest.java index 461ba389..d5ab99b0 100644 --- a/src/test/java/com/auth0/client/mgmt/RolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RolesWireTest.java @@ -1,13 +1,13 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateRoleRequestContent; import com.auth0.client.mgmt.types.CreateRoleResponseContent; import com.auth0.client.mgmt.types.GetRoleResponseContent; import com.auth0.client.mgmt.types.ListRolesRequestParameters; import com.auth0.client.mgmt.types.Role; +import com.auth0.client.mgmt.types.RoleTypeEnum; import com.auth0.client.mgmt.types.UpdateRoleRequestContent; import com.auth0.client.mgmt.types.UpdateRoleResponseContent; import com.fasterxml.jackson.databind.JsonNode; @@ -46,13 +46,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}]}")); SyncPagingIterable response = client.roles() .list(ListRolesRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .nameFilter(OptionalNullable.of("name_filter")) + .perPage(1) + .page(1) + .includeTotals(true) + .nameFilter("name_filter") + .type(RoleTypeEnum.TENANT) + .ownerId("owner_id") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -66,9 +68,11 @@ public void testList() throws Exception { @Test public void testCreate() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}")); + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}")); CreateRoleResponseContent response = client.roles() .create(CreateRoleRequestContent.builder().name("name").build()); RecordedRequest request = server.takeRequest(); @@ -111,7 +115,9 @@ else if (actualJson.has("kind")) + "{\n" + " \"id\": \"id\",\n" + " \"name\": \"name\",\n" - + " \"description\": \"description\"\n" + + " \"description\": \"description\",\n" + + " \"type\": \"tenant\",\n" + + " \"owner_id\": \"owner_id\"\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); @@ -146,9 +152,11 @@ else if (actualResponseNode.has("kind")) @Test public void testGet() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}")); + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}")); GetRoleResponseContent response = client.roles().get("id"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -161,7 +169,9 @@ public void testGet() throws Exception { + "{\n" + " \"id\": \"id\",\n" + " \"name\": \"name\",\n" - + " \"description\": \"description\"\n" + + " \"description\": \"description\",\n" + + " \"type\": \"tenant\",\n" + + " \"owner_id\": \"owner_id\"\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); @@ -205,9 +215,11 @@ public void testDelete() throws Exception { @Test public void testUpdate() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}")); + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}")); UpdateRoleResponseContent response = client.roles().update("id", UpdateRoleRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -250,7 +262,9 @@ else if (actualJson.has("kind")) + "{\n" + " \"id\": \"id\",\n" + " \"name\": \"name\",\n" - + " \"description\": \"description\"\n" + + " \"description\": \"description\",\n" + + " \"type\": \"tenant\",\n" + + " \"owner_id\": \"owner_id\"\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); diff --git a/src/test/java/com/auth0/client/mgmt/RulesWireTest.java b/src/test/java/com/auth0/client/mgmt/RulesWireTest.java index f8b04fc5..f886cf00 100644 --- a/src/test/java/com/auth0/client/mgmt/RulesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/RulesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateRuleRequestContent; import com.auth0.client.mgmt.types.CreateRuleResponseContent; @@ -50,12 +49,12 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"rules\":[{\"name\":\"name\",\"id\":\"id\",\"enabled\":true,\"script\":\"script\",\"order\":1.1,\"stage\":\"stage\"}]}")); SyncPagingIterable response = client.rules() .list(ListRulesRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .enabled(OptionalNullable.of(true)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) + .enabled(true) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -166,8 +165,8 @@ public void testGet() throws Exception { .get( "id", GetRuleRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java index 2d195406..1fcacba3 100644 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateSelfServiceProfileRequestContent; import com.auth0.client.mgmt.types.CreateSelfServiceProfileResponseContent; @@ -49,9 +48,9 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"self_service_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"user_attributes\":[{\"name\":\"name\",\"description\":\"description\",\"is_optional\":true}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"allowed_strategies\":[\"oidc\"],\"user_attribute_profile_id\":\"user_attribute_profile_id\"}]}")); SyncPagingIterable response = client.selfServiceProfiles() .list(ListSelfServiceProfilesRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java b/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java index d44419d2..0ff88343 100644 --- a/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java @@ -40,7 +40,7 @@ public void testGet() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"authenticated_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"last_interacted_at\":\"2024-01-15T09:30:00Z\",\"device\":{\"initial_user_agent\":\"initial_user_agent\",\"initial_ip\":\"initial_ip\",\"initial_asn\":\"initial_asn\",\"last_user_agent\":\"last_user_agent\",\"last_ip\":\"last_ip\",\"last_asn\":\"last_asn\"},\"clients\":[{\"client_id\":\"client_id\"}],\"authentication\":{\"methods\":[{}]},\"cookie\":{\"mode\":\"non-persistent\"},\"session_metadata\":{\"key\":\"value\"}}")); + "{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"authenticated_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"last_interacted_at\":\"2024-01-15T09:30:00Z\",\"device\":{\"initial_user_agent\":\"initial_user_agent\",\"initial_ip\":\"initial_ip\",\"initial_asn\":\"initial_asn\",\"last_user_agent\":\"last_user_agent\",\"last_ip\":\"last_ip\",\"last_asn\":\"last_asn\"},\"clients\":[{\"client_id\":\"client_id\"}],\"authentication\":{\"methods\":[{}]},\"cookie\":{\"mode\":\"non-persistent\"},\"session_metadata\":{\"key\":\"value\"},\"actor\":{\"sub\":\"sub\"}}")); GetSessionResponseContent response = client.sessions().get("id"); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -82,6 +82,9 @@ public void testGet() throws Exception { + " },\n" + " \"session_metadata\": {\n" + " \"key\": \"value\"\n" + + " },\n" + + " \"actor\": {\n" + + " \"sub\": \"sub\"\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); @@ -130,7 +133,7 @@ public void testUpdate() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"authenticated_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"last_interacted_at\":\"2024-01-15T09:30:00Z\",\"device\":{\"initial_user_agent\":\"initial_user_agent\",\"initial_ip\":\"initial_ip\",\"initial_asn\":\"initial_asn\",\"last_user_agent\":\"last_user_agent\",\"last_ip\":\"last_ip\",\"last_asn\":\"last_asn\"},\"clients\":[{\"client_id\":\"client_id\"}],\"authentication\":{\"methods\":[{}]},\"cookie\":{\"mode\":\"non-persistent\"},\"session_metadata\":{\"key\":\"value\"}}")); + "{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"authenticated_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"last_interacted_at\":\"2024-01-15T09:30:00Z\",\"device\":{\"initial_user_agent\":\"initial_user_agent\",\"initial_ip\":\"initial_ip\",\"initial_asn\":\"initial_asn\",\"last_user_agent\":\"last_user_agent\",\"last_ip\":\"last_ip\",\"last_asn\":\"last_asn\"},\"clients\":[{\"client_id\":\"client_id\"}],\"authentication\":{\"methods\":[{}]},\"cookie\":{\"mode\":\"non-persistent\"},\"session_metadata\":{\"key\":\"value\"},\"actor\":{\"sub\":\"sub\"}}")); UpdateSessionResponseContent response = client.sessions() .update("id", UpdateSessionRequestContent.builder().build()); RecordedRequest request = server.takeRequest(); @@ -202,6 +205,9 @@ else if (actualJson.has("kind")) + " },\n" + " \"session_metadata\": {\n" + " \"key\": \"value\"\n" + + " },\n" + + " \"actor\": {\n" + + " \"sub\": \"sub\"\n" + " }\n" + "}"; JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); diff --git a/src/test/java/com/auth0/client/mgmt/StatsWireTest.java b/src/test/java/com/auth0/client/mgmt/StatsWireTest.java index 0b912d2e..605afe74 100644 --- a/src/test/java/com/auth0/client/mgmt/StatsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/StatsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.DailyStats; import com.auth0.client.mgmt.types.GetDailyStatsRequestParameters; import com.fasterxml.jackson.databind.JsonNode; @@ -87,8 +86,8 @@ public void testGetDaily() throws Exception { "[{\"date\":\"date\",\"logins\":1,\"signups\":1,\"leaked_passwords\":1,\"updated_at\":\"updated_at\",\"created_at\":\"created_at\"}]")); List response = client.stats() .getDaily(GetDailyStatsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .to(OptionalNullable.of("to")) + .from("from") + .to("to") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java index 390f6ea5..ae99ffd2 100644 --- a/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.tenants.types.GetTenantSettingsRequestParameters; import com.auth0.client.mgmt.tenants.types.UpdateTenantSettingsRequestContent; import com.auth0.client.mgmt.types.GetTenantSettingsResponseContent; @@ -44,8 +43,8 @@ public void testGet() throws Exception { GetTenantSettingsResponseContent response = client.tenants() .settings() .get(GetTenantSettingsRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java index ab630d02..22d45007 100644 --- a/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateTokenExchangeProfileRequestContent; import com.auth0.client.mgmt.types.CreateTokenExchangeProfileResponseContent; @@ -49,8 +48,8 @@ public void testList() throws Exception { "{\"next\":\"next\",\"token_exchange_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"subject_token_type\":\"subject_token_type\",\"action_id\":\"action_id\",\"type\":\"custom_authentication\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); SyncPagingIterable response = client.tokenExchangeProfiles() .list(TokenExchangeProfilesListRequest.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java b/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java index bb20b6be..07e34278 100644 --- a/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java +++ b/src/test/java/com/auth0/client/mgmt/UndiscriminatedUnionTest.java @@ -26,6 +26,11 @@ import com.auth0.client.mgmt.types.LogStreamSplunkSink; import com.auth0.client.mgmt.types.LogStreamSumoSink; import com.auth0.client.mgmt.types.PhoneProviderConfiguration; +import com.auth0.client.mgmt.types.SegmentContainsExpression; +import com.auth0.client.mgmt.types.SegmentEndsWithExpression; +import com.auth0.client.mgmt.types.SegmentExistsExpression; +import com.auth0.client.mgmt.types.SegmentMatchExpression; +import com.auth0.client.mgmt.types.SegmentStartsWithExpression; import com.auth0.client.mgmt.types.TwilioProviderConfiguration; import org.junit.jupiter.api.Test; @@ -151,4 +156,40 @@ public void testPhoneProviderConfiguration_CustomProviderConfiguration() throws union.get() instanceof CustomProviderConfiguration, "Expected CustomProviderConfiguration but got different variant"); } + + @Test + public void testSegmentMatchExpression_SegmentContainsExpression() throws Exception { + String json = "{\"contains\":[]}"; + SegmentMatchExpression union = ObjectMappers.JSON_MAPPER.readValue(json, SegmentMatchExpression.class); + assertTrue( + union.get() instanceof SegmentContainsExpression, + "Expected SegmentContainsExpression but got different variant"); + } + + @Test + public void testSegmentMatchExpression_SegmentStartsWithExpression() throws Exception { + String json = "{\"starts_with\":[]}"; + SegmentMatchExpression union = ObjectMappers.JSON_MAPPER.readValue(json, SegmentMatchExpression.class); + assertTrue( + union.get() instanceof SegmentStartsWithExpression, + "Expected SegmentStartsWithExpression but got different variant"); + } + + @Test + public void testSegmentMatchExpression_SegmentEndsWithExpression() throws Exception { + String json = "{\"ends_with\":[]}"; + SegmentMatchExpression union = ObjectMappers.JSON_MAPPER.readValue(json, SegmentMatchExpression.class); + assertTrue( + union.get() instanceof SegmentEndsWithExpression, + "Expected SegmentEndsWithExpression but got different variant"); + } + + @Test + public void testSegmentMatchExpression_SegmentExistsExpression() throws Exception { + String json = "{\"exists\":true}"; + SegmentMatchExpression union = ObjectMappers.JSON_MAPPER.readValue(json, SegmentMatchExpression.class); + assertTrue( + union.get() instanceof SegmentExistsExpression, + "Expected SegmentExistsExpression but got different variant"); + } } diff --git a/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java index 6f98db41..961f7d2e 100644 --- a/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateUserAttributeProfileRequestContent; import com.auth0.client.mgmt.types.CreateUserAttributeProfileResponseContent; @@ -53,8 +52,8 @@ public void testList() throws Exception { "{\"next\":\"next\",\"user_attribute_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"user_attributes\":{\"key\":{\"description\":\"description\",\"label\":\"label\",\"profile_required\":true,\"auth0_mapping\":\"auth0_mapping\"}}}]}")); SyncPagingIterable response = client.userAttributeProfiles() .list(ListUserAttributeProfileRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java b/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java index 0fad1f5e..29ed194d 100644 --- a/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.types.DeleteUserBlocksByIdentifierRequestParameters; import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierRequestParameters; import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierResponseContent; @@ -47,7 +46,7 @@ public void testListByIdentifier() throws Exception { ListUserBlocksByIdentifierResponseContent response = client.userBlocks() .listByIdentifier(ListUserBlocksByIdentifierRequestParameters.builder() .identifier("identifier") - .considerBruteForceEnablement(OptionalNullable.of(true)) + .considerBruteForceEnablement(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -120,7 +119,7 @@ public void testList() throws Exception { .list( "id", ListUserBlocksRequestParameters.builder() - .considerBruteForceEnablement(OptionalNullable.of(true)) + .considerBruteForceEnablement(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java index 672f5c68..4951facc 100644 --- a/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.DeleteUserGrantByUserIdRequestParameters; import com.auth0.client.mgmt.types.ListUserGrantsRequestParameters; @@ -42,15 +41,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"grants\":[{\"id\":\"id\",\"clientID\":\"clientID\",\"user_id\":\"user_id\",\"audience\":\"audience\",\"scope\":[\"scope\"]}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"grants\":[{\"id\":\"id\",\"clientID\":\"clientID\",\"user_id\":\"user_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_id\":\"organization_id\"}]}")); SyncPagingIterable response = client.userGrants() .list(ListUserGrantsRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .userId(OptionalNullable.of("user_id")) - .clientId(OptionalNullable.of("client_id")) - .audience(OptionalNullable.of("audience")) + .perPage(1) + .page(1) + .includeTotals(true) + .userId("user_id") + .clientId("client_id") + .audience("audience") .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java index 4e644b1a..00778ed3 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.AuthenticationTypeEnum; import com.auth0.client.mgmt.types.CreateUserAuthenticationMethodResponseContent; @@ -58,9 +57,9 @@ public void testList() throws Exception { .list( "id", ListUserAuthenticationMethodsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java index 3dc8b55f..a74338fc 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.ConnectedAccount; import com.auth0.client.mgmt.users.types.GetUserConnectedAccountsRequestParameters; @@ -47,8 +46,8 @@ public void testList() throws Exception { .list( "id", GetUserConnectedAccountsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsSourcesRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsSourcesRolesWireTest.java index 54c0c7dd..2e5515c5 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsSourcesRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsSourcesRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.UserEffectivePermissionRoleSourceResponseContent; import com.auth0.client.mgmt.users.effectivepermissions.sources.types.ListUserEffectivePermissionRoleSourceRequestParameters; @@ -41,7 +40,7 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"sources\":[\"direct\"]}],\"next\":\"next\"}")); + "{\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\",\"sources\":[\"direct\"]}],\"next\":\"next\"}")); SyncPagingIterable response = client.users() .effectivePermissions() .sources() @@ -51,8 +50,8 @@ public void testList() throws Exception { ListUserEffectivePermissionRoleSourceRequestParameters.builder() .resourceServerIdentifier("resource_server_identifier") .permissionName("permission_name") - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsWireTest.java index e1584faa..d0829a20 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersEffectivePermissionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.UserEffectivePermissionResponseContent; import com.auth0.client.mgmt.users.types.ListUserEffectivePermissionsRequestParameters; @@ -48,8 +47,8 @@ public void testList() throws Exception { "id", ListUserEffectivePermissionsRequestParameters.builder() .resourceServerIdentifier("resource_server_identifier") - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesSourcesGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesSourcesGroupsWireTest.java index 9f6471f6..7f9fbeab 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesSourcesGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesSourcesGroupsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Group; import com.auth0.client.mgmt.users.effectiveroles.sources.types.ListUserRoleSourceGroupsRequestParameters; @@ -50,8 +49,8 @@ public void testList() throws Exception { "id", ListUserRoleSourceGroupsRequestParameters.builder() .roleId("role_id") - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesWireTest.java index 20eeae31..df417b61 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersEffectiveRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.UserEffectiveRole; import com.auth0.client.mgmt.users.types.ListUserEffectiveRolesRequestParameters; @@ -47,8 +46,8 @@ public void testList() throws Exception { .list( "id", ListUserEffectiveRolesRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java deleted file mode 100644 index fcf09446..00000000 --- a/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.FederatedConnectionTokenSet; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; -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 UsersFederatedConnectionsTokensetsWireTest { - 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( - "[{\"id\":\"id\",\"connection\":\"connection\",\"scope\":\"scope\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"issued_at\":\"2024-01-15T09:30:00Z\",\"last_used_at\":\"2024-01-15T09:30:00Z\"}]")); - List response = - client.users().federatedConnectionsTokensets().list("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" - + " {\n" - + " \"id\": \"id\",\n" - + " \"connection\": \"connection\",\n" - + " \"scope\": \"scope\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"issued_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_used_at\": \"2024-01-15T09:30:00Z\"\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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().federatedConnectionsTokensets().delete("id", "tokenset_id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - } - - /** - * 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/java/com/auth0/client/mgmt/UsersGroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java index ad51418f..e0862621 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.UserGroupsResponseSchema; import com.auth0.client.mgmt.users.types.GetUserGroupsRequestParameters; @@ -47,10 +46,11 @@ public void testGet() throws Exception { .get( "id", GetUserGroupsRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .fields("fields") + .includeFields(true) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java index 3316ff72..bb7b8b8b 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Log; import com.auth0.client.mgmt.users.types.ListUserLogsRequestParameters; @@ -47,10 +46,10 @@ public void testList() throws Exception { .list( "id", ListUserLogsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .sort(OptionalNullable.of("sort")) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .sort("sort") + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java index 95b65b68..d29bb98a 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Organization; import com.auth0.client.mgmt.users.types.ListUserOrganizationsRequestParameters; @@ -41,15 +40,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}}}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}},\"third_party_client_access\":\"block\",\"is_app_entitlement_active\":true}]}")); SyncPagingIterable response = client.users() .organizations() .list( "id", ListUserOrganizationsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java index 24ba7238..2997a796 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.PermissionRequestPayload; import com.auth0.client.mgmt.types.UserPermissionSchema; @@ -51,9 +50,9 @@ public void testList() throws Exception { .list( "id", ListUserPermissionsRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .perPage(1) + .page(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java index 13f3008b..19b88055 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.RefreshTokenResponseContent; import com.auth0.client.mgmt.users.types.ListRefreshTokensRequestParameters; @@ -47,8 +46,9 @@ public void testList() throws Exception { .list( "user_id", ListRefreshTokensRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java index 7c9f540e..5ab3fcee 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.Role; import com.auth0.client.mgmt.users.types.AssignUserRolesRequestContent; @@ -44,15 +43,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}")); + "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\",\"type\":\"tenant\",\"owner_id\":\"owner_id\"}]}")); SyncPagingIterable response = client.users() .roles() .list( "id", ListUserRolesRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) + .perPage(1) + .page(1) + .includeTotals(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java index 213c34ba..5c0f8a59 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.SessionResponseContent; import com.auth0.client.mgmt.users.types.ListUserSessionsRequestParameters; @@ -41,14 +40,15 @@ public void testList() throws Exception { new MockResponse() .setResponseCode(200) .setBody( - "{\"sessions\":[{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"authenticated_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"last_interacted_at\":\"2024-01-15T09:30:00Z\",\"clients\":[{}],\"session_metadata\":{\"key\":\"value\"}}],\"next\":\"next\"}")); + "{\"sessions\":[{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"authenticated_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"last_interacted_at\":\"2024-01-15T09:30:00Z\",\"clients\":[{}],\"session_metadata\":{\"key\":\"value\"},\"actor\":{\"sub\":\"sub\"}}],\"next\":\"next\"}")); SyncPagingIterable response = client.users() .sessions() .list( "user_id", ListUserSessionsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .includeTotals(true) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java index 3f3a5e2f..9f5dc24a 100644 --- a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java @@ -1,12 +1,13 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; +import com.auth0.client.mgmt.types.ConsentSigningKey; import com.auth0.client.mgmt.types.CreateUserRequestContent; import com.auth0.client.mgmt.types.CreateUserResponseContent; import com.auth0.client.mgmt.types.GetUserRequestParameters; import com.auth0.client.mgmt.types.GetUserResponseContent; +import com.auth0.client.mgmt.types.ListUserConsentSigningKeysResponseContent; import com.auth0.client.mgmt.types.ListUsersByEmailRequestParameters; import com.auth0.client.mgmt.types.ListUsersRequestParameters; import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; @@ -55,16 +56,16 @@ public void testList() throws Exception { "{\"start\":1.1,\"limit\":1.1,\"length\":1.1,\"total\":1.1,\"users\":[{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"multifactor_last_modified\":\"2024-01-15T09:30:00Z\",\"last_ip\":\"last_ip\",\"last_login\":\"2024-01-15T09:30:00Z\",\"last_password_reset\":\"2024-01-15T09:30:00Z\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}]}")); SyncPagingIterable response = client.users() .list(ListUsersRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .sort(OptionalNullable.of("sort")) - .connection(OptionalNullable.of("connection")) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .q(OptionalNullable.of("q")) - .searchEngine(OptionalNullable.of(SearchEngineVersionsEnum.V1)) - .primaryOrder(OptionalNullable.of(true)) + .page(1) + .perPage(1) + .includeTotals(true) + .sort("sort") + .connection("connection") + .fields("fields") + .includeFields(true) + .q("q") + .searchEngine(SearchEngineVersionsEnum.V1) + .primaryOrder(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -206,8 +207,8 @@ public void testListUsersByEmail() throws Exception { List response = client.users() .listUsersByEmail(ListUsersByEmailRequestParameters.builder() .email("email") - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -294,8 +295,8 @@ public void testGet() throws Exception { .get( "id", GetUserRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) + .fields("fields") + .includeFields(true) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); @@ -504,6 +505,125 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testListConsentSigningKeys() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"keys\":[{\"kid\":\"kid\",\"device_identifier\":\"device_identifier\",\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}]}")); + ListUserConsentSigningKeysResponseContent response = client.users().listConsentSigningKeys("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" + + " \"keys\": [\n" + + " {\n" + + " \"kid\": \"kid\",\n" + + " \"device_identifier\": \"device_identifier\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"expires_at\": \"2024-01-15T09:30:00Z\"\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 testGetConsentSigningKey() throws Exception { + server.enqueue( + new MockResponse() + .setResponseCode(200) + .setBody( + "{\"kid\":\"kid\",\"device_identifier\":\"device_identifier\",\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}")); + ConsentSigningKey response = client.users().getConsentSigningKey("id", "kid"); + 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" + + " \"kid\": \"kid\",\n" + + " \"device_identifier\": \"device_identifier\",\n" + + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" + + " \"expires_at\": \"2024-01-15T09:30:00Z\"\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 testDeleteConsentSigningKey() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); + client.users().deleteConsentSigningKey("id", "kid"); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("DELETE", request.getMethod()); + } + @Test public void testRegenerateRecoveryCode() throws Exception { server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"recovery_code\":\"recovery_code\"}")); diff --git a/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java index ff1f81ab..2db0c27c 100644 --- a/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java +++ b/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java @@ -1,7 +1,6 @@ package com.auth0.client.mgmt; import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; import com.auth0.client.mgmt.core.SyncPagingIterable; import com.auth0.client.mgmt.types.CreateVerifiableCredentialTemplateResponseContent; import com.auth0.client.mgmt.types.GetVerifiableCredentialTemplateResponseContent; @@ -54,8 +53,8 @@ public void testList() throws Exception { .verification() .templates() .list(ListVerifiableCredentialTemplatesRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) + .from("from") + .take(1) .build()); RecordedRequest request = server.takeRequest(); Assertions.assertNotNull(request); diff --git a/src/test/java/com/auth0/net/client/DefaultHttpClientTest.java b/src/test/java/com/auth0/net/client/DefaultHttpClientTest.java new file mode 100644 index 00000000..56c1960b --- /dev/null +++ b/src/test/java/com/auth0/net/client/DefaultHttpClientTest.java @@ -0,0 +1,69 @@ +package com.auth0.net.client; + +import static com.auth0.AssertsUtil.verifyThrows; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; + +import java.util.concurrent.TimeUnit; +import okhttp3.OkHttpClient; +import org.junit.jupiter.api.Test; + +public class DefaultHttpClientTest { + + @Test + public void shouldReuseBaseClientTransportConfigAndIgnoreBuilderTransportSettings() { + OkHttpClient baseClient = + new OkHttpClient.Builder().readTimeout(42, TimeUnit.SECONDS).build(); + baseClient.dispatcher().setMaxRequests(7); + + DefaultHttpClient httpClient = DefaultHttpClient.newBuilder() + .withClient(baseClient) + // Transport settings below must be ignored when a base client is supplied. + .withReadTimeout(99) + .withMaxRequests(99) + .build(); + + OkHttpClient built = httpClient.getOkClient(); + assertThat(built.readTimeoutMillis(), is(42_000)); + assertThat(built.dispatcher().getMaxRequests(), is(7)); + } + + @Test + public void shouldApplyBuilderTransportSettingsWhenNoBaseClient() { + DefaultHttpClient httpClient = DefaultHttpClient.newBuilder() + .withReadTimeout(42) + .withMaxRequests(7) + .build(); + + OkHttpClient built = httpClient.getOkClient(); + assertThat(built.readTimeoutMillis(), is(42_000)); + assertThat(built.dispatcher().getMaxRequests(), is(7)); + } + + @Test + public void shouldLayerSdkInterceptorsOnTopOfBaseClientInterceptors() { + OkHttpClient baseClient = new OkHttpClient.Builder() + .addInterceptor(chain -> chain.proceed(chain.request())) + .build(); + int baseInterceptorCount = baseClient.interceptors().size(); + + DefaultHttpClient httpClient = + DefaultHttpClient.newBuilder().withClient(baseClient).build(); + + // The base client's interceptor plus the three SDK interceptors (logging, telemetry, rate-limit). + assertThat(httpClient.getOkClient().interceptors().size(), is(baseInterceptorCount + 3)); + // The original base client is left untouched. + assertThat( + baseClient.interceptors().size(), + is(not(httpClient.getOkClient().interceptors().size()))); + } + + @Test + public void shouldThrowWhenBaseClientIsNull() { + verifyThrows( + IllegalArgumentException.class, + () -> DefaultHttpClient.newBuilder().withClient(null), + "'base client' cannot be null!"); + } +} diff --git a/src/test/resources/wire-tests/BrandingThemesWireTest_testCreate_response.json b/src/test/resources/wire-tests/BrandingThemesWireTest_testCreate_response.json index c42b4ed9..684d7ff8 100644 --- a/src/test/resources/wire-tests/BrandingThemesWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/BrandingThemesWireTest_testCreate_response.json @@ -62,6 +62,14 @@ "size": 1.1 } }, + "identifiers": { + "login_display": "separate", + "otp_autocomplete": true, + "phone_display": { + "formatting": "international", + "masking": "hide_country_code" + } + }, "page_background": { "background_color": "background_color", "background_image_url": "background_image_url", diff --git a/src/test/resources/wire-tests/BrandingThemesWireTest_testGetDefault_response.json b/src/test/resources/wire-tests/BrandingThemesWireTest_testGetDefault_response.json index c42b4ed9..684d7ff8 100644 --- a/src/test/resources/wire-tests/BrandingThemesWireTest_testGetDefault_response.json +++ b/src/test/resources/wire-tests/BrandingThemesWireTest_testGetDefault_response.json @@ -62,6 +62,14 @@ "size": 1.1 } }, + "identifiers": { + "login_display": "separate", + "otp_autocomplete": true, + "phone_display": { + "formatting": "international", + "masking": "hide_country_code" + } + }, "page_background": { "background_color": "background_color", "background_image_url": "background_image_url", diff --git a/src/test/resources/wire-tests/BrandingThemesWireTest_testGet_response.json b/src/test/resources/wire-tests/BrandingThemesWireTest_testGet_response.json index c42b4ed9..684d7ff8 100644 --- a/src/test/resources/wire-tests/BrandingThemesWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/BrandingThemesWireTest_testGet_response.json @@ -62,6 +62,14 @@ "size": 1.1 } }, + "identifiers": { + "login_display": "separate", + "otp_autocomplete": true, + "phone_display": { + "formatting": "international", + "masking": "hide_country_code" + } + }, "page_background": { "background_color": "background_color", "background_image_url": "background_image_url", diff --git a/src/test/resources/wire-tests/BrandingThemesWireTest_testUpdate_response.json b/src/test/resources/wire-tests/BrandingThemesWireTest_testUpdate_response.json index c42b4ed9..684d7ff8 100644 --- a/src/test/resources/wire-tests/BrandingThemesWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/BrandingThemesWireTest_testUpdate_response.json @@ -62,6 +62,14 @@ "size": 1.1 } }, + "identifiers": { + "login_display": "separate", + "otp_autocomplete": true, + "phone_display": { + "formatting": "international", + "masking": "hide_country_code" + } + }, "page_background": { "background_color": "background_color", "background_image_url": "background_image_url", diff --git a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json index e2eb8eb2..6cab43cb 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testCreate_response.json @@ -1,5 +1,7 @@ { "client_id": "client_id", + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z", "tenant": "tenant", "name": "name", "description": "description", @@ -340,6 +342,14 @@ ], "ip_allowlist": [ "ip_allowlist" + ], + "grants": [ + { + "connection": "connection", + "scopes": [ + "scopes" + ] + } ] }, "compliance_level": "none", @@ -370,7 +380,14 @@ ], "okta_oin_client_id": "okta_oin_client_id", "admin_login_domain": "admin_login_domain", - "oin_submission_id": "oin_submission_id" + "oin_submission_id": "oin_submission_id", + "okta_oin_listing_url": "okta_oin_listing_url" + }, + "b2b_integration_configuration": { + "sso_profiles": [ + "sso_profiles" + ], + "integration_type": "custom_auth_server" }, "my_organization_configuration": { "connection_profile_id": "connection_profile_id", @@ -378,10 +395,35 @@ "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" + "invitation_landing_client_id": "invitation_landing_client_id", + "enforce_permission_ceiling": true, + "enforce_self_assignment_restriction": true + }, + "google_account_linking": { + "allow_streamlined_linking": true + }, + "identity_assertion_authorization_grant": { + "active": true }, + "anonymous_sessions": { + "active": true + }, + "enforce_anon_session_transfer_network_binding": "ip", "third_party_security_mode": "strict", + "oidc_support": { + "is_allowed": true, + "allow_all_scopes": true, + "allowed_scopes": [ + "profile" + ] + }, "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ @@ -389,6 +431,8 @@ ], "external_metadata_type": "cimd", "external_metadata_created_by": "admin", + "external_metadata_status": "available", + "agent_id": "agent_id", "external_client_id": "external_client_id", "jwks_uri": "jwks_uri" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json index e2eb8eb2..6cab43cb 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testGet_response.json @@ -1,5 +1,7 @@ { "client_id": "client_id", + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z", "tenant": "tenant", "name": "name", "description": "description", @@ -340,6 +342,14 @@ ], "ip_allowlist": [ "ip_allowlist" + ], + "grants": [ + { + "connection": "connection", + "scopes": [ + "scopes" + ] + } ] }, "compliance_level": "none", @@ -370,7 +380,14 @@ ], "okta_oin_client_id": "okta_oin_client_id", "admin_login_domain": "admin_login_domain", - "oin_submission_id": "oin_submission_id" + "oin_submission_id": "oin_submission_id", + "okta_oin_listing_url": "okta_oin_listing_url" + }, + "b2b_integration_configuration": { + "sso_profiles": [ + "sso_profiles" + ], + "integration_type": "custom_auth_server" }, "my_organization_configuration": { "connection_profile_id": "connection_profile_id", @@ -378,10 +395,35 @@ "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" + "invitation_landing_client_id": "invitation_landing_client_id", + "enforce_permission_ceiling": true, + "enforce_self_assignment_restriction": true + }, + "google_account_linking": { + "allow_streamlined_linking": true + }, + "identity_assertion_authorization_grant": { + "active": true }, + "anonymous_sessions": { + "active": true + }, + "enforce_anon_session_transfer_network_binding": "ip", "third_party_security_mode": "strict", + "oidc_support": { + "is_allowed": true, + "allow_all_scopes": true, + "allowed_scopes": [ + "profile" + ] + }, "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ @@ -389,6 +431,8 @@ ], "external_metadata_type": "cimd", "external_metadata_created_by": "admin", + "external_metadata_status": "available", + "agent_id": "agent_id", "external_client_id": "external_client_id", "jwks_uri": "jwks_uri" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ClientsWireTest_testList_response.json b/src/test/resources/wire-tests/ClientsWireTest_testList_response.json index e1320f40..76e79026 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testList_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testList_response.json @@ -5,6 +5,8 @@ "clients": [ { "client_id": "client_id", + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z", "tenant": "tenant", "name": "name", "description": "description", @@ -97,6 +99,13 @@ ], "connection_deletion_behavior": "allow" }, + "identity_assertion_authorization_grant": { + "active": true + }, + "anonymous_sessions": { + "active": true + }, + "enforce_anon_session_transfer_network_binding": "ip", "third_party_security_mode": "strict", "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", @@ -105,6 +114,8 @@ ], "external_metadata_type": "cimd", "external_metadata_created_by": "admin", + "external_metadata_status": "available", + "agent_id": "agent_id", "external_client_id": "external_client_id", "jwks_uri": "jwks_uri" } diff --git a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json index e2eb8eb2..6cab43cb 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testRotateSecret_response.json @@ -1,5 +1,7 @@ { "client_id": "client_id", + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z", "tenant": "tenant", "name": "name", "description": "description", @@ -340,6 +342,14 @@ ], "ip_allowlist": [ "ip_allowlist" + ], + "grants": [ + { + "connection": "connection", + "scopes": [ + "scopes" + ] + } ] }, "compliance_level": "none", @@ -370,7 +380,14 @@ ], "okta_oin_client_id": "okta_oin_client_id", "admin_login_domain": "admin_login_domain", - "oin_submission_id": "oin_submission_id" + "oin_submission_id": "oin_submission_id", + "okta_oin_listing_url": "okta_oin_listing_url" + }, + "b2b_integration_configuration": { + "sso_profiles": [ + "sso_profiles" + ], + "integration_type": "custom_auth_server" }, "my_organization_configuration": { "connection_profile_id": "connection_profile_id", @@ -378,10 +395,35 @@ "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" + "invitation_landing_client_id": "invitation_landing_client_id", + "enforce_permission_ceiling": true, + "enforce_self_assignment_restriction": true + }, + "google_account_linking": { + "allow_streamlined_linking": true + }, + "identity_assertion_authorization_grant": { + "active": true }, + "anonymous_sessions": { + "active": true + }, + "enforce_anon_session_transfer_network_binding": "ip", "third_party_security_mode": "strict", + "oidc_support": { + "is_allowed": true, + "allow_all_scopes": true, + "allowed_scopes": [ + "profile" + ] + }, "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ @@ -389,6 +431,8 @@ ], "external_metadata_type": "cimd", "external_metadata_created_by": "admin", + "external_metadata_status": "available", + "agent_id": "agent_id", "external_client_id": "external_client_id", "jwks_uri": "jwks_uri" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ClientsWireTest_testSearch_response.json b/src/test/resources/wire-tests/ClientsWireTest_testSearch_response.json new file mode 100644 index 00000000..b0dd072d --- /dev/null +++ b/src/test/resources/wire-tests/ClientsWireTest_testSearch_response.json @@ -0,0 +1,117 @@ +{ + "clients": [ + { + "client_id": "client_id", + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z", + "tenant": "tenant", + "name": "name", + "description": "description", + "global": true, + "app_type": "native", + "logo_uri": "logo_uri", + "is_first_party": true, + "oidc_conformant": true, + "callbacks": [ + "callbacks" + ], + "allowed_origins": [ + "allowed_origins" + ], + "web_origins": [ + "web_origins" + ], + "client_aliases": [ + "client_aliases" + ], + "allowed_clients": [ + "allowed_clients" + ], + "allowed_logout_urls": [ + "allowed_logout_urls" + ], + "grant_types": [ + "grant_types" + ], + "sso": true, + "sso_disabled": true, + "cross_origin_authentication": true, + "cross_origin_loc": "cross_origin_loc", + "custom_login_page_on": true, + "custom_login_page": "custom_login_page", + "custom_login_page_preview": "custom_login_page_preview", + "form_template": "form_template", + "token_endpoint_auth_method": "none", + "is_token_endpoint_ip_header_trusted": true, + "client_metadata": { + "key": "value" + }, + "initiate_login_uri": "initiate_login_uri", + "refresh_token": { + "rotation_type": "rotating", + "expiration_type": "expiring" + }, + "default_organization": { + "organization_id": "organization_id", + "flows": [ + "client_credentials" + ] + }, + "organization_usage": "deny", + "organization_require_behavior": "no_prompt", + "organization_discovery_methods": [ + "email" + ], + "require_pushed_authorization_requests": true, + "require_proof_of_possession": true, + "token_vault_privileged_access": { + "credentials": [ + { + "id": "id" + } + ] + }, + "compliance_level": "none", + "skip_non_verifiable_callback_uri_confirmation_prompt": true, + "par_request_expiry": 1, + "token_quota": { + "client_credentials": {} + }, + "express_configuration": { + "initiate_login_uri_template": "initiate_login_uri_template", + "user_attribute_profile_id": "user_attribute_profile_id", + "connection_profile_id": "connection_profile_id", + "enable_client": true, + "enable_organization": true, + "okta_oin_client_id": "okta_oin_client_id", + "admin_login_domain": "admin_login_domain" + }, + "my_organization_configuration": { + "allowed_strategies": [ + "pingfederate" + ], + "connection_deletion_behavior": "allow" + }, + "identity_assertion_authorization_grant": { + "active": true + }, + "anonymous_sessions": { + "active": true + }, + "enforce_anon_session_transfer_network_binding": "ip", + "third_party_security_mode": "strict", + "redirection_policy": "allow_always", + "resource_server_identifier": "resource_server_identifier", + "async_approval_notification_channels": [ + "guardian-push" + ], + "external_metadata_type": "cimd", + "external_metadata_created_by": "admin", + "external_metadata_status": "available", + "agent_id": "agent_id", + "external_client_id": "external_client_id", + "jwks_uri": "jwks_uri" + } + ], + "next": "next" +} \ No newline at end of file diff --git a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json index e2eb8eb2..6cab43cb 100644 --- a/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ClientsWireTest_testUpdate_response.json @@ -1,5 +1,7 @@ { "client_id": "client_id", + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z", "tenant": "tenant", "name": "name", "description": "description", @@ -340,6 +342,14 @@ ], "ip_allowlist": [ "ip_allowlist" + ], + "grants": [ + { + "connection": "connection", + "scopes": [ + "scopes" + ] + } ] }, "compliance_level": "none", @@ -370,7 +380,14 @@ ], "okta_oin_client_id": "okta_oin_client_id", "admin_login_domain": "admin_login_domain", - "oin_submission_id": "oin_submission_id" + "oin_submission_id": "oin_submission_id", + "okta_oin_listing_url": "okta_oin_listing_url" + }, + "b2b_integration_configuration": { + "sso_profiles": [ + "sso_profiles" + ], + "integration_type": "custom_auth_server" }, "my_organization_configuration": { "connection_profile_id": "connection_profile_id", @@ -378,10 +395,35 @@ "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" + "invitation_landing_client_id": "invitation_landing_client_id", + "enforce_permission_ceiling": true, + "enforce_self_assignment_restriction": true + }, + "google_account_linking": { + "allow_streamlined_linking": true + }, + "identity_assertion_authorization_grant": { + "active": true }, + "anonymous_sessions": { + "active": true + }, + "enforce_anon_session_transfer_network_binding": "ip", "third_party_security_mode": "strict", + "oidc_support": { + "is_allowed": true, + "allow_all_scopes": true, + "allowed_scopes": [ + "profile" + ] + }, "redirection_policy": "allow_always", "resource_server_identifier": "resource_server_identifier", "async_approval_notification_channels": [ @@ -389,6 +431,8 @@ ], "external_metadata_type": "cimd", "external_metadata_created_by": "admin", + "external_metadata_status": "available", + "agent_id": "agent_id", "external_client_id": "external_client_id", "jwks_uri": "jwks_uri" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json index 700c8aa5..4179d896 100644 --- a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testCreate_response.json @@ -50,5 +50,25 @@ "scim" ] } + }, + "provisioning": { + "scim": { + "tokens": { + "scopes": [ + "get:users" + ] + } + }, + "google_workspace": { + "sync_users": true + } + }, + "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 700c8aa5..4179d896 100644 --- a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testGet_response.json @@ -50,5 +50,25 @@ "scim" ] } + }, + "provisioning": { + "scim": { + "tokens": { + "scopes": [ + "get:users" + ] + } + }, + "google_workspace": { + "sync_users": true + } + }, + "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 700c8aa5..4179d896 100644 --- a/src/test/resources/wire-tests/ConnectionProfilesWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ConnectionProfilesWireTest_testUpdate_response.json @@ -50,5 +50,25 @@ "scim" ] } + }, + "provisioning": { + "scim": { + "tokens": { + "scopes": [ + "get:users" + ] + } + }, + "google_workspace": { + "sync_users": true + } + }, + "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 d8b0169a..179fe3d5 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testGet_response.json @@ -15,6 +15,9 @@ "asns": [ 1 ], + "auth0_managed": [ + "auth0_managed" + ], "geo_country_codes": [ "geo_country_codes" ], @@ -44,12 +47,22 @@ ], "connecting_ipv6_cidrs": [ "connecting_ipv6_cidrs" - ] + ], + "http_message_signature": { + "keys": [ + { + "id": "id" + } + ] + } }, "not_match": { "asns": [ 1 ], + "auth0_managed": [ + "auth0_managed" + ], "geo_country_codes": [ "geo_country_codes" ], @@ -79,8 +92,16 @@ ], "connecting_ipv6_cidrs": [ "connecting_ipv6_cidrs" - ] + ], + "http_message_signature": { + "keys": [ + { + "id": "id" + } + ] + } }, + "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 d8b0169a..179fe3d5 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testSet_response.json @@ -15,6 +15,9 @@ "asns": [ 1 ], + "auth0_managed": [ + "auth0_managed" + ], "geo_country_codes": [ "geo_country_codes" ], @@ -44,12 +47,22 @@ ], "connecting_ipv6_cidrs": [ "connecting_ipv6_cidrs" - ] + ], + "http_message_signature": { + "keys": [ + { + "id": "id" + } + ] + } }, "not_match": { "asns": [ 1 ], + "auth0_managed": [ + "auth0_managed" + ], "geo_country_codes": [ "geo_country_codes" ], @@ -79,8 +92,16 @@ ], "connecting_ipv6_cidrs": [ "connecting_ipv6_cidrs" - ] + ], + "http_message_signature": { + "keys": [ + { + "id": "id" + } + ] + } }, + "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 d8b0169a..179fe3d5 100644 --- a/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/NetworkAclsWireTest_testUpdate_response.json @@ -15,6 +15,9 @@ "asns": [ 1 ], + "auth0_managed": [ + "auth0_managed" + ], "geo_country_codes": [ "geo_country_codes" ], @@ -44,12 +47,22 @@ ], "connecting_ipv6_cidrs": [ "connecting_ipv6_cidrs" - ] + ], + "http_message_signature": { + "keys": [ + { + "id": "id" + } + ] + } }, "not_match": { "asns": [ 1 ], + "auth0_managed": [ + "auth0_managed" + ], "geo_country_codes": [ "geo_country_codes" ], @@ -79,8 +92,16 @@ ], "connecting_ipv6_cidrs": [ "connecting_ipv6_cidrs" - ] + ], + "http_message_signature": { + "keys": [ + { + "id": "id" + } + ] + } }, + "match_all": true, "scope": "management" }, "created_at": "created_at", diff --git a/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json b/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json index ab2361d4..de9efe4a 100644 --- a/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json +++ b/src/test/resources/wire-tests/ResourceServersWireTest_testCreate_response.json @@ -18,7 +18,18 @@ "token_lifetime": 1, "token_lifetime_for_web": 1, "enforce_policies": true, + "token_lifetime_for_anonymous_access_tokens": 1, "token_dialect": "access_token", + "access_token": { + "claims_mapping": { + "custom_claims": [ + { + "name": "name", + "expression": "expression" + } + ] + } + }, "token_encryption": { "format": "compact-nested-jwe", "encryption_key": { @@ -29,6 +40,7 @@ } }, "consent_policy": "transactional-authorization-with-mfa", + "require_consent_non_repudiation": true, "authorization_details": [ { "key": "value" @@ -45,10 +57,15 @@ }, "client": { "policy": "deny_all" + }, + "anonymous_user": { + "policy": "deny_all" } }, "authorization_policy": { "policy_id": "policy_id" }, - "client_id": "client_id" + "client_id": "client_id", + "agent_subject_claims": "off", + "type": "universal_commerce_protocol_server" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json b/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json index ab2361d4..de9efe4a 100644 --- a/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/ResourceServersWireTest_testGet_response.json @@ -18,7 +18,18 @@ "token_lifetime": 1, "token_lifetime_for_web": 1, "enforce_policies": true, + "token_lifetime_for_anonymous_access_tokens": 1, "token_dialect": "access_token", + "access_token": { + "claims_mapping": { + "custom_claims": [ + { + "name": "name", + "expression": "expression" + } + ] + } + }, "token_encryption": { "format": "compact-nested-jwe", "encryption_key": { @@ -29,6 +40,7 @@ } }, "consent_policy": "transactional-authorization-with-mfa", + "require_consent_non_repudiation": true, "authorization_details": [ { "key": "value" @@ -45,10 +57,15 @@ }, "client": { "policy": "deny_all" + }, + "anonymous_user": { + "policy": "deny_all" } }, "authorization_policy": { "policy_id": "policy_id" }, - "client_id": "client_id" + "client_id": "client_id", + "agent_subject_claims": "off", + "type": "universal_commerce_protocol_server" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json b/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json index ab2361d4..de9efe4a 100644 --- a/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/ResourceServersWireTest_testUpdate_response.json @@ -18,7 +18,18 @@ "token_lifetime": 1, "token_lifetime_for_web": 1, "enforce_policies": true, + "token_lifetime_for_anonymous_access_tokens": 1, "token_dialect": "access_token", + "access_token": { + "claims_mapping": { + "custom_claims": [ + { + "name": "name", + "expression": "expression" + } + ] + } + }, "token_encryption": { "format": "compact-nested-jwe", "encryption_key": { @@ -29,6 +40,7 @@ } }, "consent_policy": "transactional-authorization-with-mfa", + "require_consent_non_repudiation": true, "authorization_details": [ { "key": "value" @@ -45,10 +57,15 @@ }, "client": { "policy": "deny_all" + }, + "anonymous_user": { + "policy": "deny_all" } }, "authorization_policy": { "policy_id": "policy_id" }, - "client_id": "client_id" + "client_id": "client_id", + "agent_subject_claims": "off", + "type": "universal_commerce_protocol_server" } \ No newline at end of file diff --git a/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json b/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json index 8c386400..77efcf9d 100644 --- a/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json +++ b/src/test/resources/wire-tests/TenantsSettingsWireTest_testGet_response.json @@ -51,7 +51,7 @@ "mfa_show_factor_list_on_enrollment": true, "remove_alg_from_jwks": true, "improved_signup_bot_detection_in_classic": true, - "genai_trial": true, + "local_resource_discovery": true, "enable_dynamic_client_registration": true, "disable_management_api_sms_obfuscation": true, "trust_azure_adfs_email_verified_connection_property": true, @@ -77,6 +77,16 @@ "enabled_locales": [ "am" ], + "access_token": { + "claims_mapping": { + "custom_claims": [ + { + "name": "name", + "expression": "expression" + } + ] + } + }, "security_headers": { "content_security_policy": { "enabled": true, @@ -94,7 +104,11 @@ "mode": "persistent" }, "sessions": { - "oidc_logout_prompt_enabled": true + "oidc_logout_prompt_enabled": true, + "anonymous": { + "lifetime_in_minutes": 1, + "activate_cookie": true + } }, "oidc_logout": { "rp_logout_end_session_endpoint_discovery": true @@ -109,9 +123,11 @@ }, "pushed_authorization_requests_supported": true, "authorization_response_iss_parameter_supported": true, + "dpop_strict_refresh_token_binding": true, "skip_non_verifiable_callback_uri_confirmation_prompt": true, "resource_parameter_profile": "audience", "client_id_metadata_document_supported": true, + "client_id_metadata_document_dynamic_registration_supported": true, "phone_consolidated_experience": true, "enable_ai_guide": true, "include_session_metadata_in_tenant_logs": true, diff --git a/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json b/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json index 8c386400..77efcf9d 100644 --- a/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json +++ b/src/test/resources/wire-tests/TenantsSettingsWireTest_testUpdate_response.json @@ -51,7 +51,7 @@ "mfa_show_factor_list_on_enrollment": true, "remove_alg_from_jwks": true, "improved_signup_bot_detection_in_classic": true, - "genai_trial": true, + "local_resource_discovery": true, "enable_dynamic_client_registration": true, "disable_management_api_sms_obfuscation": true, "trust_azure_adfs_email_verified_connection_property": true, @@ -77,6 +77,16 @@ "enabled_locales": [ "am" ], + "access_token": { + "claims_mapping": { + "custom_claims": [ + { + "name": "name", + "expression": "expression" + } + ] + } + }, "security_headers": { "content_security_policy": { "enabled": true, @@ -94,7 +104,11 @@ "mode": "persistent" }, "sessions": { - "oidc_logout_prompt_enabled": true + "oidc_logout_prompt_enabled": true, + "anonymous": { + "lifetime_in_minutes": 1, + "activate_cookie": true + } }, "oidc_logout": { "rp_logout_end_session_endpoint_discovery": true @@ -109,9 +123,11 @@ }, "pushed_authorization_requests_supported": true, "authorization_response_iss_parameter_supported": true, + "dpop_strict_refresh_token_binding": true, "skip_non_verifiable_callback_uri_confirmation_prompt": true, "resource_parameter_profile": "audience", "client_id_metadata_document_supported": true, + "client_id_metadata_document_dynamic_registration_supported": true, "phone_consolidated_experience": true, "enable_ai_guide": true, "include_session_metadata_in_tenant_logs": true, diff --git a/v4_MIGRATION_GUIDE.md b/v4_MIGRATION_GUIDE.md new file mode 100644 index 00000000..084b0a78 --- /dev/null +++ b/v4_MIGRATION_GUIDE.md @@ -0,0 +1,165 @@ +# Migrating from v3 to v4 + +`v4` is a compatible evolution of `v3`. The Authentication API is unchanged, and the Management API keeps the same client structure, builder patterns, and pagination introduced in `v3`. The breaking changes are narrow: a few generated Management API types where field types were tightened or split for type-safety, and the removal of the Federated Connections Tokensets API. + +- [Overview](#overview) +- [Breaking changes](#breaking-changes) + - [1. Role pagination fields are now non-optional primitives](#1-role-pagination-fields-are-now-non-optional-primitives) + - [2. Connection attribute `identifier` is split by attribute type](#2-connection-attribute-identifier-is-split-by-attribute-type) + - [3. Phone provider protection backoff strategy enum value changed](#3-phone-provider-protection-backoff-strategy-enum-value-changed) + - [4. Federated Connections Tokensets API removed](#4-federated-connections-tokensets-api-removed) +- [Other changes](#other-changes) + - [Per-request retry configuration](#per-request-retry-configuration) + - [Query parameter serialization](#query-parameter-serialization) +- [Migration steps](#migration-steps) + +## Overview + +Most `v3` code compiles and runs unchanged on `v4`. You only need to act if your code touches one of the following: + +| Area | What changed | Impact | +|------|--------------|--------| +| `ListRolesOffsetPaginatedResponseContent` | `start` / `limit` / `total` changed from `Optional` to primitive `double`, and are now required builder stages | Callers reading these getters or constructing the type | +| Connection attributes | The shared `ConnectionAttributeIdentifier` type is removed and replaced by dedicated `EmailAttributeIdentifier`, `PhoneAttributeIdentifier`, and `UsernameAttributeIdentifier` types | Callers reading/setting `identifier` on `EmailAttribute`, `PhoneAttribute`, `UsernameAttribute` | +| `PhoneProviderProtectionBackoffStrategyEnum` | `NONE` (`"none"`) removed, replaced by `DEFAULT` (`"default"`) | Callers referencing the `NONE` constant or visitor | +| Federated Connections Tokensets | `client.users().federatedConnectionsTokensets()` and its types removed | Callers of that API | + +Everything else in `v4` is additive or internal. + +## Breaking changes + +### 1. Role pagination fields are now non-optional primitives + +In `ListRolesOffsetPaginatedResponseContent`, the `start`, `limit`, and `total` fields change from `Optional` to primitive `double`, and the builder now requires them as mandatory, staged arguments. + +**v3:** +```java +private final Optional start; +public Optional getStart() { ... } +``` + +**v4:** +```java +private final double start; +public double getStart() { ... } +``` + +If you read these getters, drop the `Optional` handling: + +```java +// v3 +double start = response.getStart().orElse(0d); + +// v4 +double start = response.getStart(); +``` + +If you construct the type, the builder is now staged and requires `start`, `limit`, and `total` in order: + +```java +// v4 +ListRolesOffsetPaginatedResponseContent content = ListRolesOffsetPaginatedResponseContent.builder() + .start(0) + .limit(50) + .total(200) + .roles(roles) + .build(); +``` + +### 2. Connection attribute `identifier` is split by attribute type + +The shared `ConnectionAttributeIdentifier` type is removed and replaced with dedicated types per attribute. The `identifier` field on `EmailAttribute`, `PhoneAttribute`, and `UsernameAttribute` now uses the matching type, so their `getIdentifier()` and builder `identifier(...)` signatures change. + +| Attribute | v3 identifier type | v4 identifier type | +|-----------|--------------------|--------------------| +| `EmailAttribute` | `ConnectionAttributeIdentifier` | `EmailAttributeIdentifier` | +| `PhoneAttribute` | `ConnectionAttributeIdentifier` | `PhoneAttributeIdentifier` | +| `UsernameAttribute` | `ConnectionAttributeIdentifier` | `UsernameAttributeIdentifier` | + +**v3:** +```java +public Optional getIdentifier() { ... } +``` + +**v4 (`EmailAttribute`):** +```java +public Optional getIdentifier() { ... } +``` + +Update your imports and any variables holding the identifier. The new types expose `active` (`Optional`); `EmailAttributeIdentifier` and `PhoneAttributeIdentifier` additionally expose a `defaultMethod` (`DefaultMethodEmailIdentifierEnum` / `DefaultMethodPhoneNumberIdentifierEnum`). + +```java +// v4 +EmailAttribute email = EmailAttribute.builder() + .identifier(EmailAttributeIdentifier.builder() + .active(true) + .build()) + .build(); +``` + +### 3. Phone provider protection backoff strategy enum value changed + +`PhoneProviderProtectionBackoffStrategyEnum.NONE` (`"none"`, `visitNone()`) is removed and replaced by `PhoneProviderProtectionBackoffStrategyEnum.DEFAULT` (`"default"`, `visitDefault()`). + +**v3:** +```java +PhoneProviderProtectionBackoffStrategyEnum strategy = PhoneProviderProtectionBackoffStrategyEnum.NONE; +``` + +**v4:** +```java +PhoneProviderProtectionBackoffStrategyEnum strategy = PhoneProviderProtectionBackoffStrategyEnum.DEFAULT; +``` + +If you implement the visitor interface, rename `visitNone()` to `visitDefault()`. + +### 4. Federated Connections Tokensets API removed + +The Federated Connections Tokensets API is removed. The following are no longer available: + +- Client accessor: `client.users().federatedConnectionsTokensets()` (and its async/raw variants) +- Types: `FederatedConnectionTokenSet`, `ConnectionFederatedConnectionsAccessTokens` + +**v3:** +```java +List tokensets = + client.users().federatedConnectionsTokensets().list("user_id"); + +client.users().federatedConnectionsTokensets().delete("user_id", "tokenset_id"); +``` + +**v4:** + +No replacement is generated in the SDK. Remove these calls; if you still need this functionality, call the corresponding Management API endpoint directly. + +## Other changes + +These are backward-compatible but worth noting. + +### Per-request retry configuration + +Requests now honor a per-request `maxRetries` value via `RequestOptions`, alongside the existing `timeout`: + +```java +GetUserResponseContent user = client.users().get( + "user_id", + GetUserRequestParameters.builder().build(), + RequestOptions.builder() + .timeout(10) + .maxRetries(2) + .build() +); +``` + +### Query parameter serialization + +List/query parameter types (e.g. `ListUsersRequestParameters`, `ListClientsRequestParameters`, `ListLogsRequestParameters`, `ListConnectionsQueryParameters`) now serialize their optional/nullable query parameters through a nullable-nonempty filter instead of being marked `@JsonIgnore`. Builder usage is unchanged; this only affects how parameters are emitted on the wire. + +## Migration steps + +1. Update the dependency to the `v4` release. +2. Replace any `ConnectionAttributeIdentifier` imports/usages with the matching `EmailAttributeIdentifier`, `PhoneAttributeIdentifier`, or `UsernameAttributeIdentifier`. +3. Remove `Optional` handling around `ListRolesOffsetPaginatedResponseContent#getStart/getLimit/getTotal`, and update any builder usage to the staged `start` → `limit` → `total` form. +4. Replace `PhoneProviderProtectionBackoffStrategyEnum.NONE` with `DEFAULT` (and `visitNone()` with `visitDefault()` in any visitor implementations). +5. Remove any usage of `client.users().federatedConnectionsTokensets()` and the `FederatedConnectionTokenSet` / `ConnectionFederatedConnectionsAccessTokens` types. +6. Run `mvn verify` (or your build) and fix any remaining compilation errors surfaced by the above. diff --git a/v5_MIGRATION_GUIDE.md b/v5_MIGRATION_GUIDE.md new file mode 100644 index 00000000..571f432a --- /dev/null +++ b/v5_MIGRATION_GUIDE.md @@ -0,0 +1,113 @@ +# Migrating from v4 to v5 + +`v5` is a compatible evolution of `v4`. The Authentication API is unchanged, and the Management API keeps the same client structure, builder patterns, and pagination. There is a single breaking change: response fields that the API declares as nullable now use `OptionalNullable` instead of `Optional`, so the SDK reflects the actual API contract. + +- [Overview](#overview) +- [Breaking changes](#breaking-changes) + - [1. Nullable response fields use `OptionalNullable`](#1-nullable-response-fields-use-optionalnullablet) +- [Migration steps](#migration-steps) + +For everything else added in `v5` — the Keys Network ACLs client, third-party client access, and Cross-App Access connection profiles — see the [changelog](CHANGELOG.md). Those changes are additive and require no action. + +## Overview + +Most `v4` code compiles and runs unchanged on `v5`. You only need to act if your code reads one of the affected date/nullable fields: + +| Area | What changed | Impact | +|------|--------------|--------| +| Session response types | Timestamp getters return `OptionalNullable` instead of `Optional` | Callers reading `created_at`, `updated_at`, `authenticated_at`, `idle_expires_at`, `expires_at`, `last_interacted_at` | +| Refresh token response types | Timestamp getters return `OptionalNullable` instead of `Optional` | Callers reading `created_at`, `idle_expires_at`, `expires_at`, `last_exchanged_at` | +| `SessionAuthenticationSignal` | `getTimestamp()` returns `OptionalNullable` | Callers reading `timestamp` | +| `FlowActionFlowMapValueParams` | `getFallback()` returns `OptionalNullable` | Callers reading `fallback` | + +Everything else in `v5` is additive or internal. Builder setters keep their `Optional` and raw-value overloads, so code that *writes* these types is unaffected — only read paths change. + +## Breaking changes + +### 1. Nullable response fields use `OptionalNullable` + +These fields are declared nullable in the Auth0 API definition. Earlier SDK versions dropped that nullability and generated plain `Optional`; `v5` preserves it, which allows the SDK to represent a field that the API returned as an explicit `null` distinctly from one it omitted entirely. + +The following 32 getters are affected: + +| Type | Getters | +|------|---------| +| `GetSessionResponseContent`, `SessionResponseContent`, `UpdateSessionResponseContent` | `getCreatedAt()`, `getUpdatedAt()`, `getAuthenticatedAt()`, `getIdleExpiresAt()`, `getExpiresAt()`, `getLastInteractedAt()` | +| `GetRefreshTokenResponseContent`, `RefreshTokenResponseContent`, `UpdateRefreshTokenResponseContent` | `getCreatedAt()`, `getIdleExpiresAt()`, `getExpiresAt()`, `getLastExchangedAt()` | +| `SessionAuthenticationSignal` | `getTimestamp()` | +| `FlowActionFlowMapValueParams` | `getFallback()` | + +There are three separate things to check. Only the first is caught by the compiler. + +#### a. Signature change + +`OptionalNullable` is not a drop-in replacement for `Optional`. It provides `isPresent()`, `isAbsent()`, `isNull()`, `wasSpecified()`, `get()`, `getValueOrNull()`, `orElse()`, `map()`, and `toOptional()` — but **not** `ifPresent()`, `orElseThrow()`, `filter()`, or `stream()`. + +The simplest migration is `.toOptional()`, which returns an empty `Optional` for both the absent and explicit-null cases: + +```java +// v4 +Optional created = session.getCreatedAt(); +session.getCreatedAt().ifPresent(this::audit); + +// v5 +Optional created = session.getCreatedAt().toOptional(); +session.getCreatedAt().toOptional().ifPresent(this::audit); +``` + +If you want to distinguish the two states, use the richer API directly: + +```java +// v5 +OptionalNullable expires = session.getExpiresAt(); +if (expires.isPresent()) { + handle(expires.get()); +} else if (expires.isNull()) { + // the API explicitly returned null for this field +} else { + // the API omitted the field +} +``` + +#### b. `get()` throws a different exception + +`Optional.get()` throws `NoSuchElementException`. `OptionalNullable.get()` throws `IllegalStateException`, and does so for both the absent and explicit-null states. + +```java +// v4 — catches successfully +try { + SessionDate created = session.getCreatedAt().get(); +} catch (NoSuchElementException e) { ... } + +// v5 — the catch no longer matches; the exception propagates +try { + SessionDate created = session.getCreatedAt().get(); +} catch (IllegalStateException e) { ... } +``` + +This compiles unchanged in `v5`, so the compiler will not flag it. Search for `NoSuchElementException` around these getters. + +#### c. `orElse()` can return `null` + +`Optional.orElse(fallback)` never returns `null`. `OptionalNullable.orElse(fallback)` returns `null` when the field was explicitly null, and returns `fallback` only when the field was absent: + +```java +SessionDate created = session.getCreatedAt().orElse(DEFAULT); +// v5: returns DEFAULT if absent, but null if the API returned an explicit null +``` + +If you rely on a non-null result, use `.toOptional().orElse(fallback)` instead, which treats both states as empty: + +```java +SessionDate created = session.getCreatedAt().toOptional().orElse(DEFAULT); +``` + +Like (b), this compiles unchanged, so it is worth an explicit grep. + +## Migration steps + +1. Update the dependency to the `v5` release. +2. Compile. Any getter listed above that you assign to an `Optional`, or call `ifPresent()` / `orElseThrow()` / `filter()` / `stream()` on, will fail — append `.toOptional()`. +3. Grep for `NoSuchElementException` near those getters and change it to `IllegalStateException`, or switch to `.toOptional().orElseThrow(...)`. +4. Grep for `.orElse(` on those getters. If a non-null result is required, use `.toOptional().orElse(...)`. +5. Run your build and test suite.